Class: OCI::DistributedDatabase::DistributedDbServiceClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/distributed_database/distributed_db_service_client.rb

Overview

Use the Globally Distributed Database service APIs to create and manage the Globally distributed databases.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

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

This client is not thread-safe

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

Parameters:

  • config (Config) (defaults to: nil)

    A Config object.

  • region (String) (defaults to: nil)

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

  • endpoint (String) (defaults to: nil)

    The fully qualified endpoint URL

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

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

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

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

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

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



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

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

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

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

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

Instance Attribute Details

#api_clientOCI::ApiClient (readonly)

Client used to make HTTP requests.

Returns:



15
16
17
# File 'lib/oci/distributed_database/distributed_db_service_client.rb', line 15

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


19
20
21
# File 'lib/oci/distributed_database/distributed_db_service_client.rb', line 19

def endpoint
  @endpoint
end

#regionString

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

Returns:

  • (String)


29
30
31
# File 'lib/oci/distributed_database/distributed_db_service_client.rb', line 29

def region
  @region
end

#retry_configOCI::Retry::RetryConfig (readonly)

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



25
26
27
# File 'lib/oci/distributed_database/distributed_db_service_client.rb', line 25

def retry_config
  @retry_config
end

Instance Method Details

#add_distributed_database_gds_control_node(distributed_database_id, add_distributed_database_gds_control_node_details, opts = {}) ⇒ Response

Note:

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

Add new Global database services control(GDS CTL) node for the Globally distributed database.

Parameters:

  • distributed_database_id (String)

    Globally distributed database identifier

  • add_distributed_database_gds_control_node_details (OCI::DistributedDatabase::Models::AddDistributedDatabaseGdsControlNodeDetails)

    Details required to provision the new Global database services control(GDS CTL) node for the Distributed database.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :if_match (String)

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

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



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

