Class: OCI::DatabaseManagement::ManagedMySqlDatabasesClient

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

Overview

Use the Database Management API to monitor and manage resources such as Oracle Databases, MySQL Databases, and External Database Systems. For more information, see Database Management.

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

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



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

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 "ManagedMySqlDatabasesClient endpoint set to '#{@endpoint}'." if logger
end

Instance Attribute Details

#api_clientOCI::ApiClient (readonly)

Client used to make HTTP requests.

Returns:



17
18
19
# File 'lib/oci/database_management/managed_my_sql_databases_client.rb', line 17

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


21
22
23
# File 'lib/oci/database_management/managed_my_sql_databases_client.rb', line 21

def endpoint
  @endpoint
end

#regionString

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

Returns:

  • (String)


31
32
33
# File 'lib/oci/database_management/managed_my_sql_databases_client.rb', line 31

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



27
28
29
# File 'lib/oci/database_management/managed_my_sql_databases_client.rb', line 27

def retry_config
  @retry_config
end

Instance Method Details

#change_mysql_database_management_type(managed_my_sql_database_id, change_mysql_database_management_type_details, opts = {}) ⇒ Response

Note:

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

Changes the management type for a HeatWave MySQL instance, from BASIC to FULL and vice versa. It can also be used to enable or disable Database Management. MySQL support within OCI Database Management service has been deprecated as of January 29, 2026.

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.

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



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

def change_mysql_database_management_type(managed_my_sql_database_id, change_mysql_database_management_type_details, opts = {})
  logger.debug 'Calling operation ManagedMySqlDatabasesClient#change_mysql_database_management_type.' if logger

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

  path = '/managedMySqlDatabases/{managedMySqlDatabaseId}/actions/changeManagementType'.sub('{managedMySqlDatabaseId}', managed_my_sql_database_id.to_s)
  operation_signing_strategy = :standard

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

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'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
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_mysql_database_management_type_details)

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

#get_binary_log_information(managed_my_sql_database_id, opts = {}) ⇒ Response

Note:

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

Retrieves information pertaining to the binary log of a specific MySQL server. MySQL support within OCI Database Management service has been deprecated as of January 29, 2026.

Parameters:

  • managed_my_sql_database_id (String)

    The OCID of the Managed MySQL Database.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



188
189
190
191
192
193
194
195
196
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
# File 'lib/oci/database_management/managed_my_sql_databases_client.rb', line 188

def get_binary_log_information(managed_my_sql_database_id, opts = {})
  logger.debug 'Calling operation ManagedMySqlDatabasesClient#get_binary_log_information.' if logger

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

  path = '/managedMySqlDatabases/{managedMySqlDatabaseId}/binaryLogInformation'.sub('{managedMySqlDatabaseId}', managed_my_sql_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: 'ManagedMySqlDatabasesClient#get_binary_log_information') 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::ManagedMySqlDatabaseBinaryLogInformation'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_general_replication_information(managed_my_sql_database_id, opts = {}) ⇒ Response

Note:

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

Retrieves general information regarding the replication of a specific MySQL server. MySQL support within OCI Database Management service has been deprecated as of January 29, 2026.

Parameters:

  • managed_my_sql_database_id (String)

    The OCID of the Managed MySQL Database.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
# File 'lib/oci/database_management/managed_my_sql_databases_client.rb', line 244

def get_general_replication_information(managed_my_sql_database_id, opts = {})
  logger.debug 'Calling operation ManagedMySqlDatabasesClient#get_general_replication_information.' if logger

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

  path = '/managedMySqlDatabases/{managedMySqlDatabaseId}/generalReplicationInformation'.sub('{managedMySqlDatabaseId}', managed_my_sql_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: 'ManagedMySqlDatabasesClient#get_general_replication_information') 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::ManagedMySqlDatabaseGeneralReplicationInformation'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Gets the health metrics for a fleet of HeatWave clusters in a compartment. MySQL support within OCI Database Management service has been deprecated as of January 29, 2026.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

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

  • :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_heat_wave_status (String)

    The parameter to filter by HeatWave cluster status.

  • :filter_by_heat_wave_shape (String)

    The parameter to filter by HeatWave node shape.

  • :is_heat_wave_lakehouse_enabled (BOOLEAN)

    The parameter to filter based on whether HeatWave Lakehouse is enabled for the cluster.

