Class: OCI::Blockchain::BlockchainPlatformClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/blockchain/blockchain_platform_client.rb

Overview

Blockchain Platform Control Plane API

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ BlockchainPlatformClient

Creates a new BlockchainPlatformClient. Notes: If a config is not specified, then the global OCI.config will be used.

This client is not thread-safe

Either a region or an endpoint must be specified. If an endpoint is specified, it will be used instead of the region. A region may be specified in the config or via or the region parameter. If specified in both, then the region parameter will be used.

Parameters:

  • config (Config) (defaults to: nil)

    A Config object.

  • region (String) (defaults to: nil)

    A region used to determine the service endpoint. This will usually correspond to a value in Regions::REGION_ENUM, but may be an arbitrary string.

  • endpoint (String) (defaults to: nil)

    The fully qualified endpoint URL

  • signer (OCI::BaseSigner) (defaults to: nil)

    A signer implementation which can be used by this client. If this is not provided then a signer will be constructed via the provided config. One use case of this parameter is instance principals authentication, so that the instance principals signer can be provided to the client

  • proxy_settings (OCI::ApiClientProxySettings) (defaults to: nil)

    If your environment requires you to use a proxy server for outgoing HTTP requests the details for the proxy can be provided in this parameter

  • retry_config (OCI::Retry::RetryConfig) (defaults to: nil)

    The retry configuration for this service client. This represents the default retry configuration to apply across all operations. This can be overridden on a per-operation basis. The default retry configuration value is nil, which means that an operation will not perform any retries



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 55

def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil)
  # If the signer is an InstancePrincipalsSecurityTokenSigner or SecurityTokenSigner and no config was supplied (they are self-sufficient signers)
  # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
  # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then
  # pass it to this constructor.
  #
  # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid
  # so try and load the config from the default file.
  config = OCI::Config.validate_and_build_config_with_signer(config, signer)

  signer = OCI::Signer.config_file_auth_builder(config) if signer.nil?

  @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings)
  @retry_config = retry_config

  if endpoint
    @endpoint = endpoint + '/20191010'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "BlockchainPlatformClient endpoint set to '#{@endpoint}'." if logger
end

Instance Attribute Details

#api_clientOCI::ApiClient (readonly)

Client used to make HTTP requests.

Returns:



15
16
17
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 15

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


19
20
21
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 19

def endpoint
  @endpoint
end

#regionString

The region, which will usually correspond to a value in Regions::REGION_ENUM.

Returns:

  • (String)


29
30
31
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 29

def region
  @region
end

#retry_configOCI::Retry::RetryConfig (readonly)

The default retry configuration to apply to all operations in this service client. This can be overridden on a per-operation basis. The default retry configuration value is nil, which means that an operation will not perform any retries



25
26
27
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 25

def retry_config
  @retry_config
end

Instance Method Details

#change_blockchain_platform_compartment(blockchain_platform_id, change_blockchain_platform_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_blockchain_platform_compartment API.

Change Blockchain Platform Compartment

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 125

