class OCI::DatabaseMigration::DatabaseMigrationClient

Use the Oracle Cloud Infrastructure Database Migration APIs to perform database migration operations.

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 DatabaseMigrationClient. 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/database_migration/database_migration_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 + '/20200720'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "DatabaseMigrationClient endpoint set to '#{@endpoint}'." if logger
end

Public Instance Methods

abort_job(job_id, opts = {}) click to toggle source

Aborts a Migration Job (either Evaluation or Migration).

@param [String] job_id The OCID of the job

@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_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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

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

# File lib/oci/database_migration/database_migration_client.rb, line 125
def abort_job(job_id, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#abort_job.' if logger

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

  path = '/jobs/{jobId}/actions/abort'.sub('{jobId}', job_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-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 = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DatabaseMigrationClient#abort_job') 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::DatabaseMigration::Models::Job'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
change_agent_compartment(agent_id, change_agent_compartment_details, opts = {}) click to toggle source

Used to configure an ODMS Agent Compartment ID.

@param [String] agent_id The OCID of the agent

@param [OCI::DatabaseMigration::Models::ChangeAgentCompartmentDetails] change_agent_compartment_details Details to change the 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] :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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

@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/databasemigration/change_agent_compartment.rb.html) to see an example of how to use change_agent_compartment API.

# File lib/oci/database_migration/database_migration_client.rb, line 200
def change_agent_compartment(agent_id, change_agent_compartment_details, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#change_agent_compartment.' if logger

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

  path = '/agents/{agentId}/actions/changeCompartment'.sub('{agentId}', agent_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-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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_agent_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DatabaseMigrationClient#change_agent_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
change_connection_compartment(connection_id, change_connection_compartment_details, opts = {}) click to toggle source

Used to change the Database Connection compartment.

@param [String] connection_id The OCID of the database connection

@param [OCI::DatabaseMigration::Models::ChangeConnectionCompartmentDetails] change_connection_compartment_details Details to change the 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] :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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

@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/databasemigration/change_connection_compartment.rb.html) to see an example of how to use change_connection_compartment API.

# File lib/oci/database_migration/database_migration_client.rb, line 275
def change_connection_compartment(connection_id, change_connection_compartment_details, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#change_connection_compartment.' if logger

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

  path = '/connections/{connectionId}/actions/changeCompartment'.sub('{connectionId}', connection_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-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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_connection_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DatabaseMigrationClient#change_connection_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
change_migration_compartment(migration_id, change_migration_compartment_details, opts = {}) click to toggle source

Used to change the Migration compartment.

@param [String] migration_id The OCID of the migration

@param [OCI::DatabaseMigration::Models::ChangeMigrationCompartmentDetails] change_migration_compartment_details Details to change the 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] :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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

@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/databasemigration/change_migration_compartment.rb.html) to see an example of how to use change_migration_compartment API.

