class OCI::Blockchain::BlockchainPlatformClient

Blockchain Platform Control Plane API

Attributes

api_client[R]

Client used to make HTTP requests. @return [OCI::ApiClient]

endpoint[R]

Fully qualified endpoint URL @return [String]

region[R]

The region, which will usually correspond to a value in {OCI::Regions::REGION_ENUM}. @return [String]

retry_config[R]

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 @return [OCI::Retry::RetryConfig]

Public Class Methods

new(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) click to toggle source

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.

@param [Config] config A Config object. @param [String] region A region used to determine the service endpoint. This will usually

correspond to a value in {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.

@param [String] endpoint The fully qualified endpoint URL @param [OCI::BaseSigner] signer 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

@param [OCI::ApiClientProxySettings] proxy_settings 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

@param [OCI::Retry::RetryConfig] retry_config 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
# File lib/oci/blockchain/blockchain_platform_client.rb, line 53
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

Public Instance Methods

change_blockchain_platform_compartment(blockchain_platform_id, change_blockchain_platform_compartment_details, opts = {}) click to toggle source

Change Blockchain Platform Compartment @param [String] blockchain_platform_id Unique service identifier. @param [OCI::Blockchain::Models::ChangeBlockchainPlatformCompartmentDetails] change_blockchain_platform_compartment_details Input payload to move the resource to a different compartment.

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/change_blockchain_platform_compartment.rb.html) to see an example of how to use change_blockchain_platform_compartment API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 123
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 = {}) click to toggle source

Creates a new Blockchain Platform.

@param [OCI::Blockchain::Models::CreateBlockchainPlatformDetails] create_blockchain_platform_details Details for the new service. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_retry_token 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.

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/create_blockchain_platform.rb.html) to see an example of how to use create_blockchain_platform API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 187
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 = {}) click to toggle source

Create Blockchain Platform Osn @param [String] blockchain_platform_id Unique service identifier. @param [OCI::Blockchain::Models::CreateOsnDetails] create_osn_details Input payload to create blockchain platform OSN. The payload cannot be empty.

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/create_osn.rb.html) to see an example of how to use create_osn API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 255
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 = {}) click to toggle source

Create Blockchain Platform Peer @param [String] blockchain_platform_id Unique service identifier. @param [OCI::Blockchain::Models::CreatePeerDetails] create_peer_details Input payload to create a blockchain platform peer. The payload cannot be empty.

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/create_peer.rb.html) to see an example of how to use create_peer API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 320
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 = {}) click to toggle source

Delete a particular of a Blockchain Platform @param [String] blockchain_platform_id Unique service identifier. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :if_match 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/delete_blockchain_platform.rb.html) to see an example of how to use delete_blockchain_platform API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 382
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]
  # rubocop:enable Style/NegatedIf

  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 = {}) click to toggle source

Delete a particular OSN of a Blockchain Platform @param [String] blockchain_platform_id Unique service identifier. @param [String] osn_id OSN identifier. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :if_match 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/delete_osn.rb.html) to see an example of how to use delete_osn API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 443
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 = {}) click to toggle source

Delete a particular peer of a Blockchain Platform @param [String] blockchain_platform_id Unique service identifier. @param [String] peer_id Peer identifier. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :if_match 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/delete_peer.rb.html) to see an example of how to use delete_peer API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 506
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]
  # rubocop:enable Style/NegatedIf

  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 = {}) click to toggle source

Attempts to cancel the work request with the given ID. @param [String] work_request_id The ID of the asynchronous request. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :if_match 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/delete_work_request.rb.html) to see an example of how to use delete_work_request API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 568
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 = {}) click to toggle source

Gets information about a Blockchain Platform identified by the specific id @param [String] blockchain_platform_id Unique service identifier. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::Blockchain::Models::BlockchainPlatform BlockchainPlatform} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/get_blockchain_platform.rb.html) to see an example of how to use get_blockchain_platform API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 622
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 = {}) click to toggle source

Gets information about an OSN identified by the specific id @param [String] blockchain_platform_id Unique service identifier. @param [String] osn_id OSN identifier. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::Blockchain::Models::Osn Osn} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/get_osn.rb.html) to see an example of how to use get_osn API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 677
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 = {}) click to toggle source

Gets information about a peer identified by the specific id @param [String] blockchain_platform_id Unique service identifier. @param [String] peer_id Peer identifier. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::Blockchain::Models::Peer Peer} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/get_peer.rb.html) to see an example of how to use get_peer API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 734
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 = {}) click to toggle source

Gets the status of the work request with the given ID. @param [String] work_request_id The ID of the asynchronous request. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::Blockchain::Models::WorkRequest WorkRequest} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/get_work_request.rb.html) to see an example of how to use get_work_request API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 790
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_platforms(compartment_id, opts = {}) click to toggle source

Returns a list Blockchain Platform Instances in a compartment @param [String] compartment_id The ID of the compartment in which to list resources. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.

Example: `My new resource`

@option opts [String] :page The page at which to start retrieving results. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'. (default to ASC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by 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)
Allowed values are: timeCreated, displayName

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :lifecycle_state A filter to only return resources that match the given lifecycle state.

The state value is case-insensitive.

@return [Response] A Response object with data of type {OCI::Blockchain::Models::BlockchainPlatformCollection BlockchainPlatformCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/list_blockchain_platforms.rb.html) to see an example of how to use list_blockchain_platforms API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 857
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 = {}) click to toggle source

List Blockchain Platform OSNs @param [String] blockchain_platform_id Unique service identifier. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.

Example: `My new resource`

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'. (default to ASC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by 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)
Allowed values are: timeCreated, displayName