Returns:



310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
# File 'lib/oci/database_management/managed_my_sql_databases_client.rb', line 310

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

  raise "Missing the required parameter 'compartment_id' when calling get_heat_wave_fleet_metric." if compartment_id.nil?
  raise "Missing the required parameter 'start_time' when calling get_heat_wave_fleet_metric." if start_time.nil?
  raise "Missing the required parameter 'end_time' when calling get_heat_wave_fleet_metric." if end_time.nil?

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

  path = '/heatWaveFleetMetrics'
  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[:filterByMetricNames] = opts[:filter_by_metric_names] if opts[:filter_by_metric_names]
  query_params[:filterByHeatWaveStatus] = opts[:filter_by_heat_wave_status] if opts[:filter_by_heat_wave_status]
  query_params[:filterByHeatWaveShape] = opts[:filter_by_heat_wave_shape] if opts[:filter_by_heat_wave_shape]
  query_params[:isHeatWaveLakehouseEnabled] = opts[:is_heat_wave_lakehouse_enabled] if !opts[:is_heat_wave_lakehouse_enabled].nil?

  # 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: 'ManagedMySqlDatabasesClient#get_heat_wave_fleet_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::HeatWaveFleetMetrics'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_managed_my_sql_database(managed_my_sql_database_id, opts = {}) ⇒ Response

Note:

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

Retrieves the general information for a specific MySQL Database. MySQL support within OCI Database Management service has been deprecated as of January 29, 2026.

Parameters:

  • managed_my_sql_database_id (String)

    The OCID of the Managed MySQL Database.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
# File 'lib/oci/database_management/managed_my_sql_databases_client.rb', line 378