# File lib/oci/database_migration/database_migration_client.rb, line 350
def change_migration_compartment(migration_id, change_migration_compartment_details, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#change_migration_compartment.' if logger

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

  path = '/migrations/{migrationId}/actions/changeCompartment'.sub('{migrationId}', migration_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-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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_migration_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DatabaseMigrationClient#change_migration_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
clone_migration(migration_id, clone_migration_details, opts = {}) click to toggle source

Clone a configuration from an existing Migration.

@param [String] migration_id The OCID of the migration

@param [OCI::DatabaseMigration::Models::CloneMigrationDetails] clone_migration_details Clone Migration properties.

@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_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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

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

# File lib/oci/database_migration/database_migration_client.rb, line 425
def clone_migration(migration_id, clone_migration_details, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#clone_migration.' if logger

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

  path = '/migrations/{migrationId}/actions/clone'.sub('{migrationId}', migration_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-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(clone_migration_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DatabaseMigrationClient#clone_migration') 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::DatabaseMigration::Models::Migration'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
create_connection(create_connection_details, opts = {}) click to toggle source

Create a Database Connection resource that contains the details to connect to either a Source or Target Database in the migration.

@param [OCI::DatabaseMigration::Models::CreateConnectionDetails] create_connection_details Database Connection properties.

@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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

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

# File lib/oci/database_migration/database_migration_client.rb, line 494
def create_connection(create_connection_details, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#create_connection.' if logger

  raise "Missing the required parameter 'create_connection_details' when calling create_connection." if create_connection_details.nil?

  path = '/connections'
  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_connection_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DatabaseMigrationClient#create_connection') 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::DatabaseMigration::Models::Connection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
create_migration(create_migration_details, opts = {}) click to toggle source

Create a Migration resource that contains all the details to perform the database migration operation, such as source and destination database details, credentials, etc.

@param [OCI::DatabaseMigration::Models::CreateMigrationDetails] create_migration_details Migration properties.

@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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

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

# File lib/oci/database_migration/database_migration_client.rb, line 561
def create_migration(create_migration_details, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#create_migration.' if logger

  raise "Missing the required parameter 'create_migration_details' when calling create_migration." if create_migration_details.nil?

  path = '/migrations'
  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_migration_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DatabaseMigrationClient#create_migration') 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::DatabaseMigration::Models::Migration'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
delete_agent(agent_id, opts = {}) click to toggle source

Delete the ODMS Agent represented by the specified ODMS Agent ID.

@param [String] agent_id The OCID of the agent

@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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

@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/databasemigration/delete_agent.rb.html) to see an example of how to use delete_agent API.

# File lib/oci/database_migration/database_migration_client.rb, line 626
def delete_agent(agent_id, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#delete_agent.' if logger

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

  path = '/agents/{agentId}'.sub('{agentId}', agent_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: 'DatabaseMigrationClient#delete_agent') 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_connection(connection_id, opts = {}) click to toggle source

Deletes the Database Connection represented by the specified connection ID.

@param [String] connection_id The OCID of the database connection

@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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

@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/databasemigration/delete_connection.rb.html) to see an example of how to use delete_connection API.

# File lib/oci/database_migration/database_migration_client.rb, line 690
def delete_connection(connection_id, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#delete_connection.' if logger

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

  path = '/connections/{connectionId}'.sub('{connectionId}', connection_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: 'DatabaseMigrationClient#delete_connection') 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_job(job_id, opts = {}) click to toggle source

Deletes the migration job represented by the given job ID.

@param [String] job_id The OCID of the job

@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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

@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/databasemigration/delete_job.rb.html) to see an example of how to use delete_job API.

# File lib/oci/database_migration/database_migration_client.rb, line 754
def delete_job(job_id, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#delete_job.' if logger

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

  path = '/jobs/{jobId}'.sub('{jobId}', job_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: 'DatabaseMigrationClient#delete_job') 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_migration(migration_id, opts = {}) click to toggle source

Deletes the Migration represented by the specified migration ID.

@param [String] migration_id The OCID of the migration

@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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

@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/databasemigration/delete_migration.rb.html) to see an example of how to use delete_migration API.

# File lib/oci/database_migration/database_migration_client.rb, line 818
def delete_migration(migration_id, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#delete_migration.' if logger

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

  path = '/migrations/{migrationId}'.sub('{migrationId}', migration_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: 'DatabaseMigrationClient#delete_migration') 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
evaluate_migration(migration_id, opts = {}) click to toggle source

Start Validate Migration job.

@param [String] migration_id The OCID of the migration

@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_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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

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

# File lib/oci/database_migration/database_migration_client.rb, line 888
def evaluate_migration(migration_id, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#evaluate_migration.' if logger

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

  path = '/migrations/{migrationId}/actions/validate'.sub('{migrationId}', migration_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-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 = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DatabaseMigrationClient#evaluate_migration') 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::DatabaseMigration::Models::Job'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_agent(agent_id, opts = {}) click to toggle source

Display the ODMS Agent configuration.

@param [String] agent_id The OCID of the agent

@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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

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

# File lib/oci/database_migration/database_migration_client.rb, line 949
def get_agent(agent_id, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#get_agent.' if logger

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

  path = '/agents/{agentId}'.sub('{agentId}', agent_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: 'DatabaseMigrationClient#get_agent') 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::DatabaseMigration::Models::Agent'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_connection(connection_id, opts = {}) click to toggle source

Display Database Connection details.

@param [String] connection_id The OCID of the database connection

@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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

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

# File lib/oci/database_migration/database_migration_client.rb, line 1007
def get_connection(connection_id, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#get_connection.' if logger

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

  path = '/connections/{connectionId}'.sub('{connectionId}', connection_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: 'DatabaseMigrationClient#get_connection') 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::DatabaseMigration::Models::Connection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_job(job_id, opts = {}) click to toggle source

Get a migration job.

@param [String] job_id The OCID of the job

@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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

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

# File lib/oci/database_migration/database_migration_client.rb, line 1065
def get_job(job_id, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#get_job.' if logger

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

  path = '/jobs/{jobId}'.sub('{jobId}', job_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: 'DatabaseMigrationClient#get_job') 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::DatabaseMigration::Models::Job'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_job_output_content(job_id, opts = {}, &block) click to toggle source

Get the migration Job Output content as a String.

@param [String] job_id The OCID of the job

@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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

@option opts [String, IO] :response_target Streaming http body into a file (specified by file name or File object) or IO object if the block is not given @option [Block] &block Streaming http body to the block @return [Response] A Response object with data of type String if response_target and block are not given, otherwise with nil data @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/databasemigration/get_job_output_content.rb.html) to see an example of how to use get_job_output_content API.

# File lib/oci/database_migration/database_migration_client.rb, line 1125
def get_job_output_content(job_id, opts = {}, &block)
  logger.debug 'Calling operation DatabaseMigrationClient#get_job_output_content.' if logger

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

  path = '/jobs/{jobId}/output/content'.sub('{jobId}', job_id.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = opts[:accept] if opts[:accept]
  header_params[:accept] ||= 'application/x-yaml'
  header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding]
  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: 'DatabaseMigrationClient#get_job_output_content') do
    if !block.nil?
      @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: 'Stream',
        &block
      )
    elsif opts[:response_target]
      if opts[:response_target].respond_to? :write
        @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: 'Stream',
          &proc { |chunk, _response| opts[:response_target].write(chunk) }
        )
      elsif opts[:response_target].is_a?(String)
        File.open(opts[:response_target], 'wb') do |output|
          return @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: 'Stream',
            &proc { |chunk, _response| output.write(chunk) }
          )
        end
      end
    else
      @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: 'String'
      )
    end
  end
  # rubocop:enable Metrics/BlockLength
end
get_migration(migration_id, opts = {}) click to toggle source

Display Migration details.

@param [String] migration_id The OCID of the migration

@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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

@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 {OCI::DatabaseMigration::Models::Migration Migration} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/databasemigration/get_migration.rb.html) to see an example of how to use get_migration API.

# File lib/oci/database_migration/database_migration_client.rb, line 1233
def get_migration(migration_id, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#get_migration.' if logger

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

  path = '/migrations/{migrationId}'.sub('{migrationId}', migration_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: 'DatabaseMigrationClient#get_migration') 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::DatabaseMigration::Models::Migration'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_work_request(work_request_id, opts = {}) click to toggle source

Gets the details of a 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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

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

# File lib/oci/database_migration/database_migration_client.rb, line 1292
def get_work_request(work_request_id, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#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: 'DatabaseMigrationClient#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::DatabaseMigration::Models::WorkRequest'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_agent_images(opts = {}) click to toggle source

Get details of the ODMS Agent Images available to install on-premises.

@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 [Integer] :limit The maximum number of items to return.

(default to 10)

@option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

(default to 1)

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

(default to ASC)

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

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

# File lib/oci/database_migration/database_migration_client.rb, line 1354
def list_agent_images(opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#list_agent_images.' if logger


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

  path = '/agentImages'
  operation_signing_strategy = :standard

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

  # 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: 'DatabaseMigrationClient#list_agent_images') 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::DatabaseMigration::Models::AgentImageCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_agents(compartment_id, opts = {}) click to toggle source

Display the name of all the existing ODMS Agents in the server.

@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 [Integer] :limit The maximum number of items to return.

(default to 10)

@option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

(default to 1)

@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] :sort_order The sort order to use, either 'asc' or 'desc'.

(default to ASC)

@option opts [String] :display_name A filter to return only resources that match the entire display name given.

@option opts [String] :lifecycle_state The current state of the Database Migration Deployment.

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

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

# File lib/oci/database_migration/database_migration_client.rb, line 1431
def list_agents(compartment_id, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#list_agents.' if logger

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

  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[:sort_order] && !OCI::DatabaseMigration::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::DatabaseMigration::Models::SORT_ORDERS_ENUM.'
  end

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

  path = '/agents'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  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: 'DatabaseMigrationClient#list_agents') 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::DatabaseMigration::Models::AgentCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_connections(compartment_id, opts = {}) click to toggle source

List all Database Connections.

@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] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

@option opts [String] :display_name A filter to return only resources that match the entire display name given.

@option opts [Integer] :limit The maximum number of items to return.

(default to 10)

@option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

(default to 1)

@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] :sort_order The sort order to use, either 'asc' or 'desc'.

(default to ASC)

@option opts [String] :lifecycle_state The current state of the Database Migration Deployment.

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

# File lib/oci/database_migration/database_migration_client.rb, line 1521
def list_connections(compartment_id, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#list_connections.' if logger

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

  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[:sort_order] && !OCI::DatabaseMigration::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::DatabaseMigration::Models::SORT_ORDERS_ENUM.'
  end

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

  path = '/connections'
  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[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  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: 'DatabaseMigrationClient#list_connections') 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::DatabaseMigration::Models::ConnectionCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_job_outputs(job_id, opts = {}) click to toggle source

List the Job Outputs

@param [String] job_id The OCID of the job

@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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

@option opts [Integer] :limit The maximum number of items to return.

(default to 10)

@option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

(default to 1)

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

# File lib/oci/database_migration/database_migration_client.rb, line 1601
def list_job_outputs(job_id, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#list_job_outputs.' if logger

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

  path = '/jobs/{jobId}/output'.sub('{jobId}', job_id.to_s)
  operation_signing_strategy = :standard

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

  # 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: 'DatabaseMigrationClient#list_job_outputs') 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::DatabaseMigration::Models::JobOutputSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_jobs(migration_id, opts = {}) click to toggle source

List all the names of the Migration jobs associated to the specified migration site.

@param [String] migration_id The ID of the migration 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] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

@option opts [String] :display_name A filter to return only resources that match the entire display name given.

@option opts [Integer] :limit The maximum number of items to return.

(default to 10)

@option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

(default to 1)

@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] :sort_order The sort order to use, either 'asc' or 'desc'.

(default to ASC)

@option opts [String] :lifecycle_state The lifecycle state of the Migration Job.

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

# File lib/oci/database_migration/database_migration_client.rb, line 1676
def list_jobs(migration_id, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#list_jobs.' if logger

  raise "Missing the required parameter 'migration_id' when calling list_jobs." if migration_id.nil?

  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[:sort_order] && !OCI::DatabaseMigration::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::DatabaseMigration::Models::SORT_ORDERS_ENUM.'
  end

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

  path = '/jobs'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:migrationId] = migration_id
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  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: 'DatabaseMigrationClient#list_jobs') 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::DatabaseMigration::Models::JobCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_migrations(compartment_id, opts = {}) click to toggle source

List all Migrations.

@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] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

@option opts [String] :display_name A filter to return only resources that match the entire display name given.

@option opts [Integer] :limit The maximum number of items to return.

(default to 10)

@option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

(default to 1)

@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] :sort_order The sort order to use, either 'asc' or 'desc'.

(default to ASC)

@option opts [String] :lifecycle_state The current state of the Database Migration Deployment.

@option opts [String] :lifecycle_details The lifecycle detailed status of the Migration.

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

# File lib/oci/database_migration/database_migration_client.rb, line 1768
def list_migrations(compartment_id, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#list_migrations.' if logger

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

  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[:sort_order] && !OCI::DatabaseMigration::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::DatabaseMigration::Models::SORT_ORDERS_ENUM.'
  end

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

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

  path = '/migrations'
  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[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:lifecycleDetails] = opts[:lifecycle_details] if opts[:lifecycle_details]

  # 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: 'DatabaseMigrationClient#list_migrations') 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::DatabaseMigration::Models::MigrationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_work_request_errors(work_request_id, opts = {}) click to toggle source

Gets the errors for a 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 [Integer] :limit The maximum number of items to return.

(default to 10)

@option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

(default to 1)

@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] :sort_order The sort order to use, either 'asc' or 'desc'.

(default to ASC)

@option opts [String] :display_name A filter to return only resources that match the entire display name given.

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

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

# File lib/oci/database_migration/database_migration_client.rb, line 1861
def list_work_request_errors(work_request_id, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#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?

  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[:sort_order] && !OCI::DatabaseMigration::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::DatabaseMigration::Models::SORT_ORDERS_ENUM.'
  end
  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[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]

  # 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: 'DatabaseMigrationClient#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::DatabaseMigration::Models::WorkRequestErrorCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_work_request_logs(work_request_id, opts = {}) click to toggle source

Gets the logs for a 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 [Integer] :limit The maximum number of items to return.

(default to 10)

@option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

(default to 1)

@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] :sort_order The sort order to use, either 'asc' or 'desc'.

(default to ASC)

@option opts [String] :display_name A filter to return only resources that match the entire display name given.

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

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

# File lib/oci/database_migration/database_migration_client.rb, line 1944
def list_work_request_logs(work_request_id, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#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?

  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[:sort_order] && !OCI::DatabaseMigration::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::DatabaseMigration::Models::SORT_ORDERS_ENUM.'
  end
  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[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]

  # 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: 'DatabaseMigrationClient#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::DatabaseMigration::Models::WorkRequestLogEntryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_work_requests(compartment_id, opts = {}) click to toggle source

Lists the work requests in a compartment or for a specified resource.

@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] :resource_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource.

(default to resourceId)

@option opts [Integer] :limit The maximum number of items to return.

(default to 10)

@option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

(default to 1)

@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] :sort_order The sort order to use, either 'asc' or 'desc'.

(default to ASC)

@option opts [String] :display_name A filter to return only resources that match the entire display name given.

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

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

# File lib/oci/database_migration/database_migration_client.rb, line 2029
def list_work_requests(compartment_id, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#list_work_requests.' if logger

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

  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[:sort_order] && !OCI::DatabaseMigration::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::DatabaseMigration::Models::SORT_ORDERS_ENUM.'
  end

  path = '/workRequests'
  operation_signing_strategy = :standard

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

  # 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: 'DatabaseMigrationClient#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::DatabaseMigration::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/database_migration/database_migration_client.rb, line 92
def logger
  @api_client.config.logger
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/database_migration/database_migration_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://odms.{region}.oci.{secondLevelDomain}') + '/20200720'
  logger.info "DatabaseMigrationClient endpoint set to '#{@endpoint} from region #{@region}'." if logger
end
resume_job(job_id, opts = {}) click to toggle source

Resume a migration Job.

@param [String] job_id The OCID of the job

@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_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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

@option opts [OCI::DatabaseMigration::Models::ResumeJobDetails] :resume_job_details Resume Job options.

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

# File lib/oci/database_migration/database_migration_client.rb, line 2115
def resume_job(job_id, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#resume_job.' if logger

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

  path = '/jobs/{jobId}/actions/resume'.sub('{jobId}', job_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-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(opts[:resume_job_details])

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DatabaseMigrationClient#resume_job') 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::DatabaseMigration::Models::Job'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
retrieve_supported_phases(migration_id, opts = {}) click to toggle source

Display Migration Phases for a specified migration.

@param [String] migration_id The OCID of the migration

@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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

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

# File lib/oci/database_migration/database_migration_client.rb, line 2176
def retrieve_supported_phases(migration_id, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#retrieve_supported_phases.' if logger

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

  path = '/migrations/{migrationId}/actions/getSupportedPhases'.sub('{migrationId}', migration_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: 'DatabaseMigrationClient#retrieve_supported_phases') 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::DatabaseMigration::Models::MigrationPhaseCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
start_migration(migration_id, opts = {}) click to toggle source

Start Migration job.

@param [String] migration_id The OCID of the migration

@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_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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

@option opts [OCI::DatabaseMigration::Models::StartMigrationDetails] :start_migration_details Start Migration Job properties.

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

# File lib/oci/database_migration/database_migration_client.rb, line 2248
def start_migration(migration_id, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#start_migration.' if logger

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

  path = '/migrations/{migrationId}/actions/start'.sub('{migrationId}', migration_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-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(opts[:start_migration_details])

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DatabaseMigrationClient#start_migration') 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::DatabaseMigration::Models::Job'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
update_agent(agent_id, update_agent_details, opts = {}) click to toggle source

Modifies the ODMS Agent represented by the given ODMS Agent ID.

@param [String] agent_id The OCID of the agent

@param [OCI::DatabaseMigration::Models::UpdateAgentDetails] update_agent_details Update ODMS Agent properties.

@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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

@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] :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 {OCI::DatabaseMigration::Models::Agent Agent} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/databasemigration/update_agent.rb.html) to see an example of how to use update_agent API.

# File lib/oci/database_migration/database_migration_client.rb, line 2323
def update_agent(agent_id, update_agent_details, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#update_agent.' if logger

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

  path = '/agents/{agentId}'.sub('{agentId}', agent_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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(update_agent_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DatabaseMigrationClient#update_agent') 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,
      return_type: 'OCI::DatabaseMigration::Models::Agent'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
update_connection(connection_id, update_connection_details, opts = {}) click to toggle source

Update Database Connection resource details.

@param [String] connection_id The OCID of the database connection

@param [OCI::DatabaseMigration::Models::UpdateConnectionDetails] update_connection_details Database Connection properties.

@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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

@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/databasemigration/update_connection.rb.html) to see an example of how to use update_connection API.

# File lib/oci/database_migration/database_migration_client.rb, line 2393
def update_connection(connection_id, update_connection_details, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#update_connection.' if logger

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

  path = '/connections/{connectionId}'.sub('{connectionId}', connection_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 = @api_client.object_to_http_body(update_connection_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DatabaseMigrationClient#update_connection') 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_job(job_id, update_job_details, opts = {}) click to toggle source

Update Migration Job resource details.

@param [String] job_id The OCID of the job

@param [OCI::DatabaseMigration::Models::UpdateJobDetails] update_job_details Migration Job properties.

@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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

@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 {OCI::DatabaseMigration::Models::Job Job} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/databasemigration/update_job.rb.html) to see an example of how to use update_job API.

# File lib/oci/database_migration/database_migration_client.rb, line 2460
def update_job(job_id, update_job_details, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#update_job.' if logger

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

  path = '/jobs/{jobId}'.sub('{jobId}', job_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 = @api_client.object_to_http_body(update_job_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DatabaseMigrationClient#update_job') 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,
      return_type: 'OCI::DatabaseMigration::Models::Job'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
update_migration(migration_id, update_migration_details, opts = {}) click to toggle source

Update Migration resource details.

@param [String] migration_id The OCID of the migration

@param [OCI::DatabaseMigration::Models::UpdateMigrationDetails] update_migration_details Migration properties.

@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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a

particular request, please provide the request ID.

@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/databasemigration/update_migration.rb.html) to see an example of how to use update_migration API.

# File lib/oci/database_migration/database_migration_client.rb, line 2528
def update_migration(migration_id, update_migration_details, opts = {})
  logger.debug 'Calling operation DatabaseMigrationClient#update_migration.' if logger

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

  path = '/migrations/{migrationId}'.sub('{migrationId}', migration_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 = @api_client.object_to_http_body(update_migration_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DatabaseMigrationClient#update_migration') 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/database_migration/database_migration_client.rb, line 2572
def applicable_retry_config(opts = {})
  return @retry_config unless opts.key?(:retry_config)

  opts[:retry_config]
end