Class: OCI::DatabaseManagement::DbManagementClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/database_management/db_management_client.rb

Overview

Use the Database Management API to perform tasks such as obtaining performance and resource usage metrics for a fleet of Managed Databases or a specific Managed Database, creating Managed Database Groups, and running a SQL job on a Managed Database or Managed Database Group.

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) ⇒ DbManagementClient

Creates a new DbManagementClient. 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:

  • (defaults to: nil)

    A Config object.

  • (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.

  • (defaults to: nil)

    The fully qualified endpoint URL

  • (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

  • (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

  • (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/database_management/db_management_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 + '/20201101'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "DbManagementClient 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/database_management/db_management_client.rb', line 15

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:



19
20
21
# File 'lib/oci/database_management/db_management_client.rb', line 19

def endpoint
  @endpoint
end

#regionString

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

Returns:



29
30
31
# File 'lib/oci/database_management/db_management_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

Returns:



25
26
27
# File 'lib/oci/database_management/db_management_client.rb', line 25

def retry_config
  @retry_config
end

Instance Method Details

#add_managed_database_to_managed_database_group(managed_database_group_id, add_managed_database_to_managed_database_group_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/databasemanagement/add_managed_database_to_managed_database_group.rb.html) to see an example of how to use add_managed_database_to_managed_database_group API.

Adds a Managed Database to a specific Managed Database Group. After the database is added, it will be included in the management activities performed on the Managed Database Group.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

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

Returns:

  • A Response object with data of type nil



121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/oci/database_management/db_management_client.rb', line 121

def add_managed_database_to_managed_database_group(managed_database_group_id, add_managed_database_to_managed_database_group_details, opts = {})
  logger.debug 'Calling operation DbManagementClient#add_managed_database_to_managed_database_group.' if logger

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

  path = '/managedDatabaseGroups/{managedDatabaseGroupId}/actions/addManagedDatabase'.sub('{managedDatabaseGroupId}', managed_database_group_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(add_managed_database_to_managed_database_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DbManagementClient#add_managed_database_to_managed_database_group') 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_database_parameters(managed_database_id, change_database_parameters_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/databasemanagement/change_database_parameters.rb.html) to see an example of how to use change_database_parameters API.

Changes database parameter values. There are two kinds of database parameters:

  • Dynamic parameters: They can be changed for the current Oracle

Database instance. The changes take effect immediately.

  • Static parameters: They cannot be changed for the current instance.

You must change these parameters and then restart the database before changes take effect.

Note: If the instance is started using a text initialization parameter file, the parameter changes are applicable only for the current instance. You must update them manually to be passed to a future instance.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

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

Returns:



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/database_management/db_management_client.rb', line 197

def change_database_parameters(managed_database_id, change_database_parameters_details, opts = {})
  logger.debug 'Calling operation DbManagementClient#change_database_parameters.' if logger

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

  path = '/managedDatabases/{managedDatabaseId}/actions/changeDatabaseParameters'.sub('{managedDatabaseId}', managed_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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_database_parameters_details)

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

#change_job_compartment(job_id, change_job_compartment_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/databasemanagement/change_job_compartment.rb.html) to see an example of how to use change_job_compartment API.

Moves a job.

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:

  • 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/database_management/db_management_client.rb', line 268

def change_job_compartment(job_id, change_job_compartment_details, opts = {})
  logger.debug 'Calling operation DbManagementClient#change_job_compartment.' if logger

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

  path = '/jobs/{jobId}/actions/changeCompartment'.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[:'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(change_job_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DbManagementClient#change_job_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_managed_database_group_compartment(managed_database_group_id, change_managed_database_group_compartment_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/databasemanagement/change_managed_database_group_compartment.rb.html) to see an example of how to use change_managed_database_group_compartment API.

Moves a Managed Database Group to a different compartment. The destination compartment must not have a Managed Database Group with the same name.

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:

  • A Response object with data of type nil



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
379
380
# File 'lib/oci/database_management/db_management_client.rb', line 341

def change_managed_database_group_compartment(managed_database_group_id, change_managed_database_group_compartment_details, opts = {})
  logger.debug 'Calling operation DbManagementClient#change_managed_database_group_compartment.' if logger

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

  path = '/managedDatabaseGroups/{managedDatabaseGroupId}/actions/changeCompartment'.sub('{managedDatabaseGroupId}', managed_database_group_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(change_managed_database_group_compartment_details)

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

#create_job(create_job_details, opts = {}) ⇒ Response

Note:

Creates a job to be executed on a Managed Database or Managed Database Group. Only one of the parameters, managedDatabaseId or managedDatabaseGroupId should be provided as input in CreateJobDetails resource in request body.

Parameters:

  • The details required to create a job.

  • (defaults to: {})

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

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

Returns:

  • A Response object with data of type Job



407
408
409
410
411
412
413
414
415
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
# File 'lib/oci/database_management/db_management_client.rb', line 407

def create_job(create_job_details, opts = {})
  logger.debug 'Calling operation DbManagementClient#create_job.' if logger

  raise "Missing the required parameter 'create_job_details' when calling create_job." if create_job_details.nil?

  path = '/jobs'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(create_job_details)

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

#create_managed_database_group(create_managed_database_group_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/databasemanagement/create_managed_database_group.rb.html) to see an example of how to use create_managed_database_group API.

Creates a Managed Database Group. The group does not contain any Managed Databases when it is created, and they must be added later.

Parameters:

  • The details required to create a Managed Database Group.

  • (defaults to: {})

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

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

Returns:



470
471
472
473
474
475
476
477
478
479
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
# File 'lib/oci/database_management/db_management_client.rb', line 470

def create_managed_database_group(create_managed_database_group_details, opts = {})
  logger.debug 'Calling operation DbManagementClient#create_managed_database_group.' if logger

  raise "Missing the required parameter 'create_managed_database_group_details' when calling create_managed_database_group." if create_managed_database_group_details.nil?

  path = '/managedDatabaseGroups'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(create_managed_database_group_details)

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

#delete_job(job_id, opts = {}) ⇒ Response

Note:

Deletes the job specified by jobId.

Parameters:

  • The identifier of the job.

  • (defaults to: {})

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • A Response object with data of type nil



531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
# File 'lib/oci/database_management/db_management_client.rb', line 531

def delete_job(job_id, opts = {})
  logger.debug 'Calling operation DbManagementClient#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[:'if-match'] = opts[:if_match] if opts[:if_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: 'DbManagementClient#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_managed_database_group(managed_database_group_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/databasemanagement/delete_managed_database_group.rb.html) to see an example of how to use delete_managed_database_group API.

Deletes the Managed Database Group specified by managedDatabaseGroupId. If the group contains Managed Databases, then it cannot be deleted.

Parameters:

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • A Response object with data of type nil



593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
# File 'lib/oci/database_management/db_management_client.rb', line 593

def delete_managed_database_group(managed_database_group_id, opts = {})
  logger.debug 'Calling operation DbManagementClient#delete_managed_database_group.' if logger

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

  path = '/managedDatabaseGroups/{managedDatabaseGroupId}'.sub('{managedDatabaseGroupId}', managed_database_group_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

#get_cluster_cache_metric(managed_database_id, start_time, end_time, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/databasemanagement/get_cluster_cache_metric.rb.html) to see an example of how to use get_cluster_cache_metric API.

Gets the metrics related to cluster cache for the Oracle Real Application Clusters (Oracle RAC) database specified by managedDatabaseId.

Parameters:

  • The start time for the time range to retrieve the health metrics of a Managed Database in UTC in ISO-8601 format, which is "yyyy-MM-dd’T’hh:mm:ss.sss’Z’".

  • The end time for the time range to retrieve the health metrics of a Managed Database in UTC in ISO-8601 format, which is "yyyy-MM-dd’T’hh:mm:ss.sss’Z’".

  • (defaults to: {})

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



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
# File 'lib/oci/database_management/db_management_client.rb', line 656

def get_cluster_cache_metric(managed_database_id, start_time, end_time, opts = {})
  logger.debug 'Calling operation DbManagementClient#get_cluster_cache_metric.' if logger

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

  path = '/managedDatabases/{managedDatabaseId}/clusterCacheMetrics'.sub('{managedDatabaseId}', managed_database_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:startTime] = start_time
  query_params[:endTime] = end_time

  # 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: 'DbManagementClient#get_cluster_cache_metric') 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::DatabaseManagement::Models::ClusterCacheMetric'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_database_fleet_health_metrics(compare_baseline_time, compare_target_time, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/databasemanagement/get_database_fleet_health_metrics.rb.html) to see an example of how to use get_database_fleet_health_metrics API.

Gets the health metrics for a fleet of databases in a compartment or in a Managed Database Group. Either the CompartmentId or the ManagedDatabaseGroupId query parameters must be provided to retrieve the health metrics.

Parameters:

  • The baseline time for metrics comparison.

  • The target time for metrics comparison.

  • (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.

  • :managed_database_group_id (String)

    The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Managed Database Group.

  • :compartment_id (String)
  • :compare_type (String)

    The time window used for metrics comparison.

  • :filter_by_metric_names (String)

    The filter used to retrieve a specific set of metrics by passing the desired metric names with a comma separator. Note that, by default, the service returns all supported metrics.

  • :filter_by_database_type (String)

    The filter used to filter the databases in the fleet by a specific Oracle Database type.

  • :filter_by_database_sub_type (String)

    The filter used to filter the databases in the fleet by a specific Oracle Database subtype.

Returns:



723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
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
# File 'lib/oci/database_management/db_management_client.rb', line 723

def get_database_fleet_health_metrics(compare_baseline_time, compare_target_time, opts = {})
  logger.debug 'Calling operation DbManagementClient#get_database_fleet_health_metrics.' if logger

  raise "Missing the required parameter 'compare_baseline_time' when calling get_database_fleet_health_metrics." if compare_baseline_time.nil?
  raise "Missing the required parameter 'compare_target_time' when calling get_database_fleet_health_metrics." if compare_target_time.nil?

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

  path = '/fleetMetrics'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compareBaselineTime] = compare_baseline_time
  query_params[:compareTargetTime] = compare_target_time
  query_params[:managedDatabaseGroupId] = opts[:managed_database_group_id] if opts[:managed_database_group_id]
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:compareType] = opts[:compare_type] if opts[:compare_type]
  query_params[:filterByMetricNames] = opts[:filter_by_metric_names] if opts[:filter_by_metric_names]
  query_params[:filterByDatabaseType] = opts[:filter_by_database_type] if opts[:filter_by_database_type]
  query_params[:filterByDatabaseSubType] = opts[:filter_by_database_sub_type] if opts[:filter_by_database_sub_type]

  # 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: 'DbManagementClient#get_database_fleet_health_metrics') 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::DatabaseManagement::Models::DatabaseFleetHealthMetrics'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_database_home_metrics(managed_database_id, start_time, end_time, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/databasemanagement/get_database_home_metrics.rb.html) to see an example of how to use get_database_home_metrics API.

Gets a summary of the activity and resource usage metrics like DB Time, CPU, User I/O, Wait, Storage, and Memory for a Managed Database.

Parameters:

  • The start time for the time range to retrieve the health metrics of a Managed Database in UTC in ISO-8601 format, which is "yyyy-MM-dd’T’hh:mm:ss.sss’Z’".

  • The end time for the time range to retrieve the health metrics of a Managed Database in UTC in ISO-8601 format, which is "yyyy-MM-dd’T’hh:mm:ss.sss’Z’".

  • (defaults to: {})

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
# File 'lib/oci/database_management/db_management_client.rb', line 795

def get_database_home_metrics(managed_database_id, start_time, end_time, opts = {})
  logger.debug 'Calling operation DbManagementClient#get_database_home_metrics.' if logger

  raise "Missing the required parameter 'managed_database_id' when calling get_database_home_metrics." if managed_database_id.nil?
  raise "Missing the required parameter 'start_time' when calling get_database_home_metrics." if start_time.nil?
  raise "Missing the required parameter 'end_time' when calling get_database_home_metrics." if end_time.nil?

  path = '/databaseHomeMetrics'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:managedDatabaseId] = managed_database_id
  query_params[:startTime] = start_time
  query_params[:endTime] = end_time

  # 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: 'DbManagementClient#get_database_home_metrics') 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::DatabaseManagement::Models::DatabaseHomeMetrics'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_job(job_id, opts = {}) ⇒ Response

Note:

Gets the details for the job specified by jobId.

Parameters:

  • The identifier of the job.

  • (defaults to: {})

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • A Response object with data of type Job



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
# File 'lib/oci/database_management/db_management_client.rb', line 854

def get_job(job_id, opts = {})
  logger.debug 'Calling operation DbManagementClient#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: 'DbManagementClient#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::DatabaseManagement::Models::Job'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_job_execution(job_execution_id, opts = {}) ⇒ Response

Note:

Gets the details for the job execution specified by jobExecutionId.

Parameters:

  • The identifier of the job execution.

  • (defaults to: {})

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
# File 'lib/oci/database_management/db_management_client.rb', line 909

def get_job_execution(job_execution_id, opts = {})
  logger.debug 'Calling operation DbManagementClient#get_job_execution.' if logger

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

  path = '/jobExecutions/{jobExecutionId}'.sub('{jobExecutionId}', job_execution_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: 'DbManagementClient#get_job_execution') 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::DatabaseManagement::Models::JobExecution'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_job_run(job_run_id, opts = {}) ⇒ Response

Note:

Gets the details for the job run specified by jobRunId.

Parameters:

  • The identifier of the job run.

  • (defaults to: {})

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • A Response object with data of type JobRun



964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# File 'lib/oci/database_management/db_management_client.rb', line 964

def get_job_run(job_run_id, opts = {})
  logger.debug 'Calling operation DbManagementClient#get_job_run.' if logger

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

  path = '/jobRuns/{jobRunId}'.sub('{jobRunId}', job_run_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: 'DbManagementClient#get_job_run') 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::DatabaseManagement::Models::JobRun'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_managed_database(managed_database_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/databasemanagement/get_managed_database.rb.html) to see an example of how to use get_managed_database API.

Gets the details for the Managed Database specified by managedDatabaseId.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



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
1053
1054
1055
# File 'lib/oci/database_management/db_management_client.rb', line 1019

def get_managed_database(managed_database_id, opts = {})
  logger.debug 'Calling operation DbManagementClient#get_managed_database.' if logger

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

  path = '/managedDatabases/{managedDatabaseId}'.sub('{managedDatabaseId}', managed_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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

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

#get_managed_database_group(managed_database_group_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/databasemanagement/get_managed_database_group.rb.html) to see an example of how to use get_managed_database_group API.

Gets the details for the Managed Database Group specified by managedDatabaseGroupId.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
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
# File 'lib/oci/database_management/db_management_client.rb', line 1074

def get_managed_database_group(managed_database_group_id, opts = {})
  logger.debug 'Calling operation DbManagementClient#get_managed_database_group.' if logger

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

  path = '/managedDatabaseGroups/{managedDatabaseGroupId}'.sub('{managedDatabaseGroupId}', managed_database_group_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: 'DbManagementClient#get_managed_database_group') 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::DatabaseManagement::Models::ManagedDatabaseGroup'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_database_parameters(managed_database_id, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/databasemanagement/list_database_parameters.rb.html) to see an example of how to use list_database_parameters API.

Gets the list of database parameters for the specified Managed Database. The parameters are listed in alphabetical order, along with their current values.

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.

  • :source (String)

    The source used to list database parameters. CURRENT is used to get the database parameters that are currently in effect for the database instance. SPFILE is used to list parameters from the server parameter file. Default is CURRENT.

    (default to CURRENT)
    

    Allowed values are: CURRENT, SPFILE

  • :name (String)

    A filter to return all parameters that have the text given in their names.

  • :is_allowed_values_included (BOOLEAN)

    When true, results include a list of valid values for parameters (if applicable). (default to false)

  • :sort_by (String)

    The field to sort information by. Only one sortOrder can be used. The default sort order for NAME is ascending and it is case-sensitive.

    (default to NAME)
    

    Allowed values are: NAME

  • :sort_order (String)

    The option to sort information in ascending (u2018ASCu2019) or descending (u2018DESCu2019) order. (default to ASC)

Returns:



1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
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
1194
1195
1196
1197
# File 'lib/oci/database_management/db_management_client.rb', line 1144

def list_database_parameters(managed_database_id, opts = {})
  logger.debug 'Calling operation DbManagementClient#list_database_parameters.' if logger

  raise "Missing the required parameter 'managed_database_id' when calling list_database_parameters." if managed_database_id.nil?

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

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

  if opts[:sort_order] && !OCI::DatabaseManagement::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::DatabaseManagement::Models::SORT_ORDERS_ENUM.'
  end
  raise "Parameter value for 'managed_database_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_database_id)

  path = '/managedDatabases/{managedDatabaseId}/databaseParameters'.sub('{managedDatabaseId}', managed_database_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:source] = opts[:source] if opts[:source]
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:isAllowedValuesIncluded] = opts[:is_allowed_values_included] if !opts[:is_allowed_values_included].nil?
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  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: 'DbManagementClient#list_database_parameters') 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::DatabaseManagement::Models::DatabaseParametersCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Gets the job execution for a specific ID or the list of job executions for a job, Managed Database or Managed Database Group in a specific compartment. Only one of the parameters, ID, jobId, managedDatabaseId or managedDatabaseGroupId should be provided. If none of these parameters is provided, all the job executions in the compartment are listed. Job executions can also be filtered based on the name and status parameters.

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.

  • :id (String)

    The identifier of the resource.

  • :job_id (String)

    The identifier of the job.

  • :managed_database_id (String)
  • :managed_database_group_id (String)

    The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Managed Database Group.

  • :status (String)

    The status of the job execution.

  • :name (String)

    A filter to return only resources that match the entire name.

  • :limit (Integer)

    The maximum number of records returned in paginated response. (default to 10)

  • :page (String)

    The page token representing the page, from where the next set of paginated results are retrieved. This is usually retrieved from a previous list call.

  • :sort_by (String)

    The field to sort information by. Only one sortOrder can be used. The default sort order for u2018TIMECREATEDu2019 is descending and the default sort order for u2018NAMEu2019 is ascending. The u2018NAMEu2019 sort order is case-sensitive.

    (default to TIMECREATED)
    

    Allowed values are: TIMECREATED, NAME

  • :sort_order (String)

    The option to sort information in ascending (u2018ASCu2019) or descending (u2018DESCu2019) order. (default to ASC)

Returns:



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
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
# File 'lib/oci/database_management/db_management_client.rb', line 1235

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

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

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

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

  path = '/jobExecutions'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:jobId] = opts[:job_id] if opts[:job_id]
  query_params[:managedDatabaseId] = opts[:managed_database_id] if opts[:managed_database_id]
  query_params[:managedDatabaseGroupId] = opts[:managed_database_group_id] if opts[:managed_database_group_id]
  query_params[:status] = opts[:status] if opts[:status]
  query_params[:name] = opts[:name] if opts[: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]

  # 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: 'DbManagementClient#list_job_executions') 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::DatabaseManagement::Models::JobExecutionCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Gets the job run for a specific ID or the list of job runs for a job, Managed Database or Managed Database Group in a specific compartment. Only one of the parameters, ID, jobId, managedDatabaseId, or managedDatabaseGroupId should be provided. If none of these parameters is provided, all the job runs in the compartment are listed. Job runs can also be filtered based on name and runStatus parameters.

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.

  • :id (String)

    The identifier of the resource.

  • :job_id (String)

    The identifier of the job.

  • :managed_database_id (String)
  • :managed_database_group_id (String)

    The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Managed Database Group.

  • :run_status (String)

    The status of the job run.

  • :name (String)

    A filter to return only resources that match the entire name.

  • :limit (Integer)

    The maximum number of records returned in paginated response. (default to 10)

  • :page (String)

    The page token representing the page, from where the next set of paginated results are retrieved. This is usually retrieved from a previous list call.

  • :sort_by (String)

    The field to sort information by. Only one sortOrder can be used. The default sort order for u2018TIMECREATEDu2019 is descending and the default sort order for u2018NAMEu2019 is ascending. The u2018NAMEu2019 sort order is case-sensitive.

    (default to TIMECREATED)
    

    Allowed values are: TIMECREATED, NAME

  • :sort_order (String)

    The option to sort information in ascending (u2018ASCu2019) or descending (u2018DESCu2019) order. (default to ASC)

Returns:



1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
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
# File 'lib/oci/database_management/db_management_client.rb', line 1327

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

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

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

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

  path = '/jobRuns'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:jobId] = opts[:job_id] if opts[:job_id]
  query_params[:managedDatabaseId] = opts[:managed_database_id] if opts[:managed_database_id]
  query_params[:managedDatabaseGroupId] = opts[:managed_database_group_id] if opts[:managed_database_group_id]
  query_params[:runStatus] = opts[:run_status] if opts[:run_status]
  query_params[:name] = opts[:name] if opts[: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]

  # 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: 'DbManagementClient#list_job_runs') 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::DatabaseManagement::Models::JobRunCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Gets the job for a specific ID or the list of jobs for a Managed Database or Managed Database Group in a specific compartment. Only one of the parameters, ID, managedDatabaseId or managedDatabaseGroupId, should be provided. If none of these parameters is provided, all the jobs in the compartment are listed. Jobs can also be filtered based on the name and lifecycleState parameters.

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.

  • :id (String)

    The identifier of the resource.

  • :managed_database_group_id (String)

    The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Managed Database Group.

  • :managed_database_id (String)
  • :name (String)

    A filter to return only resources that match the entire name.

  • :lifecycle_state (String)

    The lifecycle state of the job.

  • :limit (Integer)

    The maximum number of records returned in paginated response. (default to 10)

  • :page (String)

    The page token representing the page, from where the next set of paginated results are retrieved. This is usually retrieved from a previous list call.

  • :sort_by (String)

    The field to sort information by. Only one sortOrder can be used. The default sort order for u2018TIMECREATEDu2019 is descending and the default sort order for u2018NAMEu2019 is ascending. The u2018NAMEu2019 sort order is case-sensitive.

    (default to TIMECREATED)
    

    Allowed values are: TIMECREATED, NAME

  • :sort_order (String)

    The option to sort information in ascending (u2018ASCu2019) or descending (u2018DESCu2019) order. (default to ASC)

Returns:



1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
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
1469
1470
1471
1472
1473
1474
1475
# File 'lib/oci/database_management/db_management_client.rb', line 1418

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

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

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

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

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

  path = '/jobs'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:managedDatabaseGroupId] = opts[:managed_database_group_id] if opts[:managed_database_group_id]
  query_params[:managedDatabaseId] = opts[:managed_database_id] if opts[:managed_database_id]
  query_params[:name] = opts[:name] if opts[:name]
  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[:sortBy] = opts[:sort_by] if opts[:sort_by]
  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: 'DbManagementClient#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::DatabaseManagement::Models::JobCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/databasemanagement/list_managed_database_groups.rb.html) to see an example of how to use list_managed_database_groups API.

Gets the Managed Database Group for a specific ID or the list of Managed Database Groups in a specific compartment. Managed Database Groups can also be filtered based on the name parameter. Only one of the parameters, ID or name should be provided. If none of these parameters is provided, all the Managed Database Groups in the compartment are listed.

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.

  • :id (String)

    The identifier of the resource.

  • :name (String)

    A filter to return only resources that match the entire name.

  • :lifecycle_state (String)

    The lifecycle state of a resource.

  • :page (String)

    The page token representing the page, from where the next set of paginated results are retrieved. This is usually retrieved from a previous list call.

  • :limit (Integer)

    The maximum number of records returned in paginated response. (default to 10)

  • :sort_by (String)

    The field to sort information by. Only one sortOrder can be used. The default sort order for u2018TIMECREATEDu2019 is descending and the default sort order for u2018NAMEu2019 is ascending. The u2018NAMEu2019 sort order is case-sensitive.

    (default to TIMECREATED)
    

    Allowed values are: TIMECREATED, NAME

  • :sort_order (String)

    The option to sort information in ascending (u2018ASCu2019) or descending (u2018DESCu2019) order. (default to ASC)

Returns:



1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
# File 'lib/oci/database_management/db_management_client.rb', line 1510

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

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

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

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

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

  path = '/managedDatabaseGroups'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  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: 'DbManagementClient#list_managed_database_groups') 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::DatabaseManagement::Models::ManagedDatabaseGroupCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/databasemanagement/list_managed_databases.rb.html) to see an example of how to use list_managed_databases API.

Gets the Managed Database for a specific ID or the list of Managed Databases in a specific compartment. Managed Databases can also be filtered based on the name parameter. Only one of the parameters, ID or name should be provided. If none of these parameters is provided, all the Managed Databases in the compartment are listed.

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.

  • :id (String)

    The identifier of the resource.

  • :name (String)

    A filter to return only resources that match the entire name.

  • :page (String)

    The page token representing the page, from where the next set of paginated results are retrieved. This is usually retrieved from a previous list call.

  • :limit (Integer)

    The maximum number of records returned in paginated response. (default to 10)

  • :sort_by (String)

    The field to sort information by. Only one sortOrder can be used. The default sort order for u2018TIMECREATEDu2019 is descending and the default sort order for u2018NAMEu2019 is ascending. The u2018NAMEu2019 sort order is case-sensitive.

    (default to TIMECREATED)
    

    Allowed values are: TIMECREATED, NAME

  • :sort_order (String)

    The option to sort information in ascending (u2018ASCu2019) or descending (u2018DESCu2019) order. (default to ASC)

Returns:



1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
# File 'lib/oci/database_management/db_management_client.rb', line 1598

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

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

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

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

  path = '/managedDatabases'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  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: 'DbManagementClient#list_managed_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::DatabaseManagement::Models::ManagedDatabaseCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_tablespaces(managed_database_id, opts = {}) ⇒ Response

Note:

Gets the list of tablespaces for the specified managedDatabaseId.

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.

  • :name (String)

    A filter to return only resources that match the entire name.

  • :sort_by (String)

    The field to sort information by. Only one sortOrder can be used. The default sort order for u2018TIMECREATEDu2019 is descending and the default sort order for u2018NAMEu2019 is ascending. The u2018NAMEu2019 sort order is case-sensitive.

    (default to TIMECREATED)
    

    Allowed values are: TIMECREATED, NAME

  • :sort_order (String)

    The option to sort information in ascending (u2018ASCu2019) or descending (u2018DESCu2019) order. (default to ASC)

  • :page (String)

    The page token representing the page, from where the next set of paginated results are retrieved. This is usually retrieved from a previous list call.

  • :limit (Integer)

    The maximum number of records returned in paginated response. (default to 10)

Returns:



1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
# File 'lib/oci/database_management/db_management_client.rb', line 1677

def list_tablespaces(managed_database_id, opts = {})
  logger.debug 'Calling operation DbManagementClient#list_tablespaces.' if logger

  raise "Missing the required parameter 'managed_database_id' when calling list_tablespaces." if managed_database_id.nil?

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

  if opts[:sort_order] && !OCI::DatabaseManagement::Models::SORT_ORDERS_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::DatabaseManagement::Models::SORT_ORDERS_ENUM.'
  end
  raise "Parameter value for 'managed_database_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_database_id)

  path = '/managedDatabases/{managedDatabaseId}/tablespaces'.sub('{managedDatabaseId}', managed_database_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

#loggerLogger

Returns The logger for this client. May be nil.

Returns:

  • The logger for this client. May be nil.



94
95
96
# File 'lib/oci/database_management/db_management_client.rb', line 94

def logger
  @api_client.config.logger
end

#remove_managed_database_from_managed_database_group(managed_database_group_id, remove_managed_database_from_managed_database_group_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/databasemanagement/remove_managed_database_from_managed_database_group.rb.html) to see an example of how to use remove_managed_database_from_managed_database_group API.

Removes a Managed Database from a Managed Database Group. Any management activities that are currently running on this database will continue to run to completion. However, any activities scheduled to run in the future will not be performed on this 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.

  • :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:

  • A Response object with data of type nil



1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
# File 'lib/oci/database_management/db_management_client.rb', line 1755

def remove_managed_database_from_managed_database_group(managed_database_group_id, remove_managed_database_from_managed_database_group_details, opts = {})
  logger.debug 'Calling operation DbManagementClient#remove_managed_database_from_managed_database_group.' if logger

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

  path = '/managedDatabaseGroups/{managedDatabaseGroupId}/actions/removeManagedDatabase'.sub('{managedDatabaseGroupId}', managed_database_group_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(remove_managed_database_from_managed_database_group_details)

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

#reset_database_parameters(managed_database_id, reset_database_parameters_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/databasemanagement/reset_database_parameters.rb.html) to see an example of how to use reset_database_parameters API.

Resets database parameter values to their default or startup values.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

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

Returns:



1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
# File 'lib/oci/database_management/db_management_client.rb', line 1819

def reset_database_parameters(managed_database_id, reset_database_parameters_details, opts = {})
  logger.debug 'Calling operation DbManagementClient#reset_database_parameters.' if logger

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

  path = '/managedDatabases/{managedDatabaseId}/actions/resetDatabaseParameters'.sub('{managedDatabaseId}', managed_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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(reset_database_parameters_details)

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

#update_managed_database_group(managed_database_group_id, update_managed_database_group_details, opts = {}) ⇒ Response

Note:

Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/databasemanagement/update_managed_database_group.rb.html) to see an example of how to use update_managed_database_group API.

Updates the Managed Database Group specified by managedDatabaseGroupId.

Parameters:

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
# File 'lib/oci/database_management/db_management_client.rb', line 1884

def update_managed_database_group(managed_database_group_id, update_managed_database_group_details, opts = {})
  logger.debug 'Calling operation DbManagementClient#update_managed_database_group.' if logger

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

  path = '/managedDatabaseGroups/{managedDatabaseGroupId}'.sub('{managedDatabaseGroupId}', managed_database_group_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_managed_database_group_details)

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