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:

  • config (Config) (defaults to: nil)

    A Config object.

  • region (String) (defaults to: nil)

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

  • endpoint (String) (defaults to: nil)

    The fully qualified endpoint URL

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

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

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

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

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

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



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/oci/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:

  • (String)


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:

  • (String)


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



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:

  • (Response)

    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_db_management_private_endpoint_compartment(db_management_private_endpoint_id, change_db_management_private_endpoint_compartment_details, opts = {}) ⇒ Response

Note:

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

Moves the Database Management private endpoint and its dependent resources to the specified compartment.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

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

  • :if_match (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



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

def change_db_management_private_endpoint_compartment(db_management_private_endpoint_id, change_db_management_private_endpoint_compartment_details, opts = {})
  logger.debug 'Calling operation DbManagementClient#change_db_management_private_endpoint_compartment.' if logger

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

  path = '/dbManagementPrivateEndpoints/{dbManagementPrivateEndpointId}/actions/changeCompartment'.sub('{dbManagementPrivateEndpointId}', db_management_private_endpoint_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_db_management_private_endpoint_compartment_details)

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

  • (Response)

    A Response object with data of type nil



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

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:

  • (Response)

    A Response object with data of type nil



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
445
446
447
448
449
450
# File 'lib/oci/database_management/db_management_client.rb', line 411

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_db_management_private_endpoint(create_db_management_private_endpoint_details, opts = {}) ⇒ Response

Note:

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

Creates a new Database Management private endpoint.

Parameters:

Options Hash (opts):

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

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

  • :opc_retry_token (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



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
508
509
510
511
512
# File 'lib/oci/database_management/db_management_client.rb', line 475

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

  raise "Missing the required parameter 'create_db_management_private_endpoint_details' when calling create_db_management_private_endpoint." if create_db_management_private_endpoint_details.nil?

  path = '/dbManagementPrivateEndpoints'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(create_db_management_private_endpoint_details)

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

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

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

Returns:

  • (Response)

    A Response object with data of type Job



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
568
569
570
571
572
573
574
575
576
# File 'lib/oci/database_management/db_management_client.rb', line 539

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:

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:



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
630
631
632
633
634
635
636
637
638
639
# File 'lib/oci/database_management/db_management_client.rb', line 602

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_db_management_private_endpoint(db_management_private_endpoint_id, opts = {}) ⇒ Response

Note:

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

Deletes a specific Database Management private endpoint.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :if_match (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
# File 'lib/oci/database_management/db_management_client.rb', line 663

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

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

  path = '/dbManagementPrivateEndpoints/{dbManagementPrivateEndpointId}'.sub('{dbManagementPrivateEndpointId}', db_management_private_endpoint_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

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

Note:

Deletes the job specified by jobId.

Parameters:

  • job_id (String)

    The identifier of the job.

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

    the optional parameters

Options Hash (opts):

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

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

  • :if_match (String)

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



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

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:

  • (Response)

    A Response object with data of type nil



785
786
787
788
789
790
791
792
793
794
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
# File 'lib/oci/database_management/db_management_client.rb', line 785

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_awr_db_report(managed_database_id, awr_db_id, opts = {}) ⇒ Response

Note:

Gets the AWR report for the specific database.

Parameters:

  • managed_database_id (String)
  • awr_db_id (String)

    The parameter to filter the database by internal ID. Note that the internal ID of the database can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbs

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

    the optional parameters

Options Hash (opts):

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

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

  • :inst_nums (Array<Integer>)

    The optional multiple value query parameter to filter the database instance numbers.

  • :begin_sn_id_greater_than_or_equal_to (Integer)

    The optional greater than or equal to filter on the snapshot ID.

  • :end_sn_id_less_than_or_equal_to (Integer)

    The optional less than or equal to query parameter to filter the snapshot ID.

  • :time_greater_than_or_equal_to (DateTime)

    The optional greater than or equal to query parameter to filter the timestamp.

  • :time_less_than_or_equal_to (DateTime)

    The optional less than or equal to query parameter to filter the timestamp.

  • :report_type (String)

    The query parameter to filter the AWR report types. (default to AWR) Allowed values are: AWR, ASH

  • :container_id (Integer)

    The optional query parameter to filter the database container by an exact ID value. Note that the database container ID can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbSnapshotRanges

  • :report_format (String)

    The format of the AWR report. (default to HTML) Allowed values are: HTML, TEXT

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



863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
# File 'lib/oci/database_management/db_management_client.rb', line 863

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

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

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

  if opts[:report_format] && !%w[HTML TEXT].include?(opts[:report_format])
    raise 'Invalid value for "report_format", must be one of HTML, TEXT.'
  end
  raise "Parameter value for 'managed_database_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_database_id)
  raise "Parameter value for 'awr_db_id' must not be blank" if OCI::Internal::Util.blank_string?(awr_db_id)

  path = '/managedDatabases/{managedDatabaseId}/awrDbs/{awrDbId}/awrDbReport'.sub('{managedDatabaseId}', managed_database_id.to_s).sub('{awrDbId}', awr_db_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:instNums] = OCI::ApiClient.build_collection_params(opts[:inst_nums], :csv) if opts[:inst_nums] && !opts[:inst_nums].empty?
  query_params[:beginSnIdGreaterThanOrEqualTo] = opts[:begin_sn_id_greater_than_or_equal_to] if opts[:begin_sn_id_greater_than_or_equal_to]
  query_params[:endSnIdLessThanOrEqualTo] = opts[:end_sn_id_less_than_or_equal_to] if opts[:end_sn_id_less_than_or_equal_to]
  query_params[:timeGreaterThanOrEqualTo] = opts[:time_greater_than_or_equal_to] if opts[:time_greater_than_or_equal_to]
  query_params[:timeLessThanOrEqualTo] = opts[:time_less_than_or_equal_to] if opts[:time_less_than_or_equal_to]
  query_params[:reportType] = opts[:report_type] if opts[:report_type]
  query_params[:containerId] = opts[:container_id] if opts[:container_id]
  query_params[:reportFormat] = opts[:report_format] if opts[:report_format]

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

  post_body = nil

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

#get_awr_db_sql_report(managed_database_id, awr_db_id, sql_id, opts = {}) ⇒ Response

Note:

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

Gets the SQL health check report for one SQL of the specific database.

Parameters:

  • managed_database_id (String)
  • awr_db_id (String)

    The parameter to filter the database by internal ID. Note that the internal ID of the database can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbs

  • sql_id (String)

    The parameter to filter SQL by ID. Note that the SQL ID is generated internally by Oracle for each SQL statement and can be retrieved from AWR Report API (/managedDatabases/managedDatabaseId/awrDbs/awrDbId/awrDbReport) or Performance Hub API (/internal/managedDatabases/managedDatabaseId/actions/retrievePerformanceData)

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

    the optional parameters

Options Hash (opts):

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

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

  • :inst_num (String)

    The optional single value query parameter to filter the database instance number.

  • :begin_sn_id_greater_than_or_equal_to (Integer)

    The optional greater than or equal to filter on the snapshot ID.

  • :end_sn_id_less_than_or_equal_to (Integer)

    The optional less than or equal to query parameter to filter the snapshot ID.

  • :time_greater_than_or_equal_to (DateTime)

    The optional greater than or equal to query parameter to filter the timestamp.

  • :time_less_than_or_equal_to (DateTime)

    The optional less than or equal to query parameter to filter the timestamp.

  • :report_format (String)

    The format of the AWR report. (default to HTML) Allowed values are: HTML, TEXT

  • :container_id (Integer)

    The optional query parameter to filter the database container by an exact ID value. Note that the database container ID can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbSnapshotRanges

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



961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
# File 'lib/oci/database_management/db_management_client.rb', line 961

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

  raise "Missing the required parameter 'managed_database_id' when calling get_awr_db_sql_report." if managed_database_id.nil?
  raise "Missing the required parameter 'awr_db_id' when calling get_awr_db_sql_report." if awr_db_id.nil?
  raise "Missing the required parameter 'sql_id' when calling get_awr_db_sql_report." if sql_id.nil?

  if opts[:report_format] && !%w[HTML TEXT].include?(opts[:report_format])
    raise 'Invalid value for "report_format", must be one of HTML, TEXT.'
  end
  raise "Parameter value for 'managed_database_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_database_id)
  raise "Parameter value for 'awr_db_id' must not be blank" if OCI::Internal::Util.blank_string?(awr_db_id)

  path = '/managedDatabases/{managedDatabaseId}/awrDbs/{awrDbId}/awrDbSqlReport'.sub('{managedDatabaseId}', managed_database_id.to_s).sub('{awrDbId}', awr_db_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:sqlId] = sql_id
  query_params[:instNum] = opts[:inst_num] if opts[:inst_num]
  query_params[:beginSnIdGreaterThanOrEqualTo] = opts[:begin_sn_id_greater_than_or_equal_to] if opts[:begin_sn_id_greater_than_or_equal_to]
  query_params[:endSnIdLessThanOrEqualTo] = opts[:end_sn_id_less_than_or_equal_to] if opts[:end_sn_id_less_than_or_equal_to]
  query_params[:timeGreaterThanOrEqualTo] = opts[:time_greater_than_or_equal_to] if opts[:time_greater_than_or_equal_to]
  query_params[:timeLessThanOrEqualTo] = opts[:time_less_than_or_equal_to] if opts[:time_less_than_or_equal_to]
  query_params[:reportFormat] = opts[:report_format] if opts[:report_format]
  query_params[:containerId] = opts[:container_id] if opts[:container_id]

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

  post_body = nil

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

  • managed_database_id (String)
  • start_time (String)

    The start time of 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’".

  • end_time (String)

    The end time of 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’".

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
# File 'lib/oci/database_management/db_management_client.rb', line 1041

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:

  • compare_baseline_time (String)

    The baseline time for metrics comparison.

  • compare_target_time (String)

    The target time for metrics comparison.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

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

  • :filter_by_database_deployment_type (String)

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

  • :filter_by_database_version (String)

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

Returns:



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

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]
  query_params[:filterByDatabaseDeploymentType] = opts[:filter_by_database_deployment_type] if opts[:filter_by_database_deployment_type]
  query_params[:filterByDatabaseVersion] = opts[:filter_by_database_version] if opts[:filter_by_database_version]

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

  • managed_database_id (String)
  • start_time (String)

    The start time of 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’".

  • end_time (String)

    The end time of 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’".

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
# File 'lib/oci/database_management/db_management_client.rb', line 1184

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_db_management_private_endpoint(db_management_private_endpoint_id, opts = {}) ⇒ Response

Note:

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

Gets the details of a specific Database Management private endpoint.

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:



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

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

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

  path = '/dbManagementPrivateEndpoints/{dbManagementPrivateEndpointId}'.sub('{dbManagementPrivateEndpointId}', db_management_private_endpoint_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_db_management_private_endpoint') 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::DbManagementPrivateEndpoint'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Gets the details for the job specified by jobId.

Parameters:

  • job_id (String)

    The identifier of the job.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type Job



1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
# File 'lib/oci/database_management/db_management_client.rb', line 1297

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:

  • job_execution_id (String)

    The identifier of the job execution.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



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
1382
1383
1384
1385
1386
1387
1388
# File 'lib/oci/database_management/db_management_client.rb', line 1352

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:

  • job_run_id (String)

    The identifier of the job run.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type JobRun



1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
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
# File 'lib/oci/database_management/db_management_client.rb', line 1407

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:



1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
# File 'lib/oci/database_management/db_management_client.rb', line 1462

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:



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

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

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

Note:

Gets a summary of the resource usage metrics such as CPU, User I/O, and Storage for each PDB within a specific CDB. If comparmentId is specified, then the metrics for each PDB (within the CDB) in the specified compartment are retrieved. If compartmentId is not specified, then the metrics for all the PDBs within the CDB are retrieved.

Parameters:

  • managed_database_id (String)
  • start_time (String)

    The start time of 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’".

  • end_time (String)

    The end time of 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’".

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

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

Returns:

  • (Response)

    A Response object with data of type PdbMetrics



1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
# File 'lib/oci/database_management/db_management_client.rb', line 1584

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

  raise "Missing the required parameter 'managed_database_id' when calling get_pdb_metrics." if managed_database_id.nil?
  raise "Missing the required parameter 'start_time' when calling get_pdb_metrics." if start_time.nil?
  raise "Missing the required parameter 'end_time' when calling get_pdb_metrics." if end_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
  raise "Parameter value for 'managed_database_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_database_id)

  path = '/managedDatabases/{managedDatabaseId}/pdbMetrics'.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
  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]

  # 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_pdb_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::PdbMetrics'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_user(managed_database_id, user_name, opts = {}) ⇒ Response

Note:

Gets the details of a specific user for the specified managedDatabaseId and userName.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type User



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

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

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

  path = '/managedDatabases/{managedDatabaseId}/users/{userName}'.sub('{managedDatabaseId}', managed_database_id.to_s).sub('{userName}', user_name.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_user') 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::User'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Gets the status of the work request with the given Work Request ID

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:



1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
# File 'lib/oci/database_management/db_management_client.rb', line 1707

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

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

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

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

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

  post_body = nil

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

#list_associated_databases(db_management_private_endpoint_id, compartment_id, opts = {}) ⇒ Response

Note:

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

Gets the list of databases using a specific Database Management private endpoint.

Allowed values are: timeRegistered

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.

  • :limit (Integer)

    The maximum number of records returned in the 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_order (String)

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

  • :sort_by (String)

    The option to sort databases using a specific Database Management private endpoint. (default to timeRegistered)

Returns:



1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
# File 'lib/oci/database_management/db_management_client.rb', line 1770

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

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

  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

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

  path = '/dbManagementPrivateEndpoints/{dbManagementPrivateEndpointId}/associatedDatabases'.sub('{dbManagementPrivateEndpointId}', db_management_private_endpoint_id.to_s)
  operation_signing_strategy = :standard

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

  # 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_associated_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::AssociatedDatabaseCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_awr_db_snapshots(managed_database_id, awr_db_id, opts = {}) ⇒ Response

Note:

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

Lists AWR snapshots for the specified database in the AWR.

Parameters:

  • managed_database_id (String)
  • awr_db_id (String)

    The parameter to filter the database by internal ID. Note that the internal ID of the database can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbs

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

    the optional parameters

Options Hash (opts):

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

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

  • :inst_num (String)

    The optional single value query parameter to filter the database instance number.

  • :begin_sn_id_greater_than_or_equal_to (Integer)

    The optional greater than or equal to filter on the snapshot ID.

  • :end_sn_id_less_than_or_equal_to (Integer)

    The optional less than or equal to query parameter to filter the snapshot ID.

  • :time_greater_than_or_equal_to (DateTime)

    The optional greater than or equal to query parameter to filter the timestamp.

  • :time_less_than_or_equal_to (DateTime)

    The optional less than or equal to query parameter to filter the timestamp.

  • :container_id (Integer)

    The optional query parameter to filter the database container by an exact ID value. Note that the database container ID can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbSnapshotRanges

  • :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 the paginated response. (default to 10)

  • :sort_by (String)

    The option to sort the AWR snapshot summary data. (default to TIME_BEGIN) Allowed values are: TIME_BEGIN, SNAPSHOT_ID

  • :sort_order (String)

    The option to sort information in ascending (u2018ASCu2019) or descending (u2018DESCu2019) order. Descending order is the default order. (default to DESC)

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



1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
# File 'lib/oci/database_management/db_management_client.rb', line 1865

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

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

  if opts[:sort_by] && !%w[TIME_BEGIN SNAPSHOT_ID].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIME_BEGIN, SNAPSHOT_ID.'
  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)
  raise "Parameter value for 'awr_db_id' must not be blank" if OCI::Internal::Util.blank_string?(awr_db_id)

  path = '/managedDatabases/{managedDatabaseId}/awrDbs/{awrDbId}/awrDbSnapshots'.sub('{managedDatabaseId}', managed_database_id.to_s).sub('{awrDbId}', awr_db_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:instNum] = opts[:inst_num] if opts[:inst_num]
  query_params[:beginSnIdGreaterThanOrEqualTo] = opts[:begin_sn_id_greater_than_or_equal_to] if opts[:begin_sn_id_greater_than_or_equal_to]
  query_params[:endSnIdLessThanOrEqualTo] = opts[:end_sn_id_less_than_or_equal_to] if opts[:end_sn_id_less_than_or_equal_to]
  query_params[:timeGreaterThanOrEqualTo] = opts[:time_greater_than_or_equal_to] if opts[:time_greater_than_or_equal_to]
  query_params[:timeLessThanOrEqualTo] = opts[:time_less_than_or_equal_to] if opts[:time_less_than_or_equal_to]
  query_params[:containerId] = opts[:container_id] if opts[:container_id]
  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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

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

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

Note:

Gets the list of databases and their snapshot summary details available in the AWR of the specified Managed 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

  • :name (String)

    The optional single value query parameter to filter the entity name.

  • :time_greater_than_or_equal_to (DateTime)

    The optional greater than or equal to query parameter to filter the timestamp.

  • :time_less_than_or_equal_to (DateTime)

    The optional less than or equal to query parameter to filter the timestamp.

  • :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 the paginated response. (default to 10)

  • :sort_by (String)

    The option to sort the AWR summary data. (default to END_INTERVAL_TIME) Allowed values are: END_INTERVAL_TIME, NAME

  • :sort_order (String)

    The option to sort information in ascending (u2018ASCu2019) or descending (u2018DESCu2019) order. Descending order is the default order. (default to DESC)

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



1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
# File 'lib/oci/database_management/db_management_client.rb', line 1958

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

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

  if opts[:sort_by] && !%w[END_INTERVAL_TIME NAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of END_INTERVAL_TIME, 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}/awrDbs'.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[:timeGreaterThanOrEqualTo] = opts[:time_greater_than_or_equal_to] if opts[:time_greater_than_or_equal_to]
  query_params[:timeLessThanOrEqualTo] = opts[:time_less_than_or_equal_to] if opts[:time_less_than_or_equal_to]
  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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

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

#list_consumer_group_privileges(managed_database_id, user_name, opts = {}) ⇒ Response

Note:

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

Gets the list of Consumer Group Privileges granted for the specified user.

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 u2018NAMEu2019 is ascending. The u2018NAMEu2019 sort order 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. Ascending order is the default order. (default to ASC)

  • :limit (Integer)

    The maximum number of records returned in the 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.

Returns:



2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
# File 'lib/oci/database_management/db_management_client.rb', line 2040

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

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

  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)
  raise "Parameter value for 'user_name' must not be blank" if OCI::Internal::Util.blank_string?(user_name)

  path = '/managedDatabases/{managedDatabaseId}/users/{userName}/consumerGroupPrivileges'.sub('{managedDatabaseId}', managed_database_id.to_s).sub('{userName}', user_name.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[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

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

  post_body = nil

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

#list_data_access_containers(managed_database_id, user_name, opts = {}) ⇒ Response

Note:

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

Gets the list of Containers if it does not apply to all containers for the specified user.

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 u2018NAMEu2019 is ascending. The u2018NAMEu2019 sort order 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. Ascending order is the default order. (default to ASC)

  • :limit (Integer)

    The maximum number of records returned in the 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.

Returns:



2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
# File 'lib/oci/database_management/db_management_client.rb', line 2120

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

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

  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)
  raise "Parameter value for 'user_name' must not be blank" if OCI::Internal::Util.blank_string?(user_name)

  path = '/managedDatabases/{managedDatabaseId}/users/{userName}/dataAccessContainers'.sub('{managedDatabaseId}', managed_database_id.to_s).sub('{userName}', user_name.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[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DbManagementClient#list_data_access_containers') 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::DataAccessContainerCollection'
    )
  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. Ascending order is the default order. (default to ASC)

Returns:



2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
# File 'lib/oci/database_management/db_management_client.rb', line 2205

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_db_management_private_endpoints(compartment_id, opts = {}) ⇒ Response

Note:

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

Gets a list of Database Management private endpoints.

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

  • :name (String)

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

  • :vcn_id (String)
  • :is_cluster (BOOLEAN)

    The option to filter Database Management private endpoints that can used for Oracle Databases in a cluster. This should be used along with the vcnId query parameter. (default to false)

  • :lifecycle_state (String)

    The lifecycle state of a resource.

  • :limit (Integer)

    The maximum number of records returned in the 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_order (String)

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
# File 'lib/oci/database_management/db_management_client.rb', line 2292

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

  raise "Missing the required parameter 'compartment_id' when calling list_db_management_private_endpoints." 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_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

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

  path = '/dbManagementPrivateEndpoints'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:vcnId] = opts[:vcn_id] if opts[:vcn_id]
  query_params[:isCluster] = opts[:is_cluster] if !opts[:is_cluster].nil?
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # 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_db_management_private_endpoints') 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::DbManagementPrivateEndpointCollection'
    )
  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, job run, Managed Database or Managed Database Group in a specific compartment. Only one of the parameters, ID, jobId, jobRunId, 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 the 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. Ascending order is the default order. (default to ASC)

  • :job_run_id (String)

    The identifier of the job run.

Returns:



2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
# File 'lib/oci/database_management/db_management_client.rb', line 2387

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]
  query_params[:jobRunId] = opts[:job_run_id] if opts[:job_run_id]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # 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 the 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. Ascending order is the default order. (default to ASC)

Returns:



2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
# File 'lib/oci/database_management/db_management_client.rb', line 2480

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 the 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. Ascending order is the default order. (default to ASC)

Returns:



2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
# File 'lib/oci/database_management/db_management_client.rb', line 2571

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 the 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. Ascending order is the default order. (default to ASC)

Returns:



2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
# File 'lib/oci/database_management/db_management_client.rb', line 2663

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 be filtered based on the name parameter. Only one of the parameters, ID or name should be provided. If neither of these parameters is provided, all the Managed Databases in the compartment are listed. Managed Databases can also be filtered based on the deployment type and management option. If the deployment type is not specified or if it is ONPREMISE, then the management option is not considered and Managed Databases with ADVANCED management option 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.

  • :management_option (String)

    A filter to return Managed Databases with the specified management option.

  • :deployment_type (String)

    A filter to return Managed Databases of the specified deployment type.

  • :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 the 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. Ascending order is the default order. (default to ASC)

Returns:



2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
# File 'lib/oci/database_management/db_management_client.rb', line 2756

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

  if opts[:deployment_type] && !OCI::DatabaseManagement::Models::DEPLOYMENT_TYPE_ENUM.include?(opts[:deployment_type])
    raise 'Invalid value for "deployment_type", must be one of the values in OCI::DatabaseManagement::Models::DEPLOYMENT_TYPE_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 = '/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[:managementOption] = opts[:management_option] if opts[:management_option]
  query_params[:deploymentType] = opts[:deployment_type] if opts[:deployment_type]
  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_object_privileges(managed_database_id, user_name, opts = {}) ⇒ Response

Note:

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

Gets the list of Object Privileges granted for the specified user.

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 u2018NAMEu2019 is ascending. The u2018NAMEu2019 sort order 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. Ascending order is the default order. (default to ASC)

  • :limit (Integer)

    The maximum number of records returned in the 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.

Returns:



2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
# File 'lib/oci/database_management/db_management_client.rb', line 2845

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

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

  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)
  raise "Parameter value for 'user_name' must not be blank" if OCI::Internal::Util.blank_string?(user_name)

  path = '/managedDatabases/{managedDatabaseId}/users/{userName}/objectPrivileges'.sub('{managedDatabaseId}', managed_database_id.to_s).sub('{userName}', user_name.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[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

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

  post_body = nil

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

#list_proxied_for_users(managed_database_id, user_name, opts = {}) ⇒ Response

Note:

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

Gets the list of Users for which the current user acts as proxy.

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 u2018NAMEu2019 is ascending. The u2018NAMEu2019 sort order 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. Ascending order is the default order. (default to ASC)

  • :limit (Integer)

    The maximum number of records returned in the 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.

Returns:



2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
# File 'lib/oci/database_management/db_management_client.rb', line 2925

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

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

  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)
  raise "Parameter value for 'user_name' must not be blank" if OCI::Internal::Util.blank_string?(user_name)

  path = '/managedDatabases/{managedDatabaseId}/users/{userName}/proxiedForUsers'.sub('{managedDatabaseId}', managed_database_id.to_s).sub('{userName}', user_name.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[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

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

  post_body = nil

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

#list_proxy_users(managed_database_id, user_name, opts = {}) ⇒ Response

Note:

Gets the list of proxy users for the current User.

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 u2018NAMEu2019 is ascending. The u2018NAMEu2019 sort order 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. Ascending order is the default order. (default to ASC)

  • :limit (Integer)

    The maximum number of records returned in the 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.

Returns:



3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
# File 'lib/oci/database_management/db_management_client.rb', line 3005

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

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

  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)
  raise "Parameter value for 'user_name' must not be blank" if OCI::Internal::Util.blank_string?(user_name)

  path = '/managedDatabases/{managedDatabaseId}/users/{userName}/proxyUsers'.sub('{managedDatabaseId}', managed_database_id.to_s).sub('{userName}', user_name.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[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

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

  post_body = nil

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

#list_roles(managed_database_id, user_name, opts = {}) ⇒ Response

Note:

Gets the list of roles granted for the specified user.

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 u2018NAMEu2019 is ascending. The u2018NAMEu2019 sort order 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. Ascending order is the default order. (default to ASC)

  • :limit (Integer)

    The maximum number of records returned in the 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.

Returns:



3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
# File 'lib/oci/database_management/db_management_client.rb', line 3085

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

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

  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)
  raise "Parameter value for 'user_name' must not be blank" if OCI::Internal::Util.blank_string?(user_name)

  path = '/managedDatabases/{managedDatabaseId}/users/{userName}/roles'.sub('{managedDatabaseId}', managed_database_id.to_s).sub('{userName}', user_name.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[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

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

  post_body = nil

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

#list_system_privileges(managed_database_id, user_name, opts = {}) ⇒ Response

Note:

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

Gets the list of System Privileges granted for the specified user.

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 u2018NAMEu2019 is ascending. The u2018NAMEu2019 sort order 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. Ascending order is the default order. (default to ASC)

  • :limit (Integer)

    The maximum number of records returned in the 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.

Returns:



3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
# File 'lib/oci/database_management/db_management_client.rb', line 3165

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

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

  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)
  raise "Parameter value for 'user_name' must not be blank" if OCI::Internal::Util.blank_string?(user_name)

  path = '/managedDatabases/{managedDatabaseId}/users/{userName}/systemPrivileges'.sub('{managedDatabaseId}', managed_database_id.to_s).sub('{userName}', user_name.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[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DbManagementClient#list_system_privileges') 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::SystemPrivilegeCollection'
    )
  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. Ascending order is the default 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 the paginated response. (default to 10)

Returns:



3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
# File 'lib/oci/database_management/db_management_client.rb', line 3245

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

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

Note:

Gets the list of users 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. Ascending order is the default order. (default to ASC)

  • :limit (Integer)

    The maximum number of records returned in the 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.

Returns:



3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
# File 'lib/oci/database_management/db_management_client.rb', line 3323

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

  raise "Missing the required parameter 'managed_database_id' when calling list_users." 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}/users'.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[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

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

  post_body = nil

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

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

Note:

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

Returns a paginated list of errors for a given work request.

Allowed values are: timeAccepted

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :page (String)

    The page 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 the paginated response. (default to 10)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided and the default order for timeAccepted is descending. (default to timeAccepted)

  • :sort_order (String)

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

Returns:



3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
# File 'lib/oci/database_management/db_management_client.rb', line 3399

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

  raise "Missing the required parameter 'work_request_id' when calling list_work_request_errors." if work_request_id.nil?

  if opts[:sort_by] && !%w[timeAccepted].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeAccepted.'
  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 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

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

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  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_work_request_errors') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::DatabaseManagement::Models::WorkRequestErrorCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Returns a paginated list of logs for a given work request.

Allowed values are: timeAccepted

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :page (String)

    The page 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 the paginated response. (default to 10)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided and the default order for timeAccepted is descending. (default to timeAccepted)

  • :sort_order (String)

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

Returns:



3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
# File 'lib/oci/database_management/db_management_client.rb', line 3474

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

  raise "Missing the required parameter 'work_request_id' when calling list_work_request_logs." if work_request_id.nil?

  if opts[:sort_by] && !%w[timeAccepted].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeAccepted.'
  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 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

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

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  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_work_request_logs') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::DatabaseManagement::Models::WorkRequestLogEntryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

The list of work requests in a specific compartment was retrieved successfully.

Allowed values are: timeAccepted

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

  • :resource_id (String)

    The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the resource affected by the work request.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :work_request_id (String)

    The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the asynchronous work request.

  • :status (String)

    A filter that returns the resources whose status matches the given WorkRequestStatus.

  • :sort_order (String)

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

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided and the default order for timeAccepted is descending. (default to timeAccepted)

  • :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 the paginated response. (default to 10)

Returns:



3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
# File 'lib/oci/database_management/db_management_client.rb', line 3552

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

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

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

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

  path = '/workRequests'
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

#loggerLogger

Returns The logger for this client. May be nil.

Returns:

  • (Logger)

    The logger for this client. May be nil.



94
95
96
# File 'lib/oci/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:

  • (Response)

    A Response object with data of type nil



3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
# File 'lib/oci/database_management/db_management_client.rb', line 3636

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:



3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
# File 'lib/oci/database_management/db_management_client.rb', line 3700

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

#summarize_awr_db_cpu_usages(managed_database_id, awr_db_id, opts = {}) ⇒ Response

Note:

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

Summarizes the AWR CPU resource limits and metrics for the specified database in AWR.

Parameters:

  • managed_database_id (String)
  • awr_db_id (String)

    The parameter to filter the database by internal ID. Note that the internal ID of the database can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbs

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

    the optional parameters

Options Hash (opts):

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

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

  • :inst_num (String)

    The optional single value query parameter to filter the database instance number.

  • :begin_sn_id_greater_than_or_equal_to (Integer)

    The optional greater than or equal to filter on the snapshot ID.

  • :end_sn_id_less_than_or_equal_to (Integer)

    The optional less than or equal to query parameter to filter the snapshot ID.

  • :time_greater_than_or_equal_to (DateTime)

    The optional greater than or equal to query parameter to filter the timestamp.

  • :time_less_than_or_equal_to (DateTime)

    The optional less than or equal to query parameter to filter the timestamp.

  • :session_type (String)

    The optional query parameter to filter ASH activities by FOREGROUND or BACKGROUND. (default to FOREGROUND) Allowed values are: FOREGROUND, BACKGROUND, ALL

  • :container_id (Integer)

    The optional query parameter to filter the database container by an exact ID value. Note that the database container ID can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbSnapshotRanges

  • :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 large paginated response. (default to 1000)

  • :sort_by (String)

    The option to sort the AWR CPU usage summary data. (default to TIME_SAMPLED) Allowed values are: TIME_SAMPLED, AVG_VALUE

  • :sort_order (String)

    The option to sort information in ascending (u2018ASCu2019) or descending (u2018DESCu2019) order. Descending order is the default order. (default to DESC)

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



3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
# File 'lib/oci/database_management/db_management_client.rb', line 3786

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

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

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

  if opts[:sort_by] && !%w[TIME_SAMPLED AVG_VALUE].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIME_SAMPLED, AVG_VALUE.'
  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)
  raise "Parameter value for 'awr_db_id' must not be blank" if OCI::Internal::Util.blank_string?(awr_db_id)

  path = '/managedDatabases/{managedDatabaseId}/awrDbs/{awrDbId}/awrDbCpuUsages'.sub('{managedDatabaseId}', managed_database_id.to_s).sub('{awrDbId}', awr_db_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:instNum] = opts[:inst_num] if opts[:inst_num]
  query_params[:beginSnIdGreaterThanOrEqualTo] = opts[:begin_sn_id_greater_than_or_equal_to] if opts[:begin_sn_id_greater_than_or_equal_to]
  query_params[:endSnIdLessThanOrEqualTo] = opts[:end_sn_id_less_than_or_equal_to] if opts[:end_sn_id_less_than_or_equal_to]
  query_params[:timeGreaterThanOrEqualTo] = opts[:time_greater_than_or_equal_to] if opts[:time_greater_than_or_equal_to]
  query_params[:timeLessThanOrEqualTo] = opts[:time_less_than_or_equal_to] if opts[:time_less_than_or_equal_to]
  query_params[:sessionType] = opts[:session_type] if opts[:session_type]
  query_params[:containerId] = opts[:container_id] if opts[:container_id]
  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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

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

#summarize_awr_db_metrics(managed_database_id, awr_db_id, name, opts = {}) ⇒ Response

Note:

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

Summarizes the metric samples for the specified database in the AWR. The metric samples are summarized based on the Time dimension for each metric.

Parameters:

  • managed_database_id (String)
  • awr_db_id (String)

    The parameter to filter the database by internal ID. Note that the internal ID of the database can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbs

  • name (Array<String>)

    The required multiple value query parameter to filter the entity name.

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

    the optional parameters

Options Hash (opts):

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

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

  • :inst_num (String)

    The optional single value query parameter to filter the database instance number.

  • :begin_sn_id_greater_than_or_equal_to (Integer)

    The optional greater than or equal to filter on the snapshot ID.

  • :end_sn_id_less_than_or_equal_to (Integer)

    The optional less than or equal to query parameter to filter the snapshot ID.

  • :time_greater_than_or_equal_to (DateTime)

    The optional greater than or equal to query parameter to filter the timestamp.

  • :time_less_than_or_equal_to (DateTime)

    The optional less than or equal to query parameter to filter the timestamp.

  • :container_id (Integer)

    The optional query parameter to filter the database container by an exact ID value. Note that the database container ID can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbSnapshotRanges

  • :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 large paginated response. (default to 1000)

  • :sort_by (String)

    The option to sort the AWR time series summary data. (default to TIMESTAMP) Allowed values are: TIMESTAMP, NAME

  • :sort_order (String)

    The option to sort information in ascending (u2018ASCu2019) or descending (u2018DESCu2019) order. Descending order is the default order. (default to DESC)

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



3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
# File 'lib/oci/database_management/db_management_client.rb', line 3895

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

  raise "Missing the required parameter 'managed_database_id' when calling summarize_awr_db_metrics." if managed_database_id.nil?
  raise "Missing the required parameter 'awr_db_id' when calling summarize_awr_db_metrics." if awr_db_id.nil?
  raise "Missing the required parameter 'name' when calling summarize_awr_db_metrics." if name.nil?

  if opts[:sort_by] && !%w[TIMESTAMP NAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMESTAMP, 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)
  raise "Parameter value for 'awr_db_id' must not be blank" if OCI::Internal::Util.blank_string?(awr_db_id)

  path = '/managedDatabases/{managedDatabaseId}/awrDbs/{awrDbId}/awrDbMetrics'.sub('{managedDatabaseId}', managed_database_id.to_s).sub('{awrDbId}', awr_db_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:name] = OCI::ApiClient.build_collection_params(name, :multi)
  query_params[:instNum] = opts[:inst_num] if opts[:inst_num]
  query_params[:beginSnIdGreaterThanOrEqualTo] = opts[:begin_sn_id_greater_than_or_equal_to] if opts[:begin_sn_id_greater_than_or_equal_to]
  query_params[:endSnIdLessThanOrEqualTo] = opts[:end_sn_id_less_than_or_equal_to] if opts[:end_sn_id_less_than_or_equal_to]
  query_params[:timeGreaterThanOrEqualTo] = opts[:time_greater_than_or_equal_to] if opts[:time_greater_than_or_equal_to]
  query_params[:timeLessThanOrEqualTo] = opts[:time_less_than_or_equal_to] if opts[:time_less_than_or_equal_to]
  query_params[:containerId] = opts[:container_id] if opts[:container_id]
  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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

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

#summarize_awr_db_parameter_changes(managed_database_id, awr_db_id, name, opts = {}) ⇒ Response

Note:

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

Summarizes the database parameter change history for one database parameter of the specified database in AWR. One change history record contains the previous value, the changed value, and the corresponding time range. If the database parameter value was changed multiple times within the time range, then multiple change history records are created for the same parameter. Note that this API only returns information on change history details for one database parameter. To get a list of all the database parameters whose values were changed during a specified time range, use the following API endpoint: /managedDatabases/managedDatabaseId/awrDbs/awrDbId/awrDbParameters

Parameters:

  • managed_database_id (String)
  • awr_db_id (String)

    The parameter to filter the database by internal ID. Note that the internal ID of the database can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbs

  • name (String)

    The required single value query parameter to filter the entity name.

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

    the optional parameters

Options Hash (opts):

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

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

  • :inst_num (String)

    The optional single value query parameter to filter the database instance number.

  • :begin_sn_id_greater_than_or_equal_to (Integer)

    The optional greater than or equal to filter on the snapshot ID.

  • :end_sn_id_less_than_or_equal_to (Integer)

    The optional less than or equal to query parameter to filter the snapshot ID.

  • :time_greater_than_or_equal_to (DateTime)

    The optional greater than or equal to query parameter to filter the timestamp.

  • :time_less_than_or_equal_to (DateTime)

    The optional less than or equal to query parameter to filter the timestamp.

  • :container_id (Integer)

    The optional query parameter to filter the database container by an exact ID value. Note that the database container ID can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbSnapshotRanges

  • :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 large paginated response. (default to 1000)

  • :sort_by (String)

    The option to sort the AWR database parameter change history data. (default to IS_CHANGED) Allowed values are: IS_CHANGED, NAME

  • :sort_order (String)

    The option to sort information in ascending (u2018ASCu2019) or descending (u2018DESCu2019) order. Descending order is the default order. (default to DESC)

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



4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
# File 'lib/oci/database_management/db_management_client.rb', line 4005

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

  raise "Missing the required parameter 'managed_database_id' when calling summarize_awr_db_parameter_changes." if managed_database_id.nil?
  raise "Missing the required parameter 'awr_db_id' when calling summarize_awr_db_parameter_changes." if awr_db_id.nil?
  raise "Missing the required parameter 'name' when calling summarize_awr_db_parameter_changes." if name.nil?

  if opts[:sort_by] && !%w[IS_CHANGED NAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of IS_CHANGED, 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)
  raise "Parameter value for 'awr_db_id' must not be blank" if OCI::Internal::Util.blank_string?(awr_db_id)

  path = '/managedDatabases/{managedDatabaseId}/awrDbs/{awrDbId}/awrDbParameterChanges'.sub('{managedDatabaseId}', managed_database_id.to_s).sub('{awrDbId}', awr_db_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:name] = name
  query_params[:instNum] = opts[:inst_num] if opts[:inst_num]
  query_params[:beginSnIdGreaterThanOrEqualTo] = opts[:begin_sn_id_greater_than_or_equal_to] if opts[:begin_sn_id_greater_than_or_equal_to]
  query_params[:endSnIdLessThanOrEqualTo] = opts[:end_sn_id_less_than_or_equal_to] if opts[:end_sn_id_less_than_or_equal_to]
  query_params[:timeGreaterThanOrEqualTo] = opts[:time_greater_than_or_equal_to] if opts[:time_greater_than_or_equal_to]
  query_params[:timeLessThanOrEqualTo] = opts[:time_less_than_or_equal_to] if opts[:time_less_than_or_equal_to]
  query_params[:containerId] = opts[:container_id] if opts[:container_id]
  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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

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

#summarize_awr_db_parameters(managed_database_id, awr_db_id, opts = {}) ⇒ Response

Note:

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

Summarizes the database parameter history for the specified database in AWR. This includes the list of database parameters, with information on whether the parameter values were modified within the query time range. Note that each database parameter is only listed once. Depending on the optional query parameters, the returned summary gets all the database parameters, which include:

  • Each parameter whose value was changed during the time range: (valueChanged ="Y")

  • Each parameter whose value was unchanged during the time range: (valueChanged ="N")

  • Each parameter whose value was changed at the system level during the time range: (valueChanged ="Y" and valueModified = "SYSTEM_MOD")

  • Each parameter whose value was unchanged during the time range, however, the value is not the default value: (valueChanged ="N" and valueDefault = "FALSE")

Note that this API does not return information on the number of times each database parameter has been changed within the time range. To get the database parameter value change history for a specific parameter, use the following API endpoint: /managedDatabases/managedDatabaseId/awrDbs/awrDbId/awrDbParameterChanges

Parameters:

  • managed_database_id (String)
  • awr_db_id (String)

    The parameter to filter the database by internal ID. Note that the internal ID of the database can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbs

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

    the optional parameters

Options Hash (opts):

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

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

  • :inst_num (String)

    The optional single value query parameter to filter the database instance number.

  • :begin_sn_id_greater_than_or_equal_to (Integer)

    The optional greater than or equal to filter on the snapshot ID.

  • :end_sn_id_less_than_or_equal_to (Integer)

    The optional less than or equal to query parameter to filter the snapshot ID.

  • :time_greater_than_or_equal_to (DateTime)

    The optional greater than or equal to query parameter to filter the timestamp.

  • :time_less_than_or_equal_to (DateTime)

    The optional less than or equal to query parameter to filter the timestamp.

  • :container_id (Integer)

    The optional query parameter to filter the database container by an exact ID value. Note that the database container ID can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbSnapshotRanges

  • :name (Array<String>)

    The optional multiple value query parameter to filter the entity name.

  • :name_contains (String)

    The optional contains query parameter to filter the entity name by any part of the name.

  • :value_changed (String)

    The optional query parameter to filter database parameters whose values were changed. (default to Y) Allowed values are: Y, N

  • :value_default (String)

    The optional query parameter to filter the database parameters that had the default value in the last snapshot. Allowed values are: TRUE, FALSE

  • :value_modified (String)

    The optional query parameter to filter the database parameters that had a modified value in the last snapshot. Allowed values are: MODIFIED, SYSTEM_MOD, FALSE

  • :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 large paginated response. (default to 1000)

  • :sort_by (String)

    The option to sort the AWR database parameter change history data. (default to IS_CHANGED) Allowed values are: IS_CHANGED, NAME

  • :sort_order (String)

    The option to sort information in ascending (u2018ASCu2019) or descending (u2018DESCu2019) order. Descending order is the default order. (default to DESC)

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



4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
# File 'lib/oci/database_management/db_management_client.rb', line 4128

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

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

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

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

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

  if opts[:sort_by] && !%w[IS_CHANGED NAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of IS_CHANGED, 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)
  raise "Parameter value for 'awr_db_id' must not be blank" if OCI::Internal::Util.blank_string?(awr_db_id)

  path = '/managedDatabases/{managedDatabaseId}/awrDbs/{awrDbId}/awrDbParameters'.sub('{managedDatabaseId}', managed_database_id.to_s).sub('{awrDbId}', awr_db_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:instNum] = opts[:inst_num] if opts[:inst_num]
  query_params[:beginSnIdGreaterThanOrEqualTo] = opts[:begin_sn_id_greater_than_or_equal_to] if opts[:begin_sn_id_greater_than_or_equal_to]
  query_params[:endSnIdLessThanOrEqualTo] = opts[:end_sn_id_less_than_or_equal_to] if opts[:end_sn_id_less_than_or_equal_to]
  query_params[:timeGreaterThanOrEqualTo] = opts[:time_greater_than_or_equal_to] if opts[:time_greater_than_or_equal_to]
  query_params[:timeLessThanOrEqualTo] = opts[:time_less_than_or_equal_to] if opts[:time_less_than_or_equal_to]
  query_params[:containerId] = opts[:container_id] if opts[:container_id]
  query_params[:name] = OCI::ApiClient.build_collection_params(opts[:name], :multi) if opts[:name] && !opts[:name].empty?
  query_params[:nameContains] = opts[:name_contains] if opts[:name_contains]
  query_params[:valueChanged] = opts[:value_changed] if opts[:value_changed]
  query_params[:valueDefault] = opts[:value_default] if opts[:value_default]
  query_params[:valueModified] = opts[:value_modified] if opts[:value_modified]
  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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

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

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

Note:

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

Summarizes the AWR snapshot ranges that contain continuous snapshots, for the specified Managed 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

  • :name (String)

    The optional single value query parameter to filter the entity name.

  • :time_greater_than_or_equal_to (DateTime)

    The optional greater than or equal to query parameter to filter the timestamp.

  • :time_less_than_or_equal_to (DateTime)

    The optional less than or equal to query parameter to filter the timestamp.

  • :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 the paginated response. (default to 10)

  • :sort_by (String)

    The option to sort the AWR summary data. (default to END_INTERVAL_TIME) Allowed values are: END_INTERVAL_TIME, NAME

  • :sort_order (String)

    The option to sort information in ascending (u2018ASCu2019) or descending (u2018DESCu2019) order. Descending order is the default order. (default to DESC)

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



4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
# File 'lib/oci/database_management/db_management_client.rb', line 4238

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

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

  if opts[:sort_by] && !%w[END_INTERVAL_TIME NAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of END_INTERVAL_TIME, 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}/awrDbSnapshotRanges'.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[:timeGreaterThanOrEqualTo] = opts[:time_greater_than_or_equal_to] if opts[:time_greater_than_or_equal_to]
  query_params[:timeLessThanOrEqualTo] = opts[:time_less_than_or_equal_to] if opts[:time_less_than_or_equal_to]
  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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

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

#summarize_awr_db_sysstats(managed_database_id, awr_db_id, name, opts = {}) ⇒ Response

Note:

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

Summarizes the AWR SYSSTAT sample data for the specified database in AWR. The statistical data is summarized based on the Time dimension for each statistic.

Parameters:

  • managed_database_id (String)
  • awr_db_id (String)

    The parameter to filter the database by internal ID. Note that the internal ID of the database can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbs

  • name (Array<String>)

    The required multiple value query parameter to filter the entity name.

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

    the optional parameters

Options Hash (opts):

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

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

  • :inst_num (String)

    The optional single value query parameter to filter the database instance number.

  • :begin_sn_id_greater_than_or_equal_to (Integer)

    The optional greater than or equal to filter on the snapshot ID.

  • :end_sn_id_less_than_or_equal_to (Integer)

    The optional less than or equal to query parameter to filter the snapshot ID.

  • :time_greater_than_or_equal_to (DateTime)

    The optional greater than or equal to query parameter to filter the timestamp.

  • :time_less_than_or_equal_to (DateTime)

    The optional less than or equal to query parameter to filter the timestamp.

  • :container_id (Integer)

    The optional query parameter to filter the database container by an exact ID value. Note that the database container ID can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbSnapshotRanges

  • :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 large paginated response. (default to 1000)

  • :sort_by (String)

    The option to sort the data within a time period. (default to TIME_BEGIN) Allowed values are: TIME_BEGIN, NAME

  • :sort_order (String)

    The option to sort information in ascending (u2018ASCu2019) or descending (u2018DESCu2019) order. Descending order is the default order. (default to DESC)

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



4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
# File 'lib/oci/database_management/db_management_client.rb', line 4337

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

  raise "Missing the required parameter 'managed_database_id' when calling summarize_awr_db_sysstats." if managed_database_id.nil?
  raise "Missing the required parameter 'awr_db_id' when calling summarize_awr_db_sysstats." if awr_db_id.nil?
  raise "Missing the required parameter 'name' when calling summarize_awr_db_sysstats." if name.nil?

  if opts[:sort_by] && !%w[TIME_BEGIN NAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIME_BEGIN, 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)
  raise "Parameter value for 'awr_db_id' must not be blank" if OCI::Internal::Util.blank_string?(awr_db_id)

  path = '/managedDatabases/{managedDatabaseId}/awrDbs/{awrDbId}/awrDbSysstats'.sub('{managedDatabaseId}', managed_database_id.to_s).sub('{awrDbId}', awr_db_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:name] = OCI::ApiClient.build_collection_params(name, :multi)
  query_params[:instNum] = opts[:inst_num] if opts[:inst_num]
  query_params[:beginSnIdGreaterThanOrEqualTo] = opts[:begin_sn_id_greater_than_or_equal_to] if opts[:begin_sn_id_greater_than_or_equal_to]
  query_params[:endSnIdLessThanOrEqualTo] = opts[:end_sn_id_less_than_or_equal_to] if opts[:end_sn_id_less_than_or_equal_to]
  query_params[:timeGreaterThanOrEqualTo] = opts[:time_greater_than_or_equal_to] if opts[:time_greater_than_or_equal_to]
  query_params[:timeLessThanOrEqualTo] = opts[:time_less_than_or_equal_to] if opts[:time_less_than_or_equal_to]
  query_params[:containerId] = opts[:container_id] if opts[:container_id]
  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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

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

#summarize_awr_db_top_wait_events(managed_database_id, awr_db_id, opts = {}) ⇒ Response

Note:

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

Summarizes the AWR top wait events.

Parameters:

  • managed_database_id (String)
  • awr_db_id (String)

    The parameter to filter the database by internal ID. Note that the internal ID of the database can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbs

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

    the optional parameters

Options Hash (opts):

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

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

  • :inst_num (String)

    The optional single value query parameter to filter the database instance number.

  • :begin_sn_id_greater_than_or_equal_to (Integer)

    The optional greater than or equal to filter on the snapshot ID.

  • :end_sn_id_less_than_or_equal_to (Integer)

    The optional less than or equal to query parameter to filter the snapshot ID.

  • :time_greater_than_or_equal_to (DateTime)

    The optional greater than or equal to query parameter to filter the timestamp.

  • :time_less_than_or_equal_to (DateTime)

    The optional less than or equal to query parameter to filter the timestamp.

  • :session_type (String)

    The optional query parameter to filter ASH activities by FOREGROUND or BACKGROUND. (default to FOREGROUND) Allowed values are: FOREGROUND, BACKGROUND, ALL

  • :container_id (Integer)

    The optional query parameter to filter the database container by an exact ID value. Note that the database container ID can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbSnapshotRanges

  • :top_n (Integer)

    The optional query parameter to filter the number of top categories to be returned. (default to 10)

  • :sort_by (String)

    The option to sort the AWR top event summary data. (default to WAITS_PERSEC) Allowed values are: WAITS_PERSEC, AVG_WAIT_TIME_PERSEC

  • :sort_order (String)

    The option to sort information in ascending (u2018ASCu2019) or descending (u2018DESCu2019) order. Descending order is the default order. (default to DESC)

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



4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
# File 'lib/oci/database_management/db_management_client.rb', line 4441

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

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

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

  if opts[:sort_by] && !%w[WAITS_PERSEC AVG_WAIT_TIME_PERSEC].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of WAITS_PERSEC, AVG_WAIT_TIME_PERSEC.'
  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)
  raise "Parameter value for 'awr_db_id' must not be blank" if OCI::Internal::Util.blank_string?(awr_db_id)

  path = '/managedDatabases/{managedDatabaseId}/awrDbs/{awrDbId}/awrDbTopWaitEvents'.sub('{managedDatabaseId}', managed_database_id.to_s).sub('{awrDbId}', awr_db_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:instNum] = opts[:inst_num] if opts[:inst_num]
  query_params[:beginSnIdGreaterThanOrEqualTo] = opts[:begin_sn_id_greater_than_or_equal_to] if opts[:begin_sn_id_greater_than_or_equal_to]
  query_params[:endSnIdLessThanOrEqualTo] = opts[:end_sn_id_less_than_or_equal_to] if opts[:end_sn_id_less_than_or_equal_to]
  query_params[:timeGreaterThanOrEqualTo] = opts[:time_greater_than_or_equal_to] if opts[:time_greater_than_or_equal_to]
  query_params[:timeLessThanOrEqualTo] = opts[:time_less_than_or_equal_to] if opts[:time_less_than_or_equal_to]
  query_params[:sessionType] = opts[:session_type] if opts[:session_type]
  query_params[:containerId] = opts[:container_id] if opts[:container_id]
  query_params[:topN] = opts[:top_n] if opts[:top_n]
  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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

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

#summarize_awr_db_wait_event_buckets(managed_database_id, awr_db_id, name, opts = {}) ⇒ Response

Note:

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

Summarizes AWR wait event data into value buckets and frequency, for the specified database in the AWR.

Parameters:

  • managed_database_id (String)
  • awr_db_id (String)

    The parameter to filter the database by internal ID. Note that the internal ID of the database can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbs

  • name (String)

    The required single value query parameter to filter the entity name.

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

    the optional parameters

Options Hash (opts):

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

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

  • :inst_num (String)

    The optional single value query parameter to filter the database instance number.

  • :begin_sn_id_greater_than_or_equal_to (Integer)

    The optional greater than or equal to filter on the snapshot ID.

  • :end_sn_id_less_than_or_equal_to (Integer)

    The optional less than or equal to query parameter to filter the snapshot ID.

  • :time_greater_than_or_equal_to (DateTime)

    The optional greater than or equal to query parameter to filter the timestamp.

  • :time_less_than_or_equal_to (DateTime)

    The optional less than or equal to query parameter to filter the timestamp.

  • :num_bucket (Integer)

    The number of buckets within the histogram. (default to 10)

  • :min_value (Float)

    The minimum value of the histogram. (default to 0)

  • :max_value (Float)

    The maximum value of the histogram.

  • :container_id (Integer)

    The optional query parameter to filter the database container by an exact ID value. Note that the database container ID can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbSnapshotRanges

  • :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 large paginated response. (default to 1000)

  • :sort_by (String)

    The option to sort distribution data. (default to CATEGORY) Allowed values are: CATEGORY, PERCENTAGE

  • :sort_order (String)

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

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



4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
# File 'lib/oci/database_management/db_management_client.rb', line 4552

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

  raise "Missing the required parameter 'managed_database_id' when calling summarize_awr_db_wait_event_buckets." if managed_database_id.nil?
  raise "Missing the required parameter 'awr_db_id' when calling summarize_awr_db_wait_event_buckets." if awr_db_id.nil?
  raise "Missing the required parameter 'name' when calling summarize_awr_db_wait_event_buckets." if name.nil?

  if opts[:sort_by] && !%w[CATEGORY PERCENTAGE].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of CATEGORY, PERCENTAGE.'
  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)
  raise "Parameter value for 'awr_db_id' must not be blank" if OCI::Internal::Util.blank_string?(awr_db_id)

  path = '/managedDatabases/{managedDatabaseId}/awrDbs/{awrDbId}/awrDbWaitEventBuckets'.sub('{managedDatabaseId}', managed_database_id.to_s).sub('{awrDbId}', awr_db_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:name] = name
  query_params[:instNum] = opts[:inst_num] if opts[:inst_num]
  query_params[:beginSnIdGreaterThanOrEqualTo] = opts[:begin_sn_id_greater_than_or_equal_to] if opts[:begin_sn_id_greater_than_or_equal_to]
  query_params[:endSnIdLessThanOrEqualTo] = opts[:end_sn_id_less_than_or_equal_to] if opts[:end_sn_id_less_than_or_equal_to]
  query_params[:timeGreaterThanOrEqualTo] = opts[:time_greater_than_or_equal_to] if opts[:time_greater_than_or_equal_to]
  query_params[:timeLessThanOrEqualTo] = opts[:time_less_than_or_equal_to] if opts[:time_less_than_or_equal_to]
  query_params[:numBucket] = opts[:num_bucket] if opts[:num_bucket]
  query_params[:minValue] = opts[:min_value] if opts[:min_value]
  query_params[:maxValue] = opts[:max_value] if opts[:max_value]
  query_params[:containerId] = opts[:container_id] if opts[:container_id]
  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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

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

#summarize_awr_db_wait_events(managed_database_id, awr_db_id, opts = {}) ⇒ Response

Note:

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

Summarizes the AWR wait event sample data for the specified database in the AWR. The event data is summarized based on the Time dimension for each event.

Parameters:

  • managed_database_id (String)
  • awr_db_id (String)

    The parameter to filter the database by internal ID. Note that the internal ID of the database can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbs

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

    the optional parameters

Options Hash (opts):

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

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

  • :inst_num (String)

    The optional single value query parameter to filter the database instance number.

  • :begin_sn_id_greater_than_or_equal_to (Integer)

    The optional greater than or equal to filter on the snapshot ID.

  • :end_sn_id_less_than_or_equal_to (Integer)

    The optional less than or equal to query parameter to filter the snapshot ID.

  • :time_greater_than_or_equal_to (DateTime)

    The optional greater than or equal to query parameter to filter the timestamp.

  • :time_less_than_or_equal_to (DateTime)

    The optional less than or equal to query parameter to filter the timestamp.

  • :name (Array<String>)

    The optional multiple value query parameter to filter the entity name.

  • :session_type (String)

    The optional query parameter to filter ASH activities by FOREGROUND or BACKGROUND. (default to FOREGROUND) Allowed values are: FOREGROUND, BACKGROUND, ALL

  • :container_id (Integer)

    The optional query parameter to filter the database container by an exact ID value. Note that the database container ID can be retrieved from the following endpoint: /managedDatabases/managedDatabaseId/awrDbSnapshotRanges

  • :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 large paginated response. (default to 1000)

  • :sort_by (String)

    The option to sort the data within a time period. (default to TIME_BEGIN) Allowed values are: TIME_BEGIN, NAME

  • :sort_order (String)

    The option to sort information in ascending (u2018ASCu2019) or descending (u2018DESCu2019) order. Descending order is the default order. (default to DESC)

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



4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
# File 'lib/oci/database_management/db_management_client.rb', line 4663

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

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

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

  if opts[:sort_by] && !%w[TIME_BEGIN NAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIME_BEGIN, 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)
  raise "Parameter value for 'awr_db_id' must not be blank" if OCI::Internal::Util.blank_string?(awr_db_id)

  path = '/managedDatabases/{managedDatabaseId}/awrDbs/{awrDbId}/awrDbWaitEvents'.sub('{managedDatabaseId}', managed_database_id.to_s).sub('{awrDbId}', awr_db_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:instNum] = opts[:inst_num] if opts[:inst_num]
  query_params[:beginSnIdGreaterThanOrEqualTo] = opts[:begin_sn_id_greater_than_or_equal_to] if opts[:begin_sn_id_greater_than_or_equal_to]
  query_params[:endSnIdLessThanOrEqualTo] = opts[:end_sn_id_less_than_or_equal_to] if opts[:end_sn_id_less_than_or_equal_to]
  query_params[:timeGreaterThanOrEqualTo] = opts[:time_greater_than_or_equal_to] if opts[:time_greater_than_or_equal_to]
  query_params[:timeLessThanOrEqualTo] = opts[:time_less_than_or_equal_to] if opts[:time_less_than_or_equal_to]
  query_params[:name] = OCI::ApiClient.build_collection_params(opts[:name], :multi) if opts[:name] && !opts[:name].empty?
  query_params[:sessionType] = opts[:session_type] if opts[:session_type]
  query_params[:containerId] = opts[:container_id] if opts[:container_id]
  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]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

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