def change_blockchain_platform_compartment(blockchain_platform_id, change_blockchain_platform_compartment_details, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#change_blockchain_platform_compartment.' if logger

  raise "Missing the required parameter 'blockchain_platform_id' when calling change_blockchain_platform_compartment." if blockchain_platform_id.nil?
  raise "Missing the required parameter 'change_blockchain_platform_compartment_details' when calling change_blockchain_platform_compartment." if change_blockchain_platform_compartment_details.nil?
  raise "Parameter value for 'blockchain_platform_id' must not be blank" if OCI::Internal::Util.blank_string?(blockchain_platform_id)

  path = '/blockchainPlatforms/{blockchainPlatformId}/actions/changeCompartment'.sub('{blockchainPlatformId}', blockchain_platform_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_blockchain_platform_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#change_blockchain_platform_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_blockchain_platform(create_blockchain_platform_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_blockchain_platform API.

Creates a new Blockchain Platform.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 189

def create_blockchain_platform(create_blockchain_platform_details, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#create_blockchain_platform.' if logger

  raise "Missing the required parameter 'create_blockchain_platform_details' when calling create_blockchain_platform." if create_blockchain_platform_details.nil?

  path = '/blockchainPlatforms'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_blockchain_platform_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#create_blockchain_platform') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_osn(blockchain_platform_id, create_osn_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_osn API.

Create Blockchain Platform Osn

Parameters:

  • blockchain_platform_id (String)

    Unique service identifier.

  • create_osn_details (OCI::Blockchain::Models::CreateOsnDetails)

    Input payload to create blockchain platform OSN. The payload cannot be empty.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 257

def create_osn(blockchain_platform_id, create_osn_details, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#create_osn.' if logger

  raise "Missing the required parameter 'blockchain_platform_id' when calling create_osn." if blockchain_platform_id.nil?
  raise "Missing the required parameter 'create_osn_details' when calling create_osn." if create_osn_details.nil?
  raise "Parameter value for 'blockchain_platform_id' must not be blank" if OCI::Internal::Util.blank_string?(blockchain_platform_id)

  path = '/blockchainPlatforms/{blockchainPlatformId}/osns'.sub('{blockchainPlatformId}', blockchain_platform_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_osn_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#create_osn') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_peer(blockchain_platform_id, create_peer_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_peer API.

Create Blockchain Platform Peer

Parameters:

  • blockchain_platform_id (String)

    Unique service identifier.

  • create_peer_details (OCI::Blockchain::Models::CreatePeerDetails)

    Input payload to create a blockchain platform peer. The payload cannot be empty.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 322

def create_peer(blockchain_platform_id, create_peer_details, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#create_peer.' if logger

  raise "Missing the required parameter 'blockchain_platform_id' when calling create_peer." if blockchain_platform_id.nil?
  raise "Missing the required parameter 'create_peer_details' when calling create_peer." if create_peer_details.nil?
  raise "Parameter value for 'blockchain_platform_id' must not be blank" if OCI::Internal::Util.blank_string?(blockchain_platform_id)

  path = '/blockchainPlatforms/{blockchainPlatformId}/peers'.sub('{blockchainPlatformId}', blockchain_platform_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_peer_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#create_peer') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_blockchain_platform(blockchain_platform_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_blockchain_platform API.

Delete a particular of a Blockchain Platform

Parameters:

  • blockchain_platform_id (String)

    Unique service identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 390

def delete_blockchain_platform(blockchain_platform_id, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#delete_blockchain_platform.' if logger

  raise "Missing the required parameter 'blockchain_platform_id' when calling delete_blockchain_platform." if blockchain_platform_id.nil?
  raise "Parameter value for 'blockchain_platform_id' must not be blank" if OCI::Internal::Util.blank_string?(blockchain_platform_id)

  path = '/blockchainPlatforms/{blockchainPlatformId}'.sub('{blockchainPlatformId}', blockchain_platform_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#delete_blockchain_platform') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_osn(blockchain_platform_id, osn_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_osn API.

Delete a particular OSN of a Blockchain Platform

Parameters:

  • blockchain_platform_id (String)

    Unique service identifier.

  • osn_id (String)

    OSN identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 453

def delete_osn(blockchain_platform_id, osn_id, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#delete_osn.' if logger

  raise "Missing the required parameter 'blockchain_platform_id' when calling delete_osn." if blockchain_platform_id.nil?
  raise "Missing the required parameter 'osn_id' when calling delete_osn." if osn_id.nil?
  raise "Parameter value for 'blockchain_platform_id' must not be blank" if OCI::Internal::Util.blank_string?(blockchain_platform_id)
  raise "Parameter value for 'osn_id' must not be blank" if OCI::Internal::Util.blank_string?(osn_id)

  path = '/blockchainPlatforms/{blockchainPlatformId}/osns/{osnId}'.sub('{blockchainPlatformId}', blockchain_platform_id.to_s).sub('{osnId}', osn_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#delete_osn') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_peer(blockchain_platform_id, peer_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_peer API.

Delete a particular peer of a Blockchain Platform

Parameters:

  • blockchain_platform_id (String)

    Unique service identifier.

  • peer_id (String)

    Peer identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 522

def delete_peer(blockchain_platform_id, peer_id, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#delete_peer.' if logger

  raise "Missing the required parameter 'blockchain_platform_id' when calling delete_peer." if blockchain_platform_id.nil?
  raise "Missing the required parameter 'peer_id' when calling delete_peer." if peer_id.nil?
  raise "Parameter value for 'blockchain_platform_id' must not be blank" if OCI::Internal::Util.blank_string?(blockchain_platform_id)
  raise "Parameter value for 'peer_id' must not be blank" if OCI::Internal::Util.blank_string?(peer_id)

  path = '/blockchainPlatforms/{blockchainPlatformId}/peers/{peerId}'.sub('{blockchainPlatformId}', blockchain_platform_id.to_s).sub('{peerId}', peer_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#delete_peer') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_work_request(work_request_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_work_request API.

Attempts to cancel the work request with the given ID.

Parameters:

  • work_request_id (String)

    The ID of the asynchronous request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 586

def delete_work_request(work_request_id, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#delete_work_request.' if logger

  raise "Missing the required parameter 'work_request_id' when calling delete_work_request." if work_request_id.nil?
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#delete_work_request') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_blockchain_platform(blockchain_platform_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_blockchain_platform API.

Gets information about a Blockchain Platform identified by the specific id

Parameters:

  • blockchain_platform_id (String)

    Unique service identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 640

def get_blockchain_platform(blockchain_platform_id, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#get_blockchain_platform.' if logger

  raise "Missing the required parameter 'blockchain_platform_id' when calling get_blockchain_platform." if blockchain_platform_id.nil?
  raise "Parameter value for 'blockchain_platform_id' must not be blank" if OCI::Internal::Util.blank_string?(blockchain_platform_id)

  path = '/blockchainPlatforms/{blockchainPlatformId}'.sub('{blockchainPlatformId}', blockchain_platform_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#get_blockchain_platform') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Blockchain::Models::BlockchainPlatform'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_osn(blockchain_platform_id, osn_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_osn API.

Gets information about an OSN identified by the specific id

Parameters:

  • blockchain_platform_id (String)

    Unique service identifier.

  • osn_id (String)

    OSN identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type Osn



695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 695

def get_osn(blockchain_platform_id, osn_id, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#get_osn.' if logger

  raise "Missing the required parameter 'blockchain_platform_id' when calling get_osn." if blockchain_platform_id.nil?
  raise "Missing the required parameter 'osn_id' when calling get_osn." if osn_id.nil?
  raise "Parameter value for 'blockchain_platform_id' must not be blank" if OCI::Internal::Util.blank_string?(blockchain_platform_id)
  raise "Parameter value for 'osn_id' must not be blank" if OCI::Internal::Util.blank_string?(osn_id)

  path = '/blockchainPlatforms/{blockchainPlatformId}/osns/{osnId}'.sub('{blockchainPlatformId}', blockchain_platform_id.to_s).sub('{osnId}', osn_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#get_osn') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Blockchain::Models::Osn'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_peer(blockchain_platform_id, peer_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_peer API.

Gets information about a peer identified by the specific id

Parameters:

  • blockchain_platform_id (String)

    Unique service identifier.

  • peer_id (String)

    Peer identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 752

def get_peer(blockchain_platform_id, peer_id, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#get_peer.' if logger

  raise "Missing the required parameter 'blockchain_platform_id' when calling get_peer." if blockchain_platform_id.nil?
  raise "Missing the required parameter 'peer_id' when calling get_peer." if peer_id.nil?
  raise "Parameter value for 'blockchain_platform_id' must not be blank" if OCI::Internal::Util.blank_string?(blockchain_platform_id)
  raise "Parameter value for 'peer_id' must not be blank" if OCI::Internal::Util.blank_string?(peer_id)

  path = '/blockchainPlatforms/{blockchainPlatformId}/peers/{peerId}'.sub('{blockchainPlatformId}', blockchain_platform_id.to_s).sub('{peerId}', peer_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#get_peer') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Blockchain::Models::Peer'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_work_request(work_request_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_work_request API.

Gets the status of the work request with the given ID.

Parameters:

  • work_request_id (String)

    The ID of the asynchronous request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 808

def get_work_request(work_request_id, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#get_work_request.' if logger

  raise "Missing the required parameter 'work_request_id' when calling get_work_request." if work_request_id.nil?
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#get_work_request') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Blockchain::Models::WorkRequest'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_blockchain_platform_patches(blockchain_platform_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_blockchain_platform_patches API.

List Blockchain Platform Patches

Parameters:

  • blockchain_platform_id (String)

    Unique service identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :page (String)

    The page at which to start retrieving results.

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 864

def list_blockchain_platform_patches(blockchain_platform_id, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#list_blockchain_platform_patches.' if logger

  raise "Missing the required parameter 'blockchain_platform_id' when calling list_blockchain_platform_patches." if blockchain_platform_id.nil?
  raise "Parameter value for 'blockchain_platform_id' must not be blank" if OCI::Internal::Util.blank_string?(blockchain_platform_id)

  path = '/blockchainPlatforms/{blockchainPlatformId}/patches'.sub('{blockchainPlatformId}', blockchain_platform_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#list_blockchain_platform_patches') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Blockchain::Models::BlockchainPlatformPatchCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_blockchain_platforms(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_blockchain_platforms API.

Returns a list Blockchain Platform Instances in a compartment Allowed values are: timeCreated, displayName

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :display_name (String)

    A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource

  • :page (String)

    The page at which to start retrieving results.

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to ASC) Allowed values are: ASC, DESC

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. (default to timeCreated)

  • :opc_request_id (String)

    The client request ID for tracing.

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 933

def list_blockchain_platforms(compartment_id, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#list_blockchain_platforms.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_blockchain_platforms." if compartment_id.nil?

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.'
  end

  if opts[:lifecycle_state] && !OCI::Blockchain::Models::BlockchainPlatform::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Blockchain::Models::BlockchainPlatform::LIFECYCLE_STATE_ENUM.'
  end

  path = '/blockchainPlatforms'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#list_blockchain_platforms') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Blockchain::Models::BlockchainPlatformCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_osns(blockchain_platform_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_osns API.

List Blockchain Platform OSNs Allowed values are: timeCreated, displayName

Parameters:

  • blockchain_platform_id (String)

    Unique service identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :display_name (String)

    A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to ASC) Allowed values are: ASC, DESC

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. (default to timeCreated)

  • :page (String)

    The page at which to start retrieving results.

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

Returns:



1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 1021

def list_osns(blockchain_platform_id, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#list_osns.' if logger

  raise "Missing the required parameter 'blockchain_platform_id' when calling list_osns." if blockchain_platform_id.nil?

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.'
  end
  raise "Parameter value for 'blockchain_platform_id' must not be blank" if OCI::Internal::Util.blank_string?(blockchain_platform_id)

  path = '/blockchainPlatforms/{blockchainPlatformId}/osns'.sub('{blockchainPlatformId}', blockchain_platform_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#list_osns') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Blockchain::Models::OsnCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_peers(blockchain_platform_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_peers API.

List Blockchain Platform Peers Allowed values are: timeCreated, displayName

Parameters:

  • blockchain_platform_id (String)

    Unique service identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :display_name (String)

    A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to ASC) Allowed values are: ASC, DESC

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default. (default to timeCreated)

  • :page (String)

    The page at which to start retrieving results.

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

Returns:



1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 1106

def list_peers(blockchain_platform_id, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#list_peers.' if logger

  raise "Missing the required parameter 'blockchain_platform_id' when calling list_peers." if blockchain_platform_id.nil?

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.'
  end
  raise "Parameter value for 'blockchain_platform_id' must not be blank" if OCI::Internal::Util.blank_string?(blockchain_platform_id)

  path = '/blockchainPlatforms/{blockchainPlatformId}/peers'.sub('{blockchainPlatformId}', blockchain_platform_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#list_peers') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Blockchain::Models::PeerCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_work_request_errors(work_request_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_work_request_errors API.

Return a (paginated) list of errors for a given work request.

Parameters:

  • work_request_id (String)

    The ID of the asynchronous request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

  • :page (String)

    The page at which to start retrieving results.

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

Returns:



1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 1178

def list_work_request_errors(work_request_id, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#list_work_request_errors.' if logger

  raise "Missing the required parameter 'work_request_id' when calling list_work_request_errors." if work_request_id.nil?
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}/errors'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#list_work_request_errors') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Blockchain::Models::WorkRequestErrorCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_work_request_logs(work_request_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_work_request_logs API.

Return a (paginated) list of logs for a given work request.

Parameters:

  • work_request_id (String)

    The ID of the asynchronous request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

  • :page (String)

    The page at which to start retrieving results.

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

Returns:



1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 1237

def list_work_request_logs(work_request_id, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#list_work_request_logs.' if logger

  raise "Missing the required parameter 'work_request_id' when calling list_work_request_logs." if work_request_id.nil?
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}/logs'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#list_work_request_logs') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Blockchain::Models::WorkRequestLogEntryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_work_requests(compartment_id, blockchain_platform_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_work_requests API.

Lists the work requests in a compartment.

Allowed values are: timeStarted, workRequestId

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

  • blockchain_platform_id (String)

    Unique service identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :sort_order (String)

    The sort order to use, either 'asc' or 'desc'. (default to ASC) Allowed values are: ASC, DESC

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for TIMESTARTED is descending. Default order for WORKREQUESTID is ascending. If no value is specified TIMESTARTED is default. (default to timeStarted)

  • :opc_request_id (String)

    The client request ID for tracing.

  • :page (String)

    The page at which to start retrieving results.

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

Returns:



1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 1302

def list_work_requests(compartment_id, blockchain_platform_id, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#list_work_requests.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_work_requests." if compartment_id.nil?
  raise "Missing the required parameter 'blockchain_platform_id' when calling list_work_requests." if blockchain_platform_id.nil?

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:sort_by] && !%w[timeStarted workRequestId].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeStarted, workRequestId.'
  end

  path = '/workRequests'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:blockchainPlatformId] = blockchain_platform_id
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#list_work_requests') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Blockchain::Models::WorkRequestCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#loggerLogger

Returns The logger for this client. May be nil.

Returns:

  • (Logger)

    The logger for this client. May be nil.



94
95
96
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 94

def logger
  @api_client.config.logger
end

#preview_scale_blockchain_platform(blockchain_platform_id, scale_blockchain_platform_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use preview_scale_blockchain_platform API.

Preview Scale Blockchain Platform

Parameters:

  • blockchain_platform_id (String)

    Unique service identifier.

  • scale_blockchain_platform_details (OCI::Blockchain::Models::ScaleBlockchainPlatformDetails)

    Input payload to scaleout blockchain platform. The payload cannot be empty.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 1372

def preview_scale_blockchain_platform(blockchain_platform_id, scale_blockchain_platform_details, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#preview_scale_blockchain_platform.' if logger

  raise "Missing the required parameter 'blockchain_platform_id' when calling preview_scale_blockchain_platform." if blockchain_platform_id.nil?
  raise "Missing the required parameter 'scale_blockchain_platform_details' when calling preview_scale_blockchain_platform." if scale_blockchain_platform_details.nil?
  raise "Parameter value for 'blockchain_platform_id' must not be blank" if OCI::Internal::Util.blank_string?(blockchain_platform_id)

  path = '/blockchainPlatforms/{blockchainPlatformId}/actions/scale/preview'.sub('{blockchainPlatformId}', blockchain_platform_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(scale_blockchain_platform_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#preview_scale_blockchain_platform') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Blockchain::Models::ScaledBlockchainPlatformPreview'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#scale_blockchain_platform(blockchain_platform_id, scale_blockchain_platform_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use scale_blockchain_platform API.

Scale Blockchain Platform

Parameters:

  • blockchain_platform_id (String)

    Unique service identifier.

  • scale_blockchain_platform_details (OCI::Blockchain::Models::ScaleBlockchainPlatformDetails)

    Input payload to scaleout blockchain platform. The payload cannot be empty.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 1441

def scale_blockchain_platform(blockchain_platform_id, scale_blockchain_platform_details, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#scale_blockchain_platform.' if logger

  raise "Missing the required parameter 'blockchain_platform_id' when calling scale_blockchain_platform." if blockchain_platform_id.nil?
  raise "Missing the required parameter 'scale_blockchain_platform_details' when calling scale_blockchain_platform." if scale_blockchain_platform_details.nil?
  raise "Parameter value for 'blockchain_platform_id' must not be blank" if OCI::Internal::Util.blank_string?(blockchain_platform_id)

  path = '/blockchainPlatforms/{blockchainPlatformId}/actions/scale'.sub('{blockchainPlatformId}', blockchain_platform_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(scale_blockchain_platform_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#scale_blockchain_platform') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#start_blockchain_platform(blockchain_platform_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use start_blockchain_platform API.

Start a Blockchain Platform

Parameters:

  • blockchain_platform_id (String)

    Unique service identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 1510

def start_blockchain_platform(blockchain_platform_id, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#start_blockchain_platform.' if logger

  raise "Missing the required parameter 'blockchain_platform_id' when calling start_blockchain_platform." if blockchain_platform_id.nil?
  raise "Parameter value for 'blockchain_platform_id' must not be blank" if OCI::Internal::Util.blank_string?(blockchain_platform_id)

  path = '/blockchainPlatforms/{blockchainPlatformId}/actions/start'.sub('{blockchainPlatformId}', blockchain_platform_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#start_blockchain_platform') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#stop_blockchain_platform(blockchain_platform_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use stop_blockchain_platform API.

Stop a Blockchain Platform

Parameters:

  • blockchain_platform_id (String)

    Unique service identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 1578

def stop_blockchain_platform(blockchain_platform_id, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#stop_blockchain_platform.' if logger

  raise "Missing the required parameter 'blockchain_platform_id' when calling stop_blockchain_platform." if blockchain_platform_id.nil?
  raise "Parameter value for 'blockchain_platform_id' must not be blank" if OCI::Internal::Util.blank_string?(blockchain_platform_id)

  path = '/blockchainPlatforms/{blockchainPlatformId}/actions/stop'.sub('{blockchainPlatformId}', blockchain_platform_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#stop_blockchain_platform') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_blockchain_platform(update_blockchain_platform_details, blockchain_platform_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_blockchain_platform API.

Update a particular of a Blockchain Platform

Parameters:

  • update_blockchain_platform_details (OCI::Blockchain::Models::UpdateBlockchainPlatformDetails)

    The Blockchain Platform fields to update. Fields that are not provided will not be updated.

  • blockchain_platform_id (String)

    Unique service identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 1647

def update_blockchain_platform(update_blockchain_platform_details, blockchain_platform_id, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#update_blockchain_platform.' if logger

  raise "Missing the required parameter 'update_blockchain_platform_details' when calling update_blockchain_platform." if update_blockchain_platform_details.nil?
  raise "Missing the required parameter 'blockchain_platform_id' when calling update_blockchain_platform." if blockchain_platform_id.nil?
  raise "Parameter value for 'blockchain_platform_id' must not be blank" if OCI::Internal::Util.blank_string?(blockchain_platform_id)

  path = '/blockchainPlatforms/{blockchainPlatformId}'.sub('{blockchainPlatformId}', blockchain_platform_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(update_blockchain_platform_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#update_blockchain_platform') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_osn(blockchain_platform_id, osn_id, update_osn_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_osn API.

Update Blockchain Platform OSN

Parameters:

  • blockchain_platform_id (String)

    Unique service identifier.

  • osn_id (String)

    OSN identifier.

  • update_osn_details (OCI::Blockchain::Models::UpdateOsnDetails)

    Input payload to update a blockchain platform OSN. The payload cannot be empty.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 1719

def update_osn(blockchain_platform_id, osn_id, update_osn_details, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#update_osn.' if logger

  raise "Missing the required parameter 'blockchain_platform_id' when calling update_osn." if blockchain_platform_id.nil?
  raise "Missing the required parameter 'osn_id' when calling update_osn." if osn_id.nil?
  raise "Missing the required parameter 'update_osn_details' when calling update_osn." if update_osn_details.nil?
  raise "Parameter value for 'blockchain_platform_id' must not be blank" if OCI::Internal::Util.blank_string?(blockchain_platform_id)
  raise "Parameter value for 'osn_id' must not be blank" if OCI::Internal::Util.blank_string?(osn_id)

  path = '/blockchainPlatforms/{blockchainPlatformId}/osns/{osnId}'.sub('{blockchainPlatformId}', blockchain_platform_id.to_s).sub('{osnId}', osn_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(update_osn_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#update_osn') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_peer(blockchain_platform_id, peer_id, update_peer_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_peer API.

Update Blockchain Platform Peer

Parameters:

  • blockchain_platform_id (String)

    Unique service identifier.

  • peer_id (String)

    Peer identifier.

  • update_peer_details (OCI::Blockchain::Models::UpdatePeerDetails)

    Input payload to update a blockchain platform peer. The payload cannot be empty.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 1793

def update_peer(blockchain_platform_id, peer_id, update_peer_details, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#update_peer.' if logger

  raise "Missing the required parameter 'blockchain_platform_id' when calling update_peer." if blockchain_platform_id.nil?
  raise "Missing the required parameter 'peer_id' when calling update_peer." if peer_id.nil?
  raise "Missing the required parameter 'update_peer_details' when calling update_peer." if update_peer_details.nil?
  raise "Parameter value for 'blockchain_platform_id' must not be blank" if OCI::Internal::Util.blank_string?(blockchain_platform_id)
  raise "Parameter value for 'peer_id' must not be blank" if OCI::Internal::Util.blank_string?(peer_id)

  path = '/blockchainPlatforms/{blockchainPlatformId}/peers/{peerId}'.sub('{blockchainPlatformId}', blockchain_platform_id.to_s).sub('{peerId}', peer_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(update_peer_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#update_peer') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#upgrade_blockchain_platform(upgrade_blockchain_platform_details, blockchain_platform_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use upgrade_blockchain_platform API.

Upgrade a Blockchain Platform version

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
# File 'lib/oci/blockchain/blockchain_platform_client.rb', line 1865

def upgrade_blockchain_platform(upgrade_blockchain_platform_details, blockchain_platform_id, opts = {})
  logger.debug 'Calling operation BlockchainPlatformClient#upgrade_blockchain_platform.' if logger

  raise "Missing the required parameter 'upgrade_blockchain_platform_details' when calling upgrade_blockchain_platform." if upgrade_blockchain_platform_details.nil?
  raise "Missing the required parameter 'blockchain_platform_id' when calling upgrade_blockchain_platform." if blockchain_platform_id.nil?
  raise "Parameter value for 'blockchain_platform_id' must not be blank" if OCI::Internal::Util.blank_string?(blockchain_platform_id)

  path = '/blockchainPlatforms/{blockchainPlatformId}/actions/upgrade'.sub('{blockchainPlatformId}', blockchain_platform_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(upgrade_blockchain_platform_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockchainPlatformClient#upgrade_blockchain_platform') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end