def add_distributed_database_gds_control_node(distributed_database_id, add_distributed_database_gds_control_node_details, opts = {})
  logger.debug 'Calling operation DistributedDbServiceClient#add_distributed_database_gds_control_node.' if logger

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

  path = '/distributedDatabases/{distributedDatabaseId}/actions/addGdsControlNode'.sub('{distributedDatabaseId}', distributed_database_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(add_distributed_database_gds_control_node_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DistributedDbServiceClient#add_distributed_database_gds_control_node') 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_distributed_database_compartment(change_distributed_database_compartment_details, distributed_database_id, opts = {}) ⇒ Response

Note:

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

Move the Globally distributed database and its dependent resources to the specified compartment.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :if_match (String)

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

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
# File 'lib/oci/distributed_database/distributed_db_service_client.rb', line 197

def change_distributed_database_compartment(change_distributed_database_compartment_details, distributed_database_id, opts = {})
  logger.debug 'Calling operation DistributedDbServiceClient#change_distributed_database_compartment.' if logger

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

  path = '/distributedDatabases/{distributedDatabaseId}/actions/changeCompartment'.sub('{distributedDatabaseId}', distributed_database_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(change_distributed_database_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DistributedDbServiceClient#change_distributed_database_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_distributed_db_backup_config(distributed_database_id, change_distributed_db_backup_config_details, opts = {}) ⇒ Response

Note:

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

Change the DbBackupConfig for the Globally distributed database.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :if_match (String)

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

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
# File 'lib/oci/distributed_database/distributed_db_service_client.rb', line 268

def change_distributed_db_backup_config(distributed_database_id, change_distributed_db_backup_config_details, opts = {})
  logger.debug 'Calling operation DistributedDbServiceClient#change_distributed_db_backup_config.' if logger

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

  path = '/distributedDatabases/{distributedDatabaseId}/actions/changeDbBackupConfig'.sub('{distributedDatabaseId}', distributed_database_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(change_distributed_db_backup_config_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DistributedDbServiceClient#change_distributed_db_backup_config') 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

#configure_distributed_database_gsms(configure_distributed_database_gsms_details, distributed_database_id, opts = {}) ⇒ Response

Note:

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

Configure new Global Service Manager(GSM aka shard manager) instances for the Globally distributed database.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :if_match (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
# File 'lib/oci/distributed_database/distributed_db_service_client.rb', line 339

def configure_distributed_database_gsms(configure_distributed_database_gsms_details, distributed_database_id, opts = {})
  logger.debug 'Calling operation DistributedDbServiceClient#configure_distributed_database_gsms.' if logger

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

  path = '/distributedDatabases/{distributedDatabaseId}/actions/configureGsms'.sub('{distributedDatabaseId}', distributed_database_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(configure_distributed_database_gsms_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DistributedDbServiceClient#configure_distributed_database_gsms') 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

#configure_distributed_database_sharding(distributed_database_id, opts = {}) ⇒ Response

Note:

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

Once all components of Globally distributed database are provisioned, and signed GSM certificates are successfully uploaded, this api shall be invoked to configure sharding on the Globally distributed database. Note that this 'ConfigureSharding' API also needs to be invoked after successfully adding a new shard to the Globally distributed database using PATCH api. If this API is not invoked after successfully adding a new shard, then that new shard will not be a participant in sharding topology of the Globally distributed database.

Parameters:

  • distributed_database_id (String)

    Globally distributed database identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :is_rebalance_required (BOOLEAN)

    The flag to indicate whether chunks need to be re-balanced. This flag is not applicable for USER-defined sharding type. (default to true)

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :if_match (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
# File 'lib/oci/distributed_database/distributed_db_service_client.rb', line 416

def configure_distributed_database_sharding(distributed_database_id, opts = {})
  logger.debug 'Calling operation DistributedDbServiceClient#configure_distributed_database_sharding.' if logger

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

  path = '/distributedDatabases/{distributedDatabaseId}/actions/configureSharding'.sub('{distributedDatabaseId}', distributed_database_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:isRebalanceRequired] = opts[:is_rebalance_required] if !opts[:is_rebalance_required].nil?

  # 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 = nil

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

#create_distributed_database(create_distributed_database_details, opts = {}) ⇒ Response

Note:

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

Creates a Globally distributed database.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
# File 'lib/oci/distributed_database/distributed_db_service_client.rb', line 480

def create_distributed_database(create_distributed_database_details, opts = {})
  logger.debug 'Calling operation DistributedDbServiceClient#create_distributed_database.' if logger

  raise "Missing the required parameter 'create_distributed_database_details' when calling create_distributed_database." if create_distributed_database_details.nil?

  path = '/distributedDatabases'
  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_distributed_database_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DistributedDbServiceClient#create_distributed_database') 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::DistributedDatabase::Models::DistributedDatabase'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_distributed_database(distributed_database_id, opts = {}) ⇒ Response

Note:

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

Terminate the given Globally distributed databases.

Parameters:

  • distributed_database_id (String)

    Globally distributed database identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

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

  • :if_match (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
# File 'lib/oci/distributed_database/distributed_db_service_client.rb', line 548

def delete_distributed_database(distributed_database_id, opts = {})
  logger.debug 'Calling operation DistributedDbServiceClient#delete_distributed_database.' if logger

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

  path = '/distributedDatabases/{distributedDatabaseId}'.sub('{distributedDatabaseId}', distributed_database_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 = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DistributedDbServiceClient#delete_distributed_database') 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

#download_distributed_database_gsm_certificate_signing_request(distributed_database_id, opts = {}, &block) ⇒ Response

Note:

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

Generate the common certificate signing request for GSMs. Download the <globaldb-prefix>.csr file from API response. Users can use this .csr file to generate the CA signed certificate, and as a next step use 'uploadSignedCertificateAndGenerateWallet' API to upload the CA signed certificate to GSM, and generate wallets for the GSM instances of the Globally distributed database.

Parameters:

  • distributed_database_id (String)

    Globally distributed database identifier

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

    the optional parameters

  • [Block] (Hash)

    a customizable set of options

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :if_match (String)

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

  • :opc_retry_token (String)

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

  • :response_target (String, IO)

    Streaming http body into a file (specified by file name or File object) or IO object if the block is not given

Returns:

  • (Response)

    A Response object with data of type String if response_target and block are not given, otherwise with nil data



622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
# File 'lib/oci/distributed_database/distributed_db_service_client.rb', line 622

def download_distributed_database_gsm_certificate_signing_request(distributed_database_id, opts = {}, &block)
  logger.debug 'Calling operation DistributedDbServiceClient#download_distributed_database_gsm_certificate_signing_request.' if logger

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

  path = '/distributedDatabases/{distributedDatabaseId}/actions/downloadGsmCertificateSigningRequest'.sub('{distributedDatabaseId}', distributed_database_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/octet-stream'
  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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DistributedDbServiceClient#download_distributed_database_gsm_certificate_signing_request') do
    if !block.nil?
      @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: 'Stream',
        &block
      )
    elsif opts[:response_target]
      if opts[:response_target].respond_to? :write
        @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: '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(
            :POST,
            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(
        :POST,
        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

#generate_distributed_database_gsm_certificate_signing_request(distributed_database_id, ca_bundle_id, opts = {}) ⇒ Response

Note:

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

Generate the certificate signing request for GSM instances of the Globally distributed database. Once certificate signing request is generated, then customers can download the certificate signing request using 'downloadGsmCertificateSigningRequest' api call.

Parameters:

  • distributed_database_id (String)

    Globally distributed database identifier

  • ca_bundle_id (String)

    The ID of the Ca Bundle.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :if_match (String)

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

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
# File 'lib/oci/distributed_database/distributed_db_service_client.rb', line 739

def generate_distributed_database_gsm_certificate_signing_request(distributed_database_id, ca_bundle_id, opts = {})
  logger.debug 'Calling operation DistributedDbServiceClient#generate_distributed_database_gsm_certificate_signing_request.' if logger

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

  path = '/distributedDatabases/{distributedDatabaseId}/actions/generateGsmCertificateSigningRequest'.sub('{distributedDatabaseId}', distributed_database_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:caBundleId] = ca_bundle_id

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DistributedDbServiceClient#generate_distributed_database_gsm_certificate_signing_request') 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

#generate_distributed_database_wallet(distributed_database_id, generate_distributed_database_wallet_details, opts = {}, &block) ⇒ Response

Note:

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

Generate the wallet associated with Globally distributed database.

Parameters:

  • distributed_database_id (String)

    Globally distributed database identifier

  • generate_distributed_database_wallet_details (OCI::DistributedDatabase::Models::GenerateDistributedDatabaseWalletDetails)

    Details for generating Globally distributed database wallet.

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

    the optional parameters

  • [Block] (Hash)

    a customizable set of options

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :if_match (String)

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

  • :opc_retry_token (String)

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

  • :response_target (String, IO)

    Streaming http body into a file (specified by file name or File object) or IO object if the block is not given

Returns:

  • (Response)

    A Response object with data of type String if response_target and block are not given, otherwise with nil data



813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
# File 'lib/oci/distributed_database/distributed_db_service_client.rb', line 813

def generate_distributed_database_wallet(distributed_database_id, generate_distributed_database_wallet_details, opts = {}, &block)
  logger.debug 'Calling operation DistributedDbServiceClient#generate_distributed_database_wallet.' if logger

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

  path = '/distributedDatabases/{distributedDatabaseId}/actions/generateWallet'.sub('{distributedDatabaseId}', distributed_database_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/octet-stream'
  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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(generate_distributed_database_wallet_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DistributedDbServiceClient#generate_distributed_database_wallet') do
    if !block.nil?
      @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: 'Stream',
        &block
      )
    elsif opts[:response_target]
      if opts[:response_target].respond_to? :write
        @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: '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(
            :POST,
            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(
        :POST,
        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_distributed_database(distributed_database_id, opts = {}) ⇒ Response

Note:

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

Gets the details of the Globally distributed database identified by given id.

Parameters:

  • distributed_database_id (String)

    Globally distributed database identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :metadata (String)

    Comma separated names of argument corresponding to which metadata need to be retrived.

  • :if_none_match (String)

    For conditional requests. In the GET call for a resource, set the If-None-Match header to the value of the ETag from a previous GET (or POST or PUT) response for that resource. The server will return with either a 304 Not Modified response if the resource has not changed, or a 200 OK response with the updated representation.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
# File 'lib/oci/distributed_database/distributed_db_service_client.rb', line 924

def get_distributed_database(distributed_database_id, opts = {})
  logger.debug 'Calling operation DistributedDbServiceClient#get_distributed_database.' if logger

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

  path = '/distributedDatabases/{distributedDatabaseId}'.sub('{distributedDatabaseId}', distributed_database_id.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-none-match'] = opts[:if_none_match] if opts[:if_none_match]
  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: 'DistributedDbServiceClient#get_distributed_database') 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::DistributedDatabase::Models::DistributedDatabase'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

List of Globally distributed databases.

Allowed values are: timeCreated, timeUpdated

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

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

    the optional parameters

Options Hash (opts):

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

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

  • :lifecycle_state (String)

    A filter to return only resources their lifecycleState matches the given lifecycleState.

  • :limit (Integer)

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

  • :page (String)

    A token representing the position at which to start retrieving results. This must come from the opc-next-page header field of a previous response.

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'.

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. (default to timeCreated)

  • :opc_request_id (String)

    The client request ID for tracing.

  • :display_name (String)

    A filter to return only Globally distributed databases that match the entire name given. The match is not case sensitive.

  • :db_deployment_type (String)

    A filter to return only resources their dbDeploymentType matches the given dbDeploymentType.

  • :metadata (String)

    Comma separated names of argument corresponding to which metadata need to be retrived.

Returns:



992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
# File 'lib/oci/distributed_database/distributed_db_service_client.rb', line 992

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

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

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

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

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

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

  path = '/distributedDatabases'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  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]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:dbDeploymentType] = opts[:db_deployment_type] if opts[:db_deployment_type]
  query_params[:metadata] = opts[:metadata] if opts[:metadata]

  # 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: 'DistributedDbServiceClient#list_distributed_databases') 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::DistributedDatabase::Models::DistributedDatabaseCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#loggerLogger

Returns The logger for this client. May be nil.

Returns:

  • (Logger)

    The logger for this client. May be nil.



94
95
96
# File 'lib/oci/distributed_database/distributed_db_service_client.rb', line 94

def logger
  @api_client.config.logger
end

#patch_distributed_database(distributed_database_id, patch_distributed_database_details, opts = {}) ⇒ Response

Note:

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

Patch operation to add, remove or update shards to the Globally distributed database topology. In single patch operation, multiple shards can be either added, or removed or updated. Combination of inserts, update and remove in single operation is not allowed.

Parameters:

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
# File 'lib/oci/distributed_database/distributed_db_service_client.rb', line 1086

def patch_distributed_database(distributed_database_id, patch_distributed_database_details, opts = {})
  logger.debug 'Calling operation DistributedDbServiceClient#patch_distributed_database.' if logger

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

  path = '/distributedDatabases/{distributedDatabaseId}'.sub('{distributedDatabaseId}', distributed_database_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(patch_distributed_database_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DistributedDbServiceClient#patch_distributed_database') do
    @api_client.call_api(
      :PATCH,
      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

#rotate_distributed_database_passwords(distributed_database_id, opts = {}) ⇒ Response

Note:

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

Rotate passwords for different components of the Globally distributed database.

Parameters:

  • distributed_database_id (String)

    Globally distributed database identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :if_match (String)

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

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
# File 'lib/oci/distributed_database/distributed_db_service_client.rb', line 1155

def rotate_distributed_database_passwords(distributed_database_id, opts = {})
  logger.debug 'Calling operation DistributedDbServiceClient#rotate_distributed_database_passwords.' if logger

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

  path = '/distributedDatabases/{distributedDatabaseId}/actions/rotateDbPasswords'.sub('{distributedDatabaseId}', distributed_database_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

#start_distributed_database(distributed_database_id, opts = {}) ⇒ Response

Note:

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

Start the shards, catalog and GSMs of Globally distributed database.

Parameters:

  • distributed_database_id (String)

    Globally distributed database identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :if_match (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
# File 'lib/oci/distributed_database/distributed_db_service_client.rb', line 1223

def start_distributed_database(distributed_database_id, opts = {})
  logger.debug 'Calling operation DistributedDbServiceClient#start_distributed_database.' if logger

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

  path = '/distributedDatabases/{distributedDatabaseId}/actions/startDatabase'.sub('{distributedDatabaseId}', distributed_database_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 = nil

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

#stop_distributed_database(distributed_database_id, opts = {}) ⇒ Response

Note:

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

Stop the shards, catalog and GSM instances for the Globally distributed database.

Parameters:

  • distributed_database_id (String)

    Globally distributed database identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :if_match (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
# File 'lib/oci/distributed_database/distributed_db_service_client.rb', line 1291

def stop_distributed_database(distributed_database_id, opts = {})
  logger.debug 'Calling operation DistributedDbServiceClient#stop_distributed_database.' if logger

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

  path = '/distributedDatabases/{distributedDatabaseId}/actions/stopDatabase'.sub('{distributedDatabaseId}', distributed_database_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 = nil

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

#update_distributed_database(distributed_database_id, update_distributed_database_details, opts = {}) ⇒ Response

Note:

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

Updates the configuration of the Globally distributed database.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :if_match (String)

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

Returns:



1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
# File 'lib/oci/distributed_database/distributed_db_service_client.rb', line 1355

def update_distributed_database(distributed_database_id, update_distributed_database_details, opts = {})
  logger.debug 'Calling operation DistributedDbServiceClient#update_distributed_database.' if logger

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

  path = '/distributedDatabases/{distributedDatabaseId}'.sub('{distributedDatabaseId}', distributed_database_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_distributed_database_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DistributedDbServiceClient#update_distributed_database') 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::DistributedDatabase::Models::DistributedDatabase'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#upload_distributed_database_signed_certificate_and_generate_wallet(distributed_database_id, upload_distributed_database_signed_certificate_and_generate_wallet_details, opts = {}) ⇒ Response

Note:

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

Upload the CA signed certificate to the GSM instances and generate wallets for GSM instances of the Globally distributed database. Customer shall provide the CA signed certificate key details by adding the certificate in request body.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :if_match (String)

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

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
# File 'lib/oci/distributed_database/distributed_db_service_client.rb', line 1429

def upload_distributed_database_signed_certificate_and_generate_wallet(distributed_database_id, upload_distributed_database_signed_certificate_and_generate_wallet_details, opts = {})
  logger.debug 'Calling operation DistributedDbServiceClient#upload_distributed_database_signed_certificate_and_generate_wallet.' if logger

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

  path = '/distributedDatabases/{distributedDatabaseId}/actions/uploadSignedCertificateAndGenerateWallet'.sub('{distributedDatabaseId}', distributed_database_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(upload_distributed_database_signed_certificate_and_generate_wallet_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DistributedDbServiceClient#upload_distributed_database_signed_certificate_and_generate_wallet') 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

#validate_distributed_database_network(distributed_database_id, opts = {}) ⇒ Response

Note:

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

Validate the network connectivity between components of the globally distributed database.

Parameters:

  • distributed_database_id (String)

    Globally distributed database identifier

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

    the optional parameters

Options Hash (opts):

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

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

  • :is_surrogate (BOOLEAN)

    Determines the surrogates check. Default is true. (default to true)

  • :resource_name (String)

    Specify the name of shard or catalog.

  • :shard_group (String)

    The shardGroup name example ShardGroupA, ShardGroupB.

  • :if_match (String)

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
# File 'lib/oci/distributed_database/distributed_db_service_client.rb', line 1504

def validate_distributed_database_network(distributed_database_id, opts = {})
  logger.debug 'Calling operation DistributedDbServiceClient#validate_distributed_database_network.' if logger

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

  path = '/distributedDatabases/{distributedDatabaseId}/actions/validateNetwork'.sub('{distributedDatabaseId}', distributed_database_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:isSurrogate] = opts[:is_surrogate] if !opts[:is_surrogate].nil?
  query_params[:resourceName] = opts[:resource_name] if opts[:resource_name]
  query_params[:shardGroup] = opts[:shard_group] if opts[:shard_group]

  # 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: 'DistributedDbServiceClient#validate_distributed_database_network') 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