def get_managed_my_sql_database(managed_my_sql_database_id, opts = {})
  logger.debug 'Calling operation ManagedMySqlDatabasesClient#get_managed_my_sql_database.' if logger

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

  path = '/managedMySqlDatabases/{managedMySqlDatabaseId}'.sub('{managedMySqlDatabaseId}', managed_my_sql_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: 'ManagedMySqlDatabasesClient#get_managed_my_sql_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::ManagedMySqlDatabase'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Gets the health metrics for a fleet of MySQL Databases in a compartment. MySQL support within OCI Database Management service has been deprecated as of January 29, 2026.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

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

  • :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_my_sql_deployment_type_param (String)

    The parameter to filter by MySQL deployment type.

  • :filter_by_mds_deployment_type (String)

    The parameter to filter by MySQL Database System type.

  • :filter_by_my_sql_database_type_param (String)

    The parameter to filter by MySQL database type. Allowed values are EXTERNAL or MDS.

  • :filter_by_my_sql_status (String)

    The parameter to filter by MySQL Database status.

  • :filter_by_my_sql_database_version (String)

    The parameter to filter by MySQL database version.

  • :is_heat_wave_enabled (BOOLEAN)

    The parameter to filter based on whether HeatWave is enabled for the database.

Returns:



447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
# File 'lib/oci/database_management/managed_my_sql_databases_client.rb', line 447

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

  raise "Missing the required parameter 'compartment_id' when calling get_my_sql_fleet_metric." if compartment_id.nil?
  raise "Missing the required parameter 'start_time' when calling get_my_sql_fleet_metric." if start_time.nil?
  raise "Missing the required parameter 'end_time' when calling get_my_sql_fleet_metric." if end_time.nil?

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

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

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

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

  path = '/mysqlFleetMetrics'
  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[:filterByMetricNames] = opts[:filter_by_metric_names] if opts[:filter_by_metric_names]
  query_params[:filterByMySqlDeploymentTypeParam] = opts[:filter_by_my_sql_deployment_type_param] if opts[:filter_by_my_sql_deployment_type_param]
  query_params[:filterByMdsDeploymentType] = opts[:filter_by_mds_deployment_type] if opts[:filter_by_mds_deployment_type]
  query_params[:filterByMySqlDatabaseTypeParam] = opts[:filter_by_my_sql_database_type_param] if opts[:filter_by_my_sql_database_type_param]
  query_params[:filterByMySqlStatus] = opts[:filter_by_my_sql_status] if opts[:filter_by_my_sql_status]
  query_params[:filterByMySqlDatabaseVersion] = opts[:filter_by_my_sql_database_version] if opts[:filter_by_my_sql_database_version]
  query_params[:isHeatWaveEnabled] = opts[:is_heat_wave_enabled] if !opts[:is_heat_wave_enabled].nil?

  # 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: 'ManagedMySqlDatabasesClient#get_my_sql_fleet_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::MySqlFleetMetrics'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_my_sql_query_details(managed_my_sql_database_id, digest, opts = {}) ⇒ Response

Note:

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

Retrieves query sample details, explain plan, and potential warnings for a given digest. MySQL support within OCI Database Management service has been deprecated as of January 29, 2026.

Parameters:

  • managed_my_sql_database_id (String)

    The OCID of the Managed MySQL Database.

  • digest (String)

    The digest of a MySQL normalized query.

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



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

def get_my_sql_query_details(managed_my_sql_database_id, digest, opts = {})
  logger.debug 'Calling operation ManagedMySqlDatabasesClient#get_my_sql_query_details.' if logger

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

  path = '/managedMySqlDatabases/{managedMySqlDatabaseId}/queryDetails'.sub('{managedMySqlDatabaseId}', managed_my_sql_database_id.to_s)
  operation_signing_strategy = :standard

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

  # 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: 'ManagedMySqlDatabasesClient#get_my_sql_query_details') 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::MySqlQueryDetails'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_high_availability_members(managed_my_sql_database_id, opts = {}) ⇒ Response

Note:

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

Retrieves information about the high availability members of a specific MySQL server's replication group. MySQL support within OCI Database Management service has been deprecated as of January 29, 2026.

Parameters:

  • managed_my_sql_database_id (String)

    The OCID of the Managed MySQL Database.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :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 by field is u2018memberHostu2019. The default sort order for u2018memberHostu2019 is ascending. The u2018memberHostu2019 sort order is case-sensitive. (default to memberHost) Allowed values are: memberHost

Returns:



600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
# File 'lib/oci/database_management/managed_my_sql_databases_client.rb', line 600

def list_high_availability_members(managed_my_sql_database_id, opts = {})
  logger.debug 'Calling operation ManagedMySqlDatabasesClient#list_high_availability_members.' if logger

  raise "Missing the required parameter 'managed_my_sql_database_id' when calling list_high_availability_members." if managed_my_sql_database_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[memberHost].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of memberHost.'
  end
  raise "Parameter value for 'managed_my_sql_database_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_my_sql_database_id)

  path = '/managedMySqlDatabases/{managedMySqlDatabaseId}/highAvailabilityMembers'.sub('{managedMySqlDatabaseId}', managed_my_sql_database_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[: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: 'ManagedMySqlDatabasesClient#list_high_availability_members') 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::ManagedMySqlDatabaseHighAvailabilityMemberCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_inbound_replications(managed_my_sql_database_id, opts = {}) ⇒ Response

Note:

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

Retrieves information about the inbound replications of a specific MySQL server. MySQL support within OCI Database Management service has been deprecated as of January 29, 2026.

Parameters:

  • managed_my_sql_database_id (String)

    The OCID of the Managed MySQL Database.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :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 by field is u2018sourceHostu2019. The default sort order for u2018sourceHostu2019 is ascending. The u2018sourceHostu2019 sort order is case-sensitive. (default to sourceHost) Allowed values are: sourceHost

Returns:



679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
# File 'lib/oci/database_management/managed_my_sql_databases_client.rb', line 679

def list_inbound_replications(managed_my_sql_database_id, opts = {})
  logger.debug 'Calling operation ManagedMySqlDatabasesClient#list_inbound_replications.' if logger

  raise "Missing the required parameter 'managed_my_sql_database_id' when calling list_inbound_replications." if managed_my_sql_database_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[sourceHost].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of sourceHost.'
  end
  raise "Parameter value for 'managed_my_sql_database_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_my_sql_database_id)

  path = '/managedMySqlDatabases/{managedMySqlDatabaseId}/inboundReplications'.sub('{managedMySqlDatabaseId}', managed_my_sql_database_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[: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: 'ManagedMySqlDatabasesClient#list_inbound_replications') 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::ManagedMySqlDatabaseInboundReplicationCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_managed_my_sql_database_configuration_data(managed_my_sql_database_id, opts = {}) ⇒ Response

Note:

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

Retrieves configuration data for a specific MySQL database. MySQL support within OCI Database Management service has been deprecated as of January 29, 2026.

Parameters:

  • managed_my_sql_database_id (String)

    The OCID of the Managed MySQL Database.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

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

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

Returns:



757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
# File 'lib/oci/database_management/managed_my_sql_databases_client.rb', line 757

def list_managed_my_sql_database_configuration_data(managed_my_sql_database_id, opts = {})
  logger.debug 'Calling operation ManagedMySqlDatabasesClient#list_managed_my_sql_database_configuration_data.' if logger

  raise "Missing the required parameter 'managed_my_sql_database_id' when calling list_managed_my_sql_database_configuration_data." if managed_my_sql_database_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[TIMECREATED NAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, NAME.'
  end
  raise "Parameter value for 'managed_my_sql_database_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_my_sql_database_id)

  path = '/managedMySqlDatabases/{managedMySqlDatabaseId}/configurationData'.sub('{managedMySqlDatabaseId}', managed_my_sql_database_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[: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: 'ManagedMySqlDatabasesClient#list_managed_my_sql_database_configuration_data') 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::MySqlConfigurationDataCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_managed_my_sql_database_sql_data(managed_my_sql_database_id, start_time, end_time, opts = {}) ⇒ Response

Note:

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

Retrieves the SQL performance data for a specific MySQL database. MySQL support within OCI Database Management service has been deprecated as of January 29, 2026.

Parameters:

  • managed_my_sql_database_id (String)

    The OCID of the Managed MySQL Database.

  • 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

  • :filter_column (String)

    The parameter to filter results by key criteria which include : - AVG_TIMER_WAIT - SUM_TIMER_WAIT - COUNT_STAR - SUM_ERRORS - SUM_ROWS_AFFECTED - SUM_ROWS_SENT - SUM_ROWS_EXAMINED - SUM_CREATED_TMP_TABLES - SUM_NO_INDEX_USED - SUM_NO_GOOD_INDEX_USED - FIRST_SEEN - LAST_SEEN - HEATWAVE_OFFLOADED - HEATWAVE_OUT_OF_MEMORY

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



857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
# File 'lib/oci/database_management/managed_my_sql_databases_client.rb', line 857

def list_managed_my_sql_database_sql_data(managed_my_sql_database_id, start_time, end_time, opts = {})
  logger.debug 'Calling operation ManagedMySqlDatabasesClient#list_managed_my_sql_database_sql_data.' if logger

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

  path = '/managedMySqlDatabases/{managedMySqlDatabaseId}/sqlData'.sub('{managedMySqlDatabaseId}', managed_my_sql_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[:filterColumn] = opts[:filter_column] if opts[:filter_column]
  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: 'ManagedMySqlDatabasesClient#list_managed_my_sql_database_sql_data') 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::MySqlDataCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

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

Gets the list of Managed MySQL Databases in a specific compartment. MySQL support within OCI Database Management service has been deprecated as of January 29, 2026.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

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

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

  • :filter_by_my_sql_database_type_param (String)

    The parameter to filter by MySQL database type. Allowed values are EXTERNAL or MDS.

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



941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
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
# File 'lib/oci/database_management/managed_my_sql_databases_client.rb', line 941

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

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

  if opts[:filter_by_my_sql_database_type_param] && !OCI::DatabaseManagement::Models::MY_SQL_TYPE_ENUM.include?(opts[:filter_by_my_sql_database_type_param])
    raise 'Invalid value for "filter_by_my_sql_database_type_param", must be one of the values in OCI::DatabaseManagement::Models::MY_SQL_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 = '/managedMySqlDatabases'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:filterByMySqlDatabaseTypeParam] = opts[:filter_by_my_sql_database_type_param] if opts[:filter_by_my_sql_database_type_param]
  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: 'ManagedMySqlDatabasesClient#list_managed_my_sql_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::ManagedMySqlDatabaseCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_my_sql_digest_errors(managed_my_sql_database_id, digest, opts = {}) ⇒ Response

Note:

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

Retrieves any potential errors for a given digest. MySQL support within OCI Database Management service has been deprecated as of January 29, 2026.

Parameters:

  • managed_my_sql_database_id (String)

    The OCID of the Managed MySQL Database.

  • digest (String)

    The digest of a MySQL normalized query.

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

  • :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 by field is u2018occurrenceCountu2019. The default sort order for u2018occurrenceCountu2019 is descending. (default to occurrenceCount) Allowed values are: occurrenceCount

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



1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
# File 'lib/oci/database_management/managed_my_sql_databases_client.rb', line 1025

def list_my_sql_digest_errors(managed_my_sql_database_id, digest, opts = {})
  logger.debug 'Calling operation ManagedMySqlDatabasesClient#list_my_sql_digest_errors.' if logger

  raise "Missing the required parameter 'managed_my_sql_database_id' when calling list_my_sql_digest_errors." if managed_my_sql_database_id.nil?
  raise "Missing the required parameter 'digest' when calling list_my_sql_digest_errors." if digest.nil?

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

  path = '/managedMySqlDatabases/{managedMySqlDatabaseId}/digestErrors'.sub('{managedMySqlDatabaseId}', managed_my_sql_database_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:digest] = digest
  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: 'ManagedMySqlDatabasesClient#list_my_sql_digest_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::MySqlDigestErrorsCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_outbound_replications(managed_my_sql_database_id, opts = {}) ⇒ Response

Note:

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

Retrieves information pertaining to the outbound replications of a specific MySQL server. MySQL support within OCI Database Management service has been deprecated as of January 29, 2026.

Parameters:

  • managed_my_sql_database_id (String)

    The OCID of the Managed MySQL Database.

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

    the optional parameters

Options Hash (opts):

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

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

  • :opc_request_id (String)

    The client request ID for tracing.

  • :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 by field is u2018replicaHostu2019. The default sort order for u2018replicaHostu2019 is ascending. The u2018replicaHostu2019 sort order is case-sensitive. (default to replicaHost) Allowed values are: replicaHost

Returns:



1106
1107
1108
1109
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
# File 'lib/oci/database_management/managed_my_sql_databases_client.rb', line 1106

def list_outbound_replications(managed_my_sql_database_id, opts = {})
  logger.debug 'Calling operation ManagedMySqlDatabasesClient#list_outbound_replications.' if logger

  raise "Missing the required parameter 'managed_my_sql_database_id' when calling list_outbound_replications." if managed_my_sql_database_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[replicaHost].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of replicaHost.'
  end
  raise "Parameter value for 'managed_my_sql_database_id' must not be blank" if OCI::Internal::Util.blank_string?(managed_my_sql_database_id)

  path = '/managedMySqlDatabases/{managedMySqlDatabaseId}/outboundReplications'.sub('{managedMySqlDatabaseId}', managed_my_sql_database_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[: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: 'ManagedMySqlDatabasesClient#list_outbound_replications') 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::ManagedMySqlDatabaseOutboundReplicationCollection'
    )
  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.



96
97
98
# File 'lib/oci/database_management/managed_my_sql_databases_client.rb', line 96

def logger
  @api_client.config.logger
end

#summarize_managed_my_sql_database_availability_metrics(managed_my_sql_database_id, start_time, end_time, opts = {}) ⇒ Response

Note:

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

Gets the availability metrics for the MySQL Database specified by managedMySqlDatabaseId. MySQL support within OCI Database Management service has been deprecated as of January 29, 2026.

Parameters:

  • managed_my_sql_database_id (String)

    The OCID of the Managed MySQL Database.

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

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



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
1225
1226
# File 'lib/oci/database_management/managed_my_sql_databases_client.rb', line 1184

def summarize_managed_my_sql_database_availability_metrics(managed_my_sql_database_id, start_time, end_time, opts = {})
  logger.debug 'Calling operation ManagedMySqlDatabasesClient#summarize_managed_my_sql_database_availability_metrics.' if logger

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

  path = '/managedMySqlDatabases/{managedMySqlDatabaseId}/availabilityMetrics'.sub('{managedMySqlDatabaseId}', managed_my_sql_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[: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: 'ManagedMySqlDatabasesClient#summarize_managed_my_sql_database_availability_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::MetricsAggregationRangeCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end