ManagedMySqlDatabasesClient

class oci.database_management.ManagedMySqlDatabasesClient(config, **kwargs)

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.

Methods

__init__(config, **kwargs) Creates a new service client
get_heat_wave_fleet_metric(compartment_id, …) Gets the health metrics for a fleet of HeatWave clusters in a compartment.
get_managed_my_sql_database(…) Retrieves the general information for a specific MySQL Database.
get_my_sql_fleet_metric(compartment_id, …) Gets the health metrics for a fleet of MySQL Databases in a compartment.
list_managed_my_sql_database_configuration_data(…) Retrieves configuration data for a specific MySQL database.
list_managed_my_sql_database_sql_data(…) Retrieves the SQL performance data for a specific MySQL database.
list_managed_my_sql_databases(…) Gets the list of Managed MySQL Databases in a specific compartment.
summarize_managed_my_sql_database_availability_metrics(…) Gets the availability metrics for the MySQL Database specified by managedMySqlDatabaseId.
__init__(config, **kwargs)

Creates a new service client

Parameters:
  • config (dict) – Configuration keys and values as per SDK and Tool Configuration. The from_file() method can be used to load configuration from a file. Alternatively, a dict can be passed. You can validate_config the dict using validate_config()
  • service_endpoint (str) – (optional) The endpoint of the service to call using this client. For example https://iaas.us-ashburn-1.oraclecloud.com. If this keyword argument is not provided then it will be derived using the region in the config parameter. You should only provide this keyword argument if you have an explicit need to specify a service endpoint.
  • timeout (float or tuple(float, float)) – (optional) The connection and read timeouts for the client. The default values are connection timeout 10 seconds and read timeout 60 seconds. This keyword argument can be provided as a single float, in which case the value provided is used for both the read and connection timeouts, or as a tuple of two floats. If a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout.
  • signer (AbstractBaseSigner) –

    (optional) The signer to use when signing requests made by the service client. The default is to use a Signer based on the values provided in the config parameter.

    One use case for this parameter is for Instance Principals authentication by passing an instance of InstancePrincipalsSecurityTokenSigner as the value for this keyword argument

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to all calls made by this service client (i.e. at the client level). There is no retry strategy applied by default. Retry strategies can also be applied at the operation level by passing a retry_strategy keyword argument as part of calling the operation. Any value provided at the operation level will override whatever is specified at the client level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

  • circuit_breaker_strategy (obj) – (optional) A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level). This client uses DEFAULT_CIRCUIT_BREAKER_STRATEGY as default if no circuit breaker strategy is provided. The specifics of circuit breaker strategy are described here.
  • circuit_breaker_callback (function) – (optional) Callback function to receive any exceptions triggerred by the circuit breaker.
  • client_level_realm_specific_endpoint_template_enabled (bool) – (optional) A boolean flag to indicate whether or not this client should be created with realm specific endpoint template enabled or disable. By default, this will be set as None.
  • allow_control_chars – (optional) allow_control_chars is a boolean to indicate whether or not this client should allow control characters in the response object. By default, the client will not allow control characters to be in the response object.
get_heat_wave_fleet_metric(compartment_id, start_time, end_time, **kwargs)

Gets the health metrics for a fleet of HeatWave clusters in a compartment.

Parameters:
  • compartment_id (str) –

    (required) The OCID of the compartment.

  • start_time (str) – (required) 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 (str) – (required) 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’”.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • filter_by_metric_names (str) – (optional) 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 (str) –

    (optional) The parameter to filter by HeatWave cluster status.

    Allowed values are: “UP”, “DOWN”, “UNKNOWN”

  • filter_by_heat_wave_shape (str) – (optional) The parameter to filter by HeatWave node shape.
  • is_heat_wave_lakehouse_enabled (bool) – (optional) The parameter to filter based on whether HeatWave Lakehouse is enabled for the cluster.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type HeatWaveFleetMetrics

Return type:

Response

Example:

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

get_managed_my_sql_database(managed_my_sql_database_id, **kwargs)

Retrieves the general information for a specific MySQL Database.

Parameters:
  • managed_my_sql_database_id (str) – (required) The OCID of the Managed MySQL Database.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type ManagedMySqlDatabase

Return type:

Response

Example:

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

get_my_sql_fleet_metric(compartment_id, start_time, end_time, **kwargs)

Gets the health metrics for a fleet of MySQL Databases in a compartment.