@option opts [String] :page The page at which to start retrieving results. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @return [Response] A Response object with data of type {OCI::Blockchain::Models::OsnCollection OsnCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/list_osns.rb.html) to see an example of how to use list_osns API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 945
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 = {}) click to toggle source

List Blockchain Platform Peers @param [String] blockchain_platform_id Unique service identifier. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.

Example: `My new resource`

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'. (default to ASC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by 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)
Allowed values are: timeCreated, displayName

@option opts [String] :page The page at which to start retrieving results. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @return [Response] A Response object with data of type {OCI::Blockchain::Models::PeerCollection PeerCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/list_peers.rb.html) to see an example of how to use list_peers API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 1030
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 = {}) click to toggle source

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

@param [String] work_request_id The ID of the asynchronous request. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :page The page at which to start retrieving results. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @return [Response] A Response object with data of type {OCI::Blockchain::Models::WorkRequestErrorCollection WorkRequestErrorCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/list_work_request_errors.rb.html) to see an example of how to use list_work_request_errors API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 1102
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 = {}) click to toggle source

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

@param [String] work_request_id The ID of the asynchronous request. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :page The page at which to start retrieving results. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @return [Response] A Response object with data of type {OCI::Blockchain::Models::WorkRequestLogEntryCollection WorkRequestLogEntryCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/list_work_request_logs.rb.html) to see an example of how to use list_work_request_logs API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 1161
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 = {}) click to toggle source

Lists the work requests in a compartment.

@param [String] compartment_id The ID of the compartment in which to list resources. @param [String] blockchain_platform_id Unique service identifier. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'. (default to ASC)

Allowed values are: ASC, DESC

@option opts [String] :sort_by 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)
Allowed values are: timeStarted, workRequestId

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :page The page at which to start retrieving results. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @return [Response] A Response object with data of type {OCI::Blockchain::Models::WorkRequestCollection WorkRequestCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/list_work_requests.rb.html) to see an example of how to use list_work_requests API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 1226
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
logger() click to toggle source

@return [Logger] The logger for this client. May be nil.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 92
def logger
  @api_client.config.logger
end
preview_scale_blockchain_platform(blockchain_platform_id, scale_blockchain_platform_details, opts = {}) click to toggle source

Preview Scale Blockchain Platform @param [String] blockchain_platform_id Unique service identifier. @param [OCI::Blockchain::Models::ScaleBlockchainPlatformDetails] scale_blockchain_platform_details Input payload to scaleout blockchain platform. The payload cannot be empty.

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::Blockchain::Models::ScaledBlockchainPlatformPreview ScaledBlockchainPlatformPreview} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/preview_scale_blockchain_platform.rb.html) to see an example of how to use preview_scale_blockchain_platform API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 1296
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
region=(new_region) click to toggle source

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

# File lib/oci/blockchain/blockchain_platform_client.rb, line 82
def region=(new_region)
  @region = new_region

  raise 'A region must be specified.' unless @region

  @endpoint = OCI::Regions.get_service_endpoint_for_template(@region, 'https://blockchain.{region}.oci.{secondLevelDomain}') + '/20191010'
  logger.info "BlockchainPlatformClient endpoint set to '#{@endpoint} from region #{@region}'." if logger
end
scale_blockchain_platform(blockchain_platform_id, scale_blockchain_platform_details, opts = {}) click to toggle source

Scale Blockchain Platform @param [String] blockchain_platform_id Unique service identifier. @param [OCI::Blockchain::Models::ScaleBlockchainPlatformDetails] scale_blockchain_platform_details Input payload to scaleout blockchain platform. The payload cannot be empty.

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/scale_blockchain_platform.rb.html) to see an example of how to use scale_blockchain_platform API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 1365
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 = {}) click to toggle source

Start a Blockchain Platform @param [String] blockchain_platform_id Unique service identifier. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/start_blockchain_platform.rb.html) to see an example of how to use start_blockchain_platform API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 1434
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 = {}) click to toggle source

Stop a Blockchain Platform @param [String] blockchain_platform_id Unique service identifier. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/stop_blockchain_platform.rb.html) to see an example of how to use stop_blockchain_platform API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 1502
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 = {}) click to toggle source

Update a particular of a Blockchain Platform @param [OCI::Blockchain::Models::UpdateBlockchainPlatformDetails] update_blockchain_platform_details The Blockchain Platform fields to update. Fields that are not provided will not be updated. @param [String] blockchain_platform_id Unique service identifier. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :if_match 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.

@option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/update_blockchain_platform.rb.html) to see an example of how to use update_blockchain_platform API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 1571
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 = {}) click to toggle source

Update Blockchain Platform OSN @param [String] blockchain_platform_id Unique service identifier. @param [String] osn_id OSN identifier. @param [OCI::Blockchain::Models::UpdateOsnDetails] update_osn_details Input payload to update a blockchain platform OSN. The payload cannot be empty.

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/update_osn.rb.html) to see an example of how to use update_osn API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 1643
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 = {}) click to toggle source

Update Blockchain Platform Peer @param [String] blockchain_platform_id Unique service identifier. @param [String] peer_id Peer identifier. @param [OCI::Blockchain::Models::UpdatePeerDetails] update_peer_details Input payload to update a blockchain platform peer. The payload cannot be empty.

@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/blockchain/update_peer.rb.html) to see an example of how to use update_peer API.

# File lib/oci/blockchain/blockchain_platform_client.rb, line 1717
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

Private Instance Methods

applicable_retry_config(opts = {}) click to toggle source

rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists rubocop:enable Metrics/MethodLength, Layout/EmptyLines

# File lib/oci/blockchain/blockchain_platform_client.rb, line 1765
def applicable_retry_config(opts = {})
  return @retry_config unless opts.key?(:retry_config)

  opts[:retry_config]
end