#summarize_job_executions_statuses(compartment_id, start_time, end_time, opts = {}) ⇒ Response

Note:

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

Gets the number of job executions grouped by status for a job, Managed Database, or Database Group in a specific compartment. Only one of the parameters, jobId, managedDatabaseId, or managedDatabaseGroupId should be provided.

Parameters:

  • compartment_id (String)
  • start_time (String)

    The start time of the time range to retrieve the status summary of job executions in UTC in ISO-8601 format, which is "yyyy-MM-dd’T’hh:mm:ss.sss’Z’".

  • end_time (String)

    The end time of the time range to retrieve the status summary of job executions in UTC in ISO-8601 format, which is "yyyy-MM-dd’T’hh:mm:ss.sss’Z’".

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

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

  • :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. Ascending order is the default order. (default to ASC)

Returns:



4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
# File 'lib/oci/database_management/db_management_client.rb', line 4761

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

  raise "Missing the required parameter 'compartment_id' when calling summarize_job_executions_statuses." if compartment_id.nil?
  raise "Missing the required parameter 'start_time' when calling summarize_job_executions_statuses." if start_time.nil?
  raise "Missing the required parameter 'end_time' when calling summarize_job_executions_statuses." if end_time.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 = '/jobExecutionsStatus'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:startTime] = start_time
  query_params[:endTime] = end_time
  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[: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#summarize_job_executions_statuses') 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::JobExecutionsStatusSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_db_management_private_endpoint(db_management_private_endpoint_id, update_db_management_private_endpoint_details, opts = {}) ⇒ Response

Note:

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

Updates one or more attributes of a specific Database Management private endpoint.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :if_match (String)

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

Returns:



4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
# File 'lib/oci/database_management/db_management_client.rb', line 4840

def update_db_management_private_endpoint(db_management_private_endpoint_id, update_db_management_private_endpoint_details, opts = {})
  logger.debug 'Calling operation DbManagementClient#update_db_management_private_endpoint.' if logger

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

  path = '/dbManagementPrivateEndpoints/{dbManagementPrivateEndpointId}'.sub('{dbManagementPrivateEndpointId}', db_management_private_endpoint_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(update_db_management_private_endpoint_details)

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

#update_job(job_id, update_job_details, opts = {}) ⇒ Response

Note:

Updates the details for the recurring scheduled job specified by jobId. Note that non-recurring (one time) jobs cannot be updated.

Parameters:

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :if_match (String)

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

Returns:

  • (Response)

    A Response object with data of type Job



4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
# File 'lib/oci/database_management/db_management_client.rb', line 4904

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

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

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

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

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

  post_body = @api_client.object_to_http_body(update_job_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DbManagementClient#update_job') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::DatabaseManagement::Models::Job'
    )
  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:



4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
# File 'lib/oci/database_management/db_management_client.rb', line 4968

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