Parameters:
  • compartment_id (str) –

    (required) The OCID of the compartment.

  • start_time (str) – (required) 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 (str) – (required) 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’”.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • filter_by_metric_names (str) – (optional) 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 (str) –

    (optional) The parameter to filter by MySQL deployment type.

    Allowed values are: “ONPREMISE”, “MDS”

  • filter_by_mds_deployment_type (str) –

    (optional) The parameter to filter by MySQL Database System type.

    Allowed values are: “HA”, “HEATWAVE”, “STANDALONE”

  • filter_by_my_sql_status (str) –

    (optional) The parameter to filter by MySQL Database status.

    Allowed values are: “UP”, “DOWN”, “UNKNOWN”

  • filter_by_my_sql_database_version (str) – (optional) The parameter to filter by MySQL database version.
  • is_heat_wave_enabled (bool) – (optional) The parameter to filter based on whether HeatWave is enabled for the database.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type MySqlFleetMetrics

Return type:

Response

Example:

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

list_managed_my_sql_database_configuration_data(managed_my_sql_database_id, **kwargs)

Retrieves configuration data for a specific MySQL database.

Parameters:
  • managed_my_sql_database_id (str) – (required) The OCID of the Managed MySQL Database.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • limit (int) – (optional) The maximum number of records returned in the paginated response.
  • page (str) – (optional) 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 (str) –

    (optional) The option to sort information in ascending (‘ASC’) or descending (‘DESC’) order. Descending order is the default order.

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) The field to sort information by. Only one sortOrder can be used. The default sort order for ‘TIMECREATED’ is descending and the default sort order for ‘NAME’ is ascending. The ‘NAME’ sort order is case-sensitive.

    Allowed values are: “TIMECREATED”, “NAME”

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type MySqlConfigurationDataCollection

Return type:

Response

Example:

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

list_managed_my_sql_database_sql_data(managed_my_sql_database_id, start_time, end_time, **kwargs)

Retrieves the SQL performance data for a specific MySQL database.

Parameters:
  • managed_my_sql_database_id (str) – (required) The OCID of the Managed MySQL Database.
  • start_time (str) – (required) 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 (str) – (required) 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’”.
  • filter_column (str) – (optional) 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 (str) – (optional) The client request ID for tracing.
  • limit (int) – (optional) The maximum number of records returned in the paginated response.
  • page (str) – (optional) 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 (str) –

    (optional) The field to sort information by. Only one sortOrder can be used. The default sort order for ‘TIMECREATED’ is descending and the default sort order for ‘NAME’ is ascending. The ‘NAME’ sort order is case-sensitive.

    Allowed values are: “TIMECREATED”, “NAME”

  • sort_order (str) –

    (optional) The option to sort information in ascending (‘ASC’) or descending (‘DESC’) order. Ascending order is the default order.

    Allowed values are: “ASC”, “DESC”

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type MySqlDataCollection

Return type:

Response

Example:

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

list_managed_my_sql_databases(compartment_id, **kwargs)

Gets the list of Managed MySQL Databases in a specific compartment.

Parameters:
  • compartment_id (str) –

    (required) The OCID of the compartment.

  • opc_request_id (str) – (optional) The client request ID for tracing.
  • page (str) – (optional) 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 (int) – (optional) The maximum number of records returned in the paginated response.
  • sort_by (str) –

    (optional) The field to sort information by. Only one sortOrder can be used. The default sort order for ‘TIMECREATED’ is descending and the default sort order for ‘NAME’ is ascending. The ‘NAME’ sort order is case-sensitive.

    Allowed values are: “TIMECREATED”, “NAME”

  • sort_order (str) –

    (optional) The option to sort information in ascending (‘ASC’) or descending (‘DESC’) order. Ascending order is the default order.

    Allowed values are: “ASC”, “DESC”

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type ManagedMySqlDatabaseCollection

Return type:

Response

Example:

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

summarize_managed_my_sql_database_availability_metrics(managed_my_sql_database_id, start_time, end_time, **kwargs)

Gets the availability metrics for the MySQL Database specified by managedMySqlDatabaseId.

Parameters:
  • managed_my_sql_database_id (str) – (required) The OCID of the Managed MySQL Database.
  • start_time (str) – (required) 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 (str) – (required) 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’”.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • page (str) – (optional) 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 (int) – (optional) The maximum number of records returned in the paginated response.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type MetricsAggregationRangeCollection

Return type:

Response

Example:

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