DbManagementClient

class oci.database_management.DbManagementClient(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
add_managed_database_to_managed_database_group(…) Adds a Managed Database to a specific Managed Database Group.
change_database_parameters(…) Changes database parameter values.
change_job_compartment(job_id, …) Moves a job.
change_managed_database_group_compartment(…) Moves a Managed Database Group to a different compartment.
create_job(create_job_details, **kwargs) Creates a job to be executed on a Managed Database or Managed Database Group.
create_managed_database_group(…) Creates a Managed Database Group.
delete_job(job_id, **kwargs) Deletes the job specified by jobId.
delete_managed_database_group(…) Deletes the Managed Database Group specified by managedDatabaseGroupId.
get_cluster_cache_metric(…) Gets the metrics related to cluster cache for the Oracle Real Application Clusters (Oracle RAC) database specified by managedDatabaseId.
get_database_fleet_health_metrics(…) Gets the health metrics for a fleet of databases in a compartment or in a Managed Database Group.
get_database_home_metrics(…) 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.
get_job(job_id, **kwargs) Gets the details for the job specified by jobId.
get_job_execution(job_execution_id, **kwargs) Gets the details for the job execution specified by jobExecutionId.
get_job_run(job_run_id, **kwargs) Gets the details for the job run specified by jobRunId.
get_managed_database(managed_database_id, …) Gets the details for the Managed Database specified by managedDatabaseId.
get_managed_database_group(…) Gets the details for the Managed Database Group specified by managedDatabaseGroupId.
list_database_parameters(…) Gets the list of database parameters for the specified Managed Database.
list_job_executions(compartment_id, **kwargs) Gets the job execution for a specific ID or the list of job executions for a job, Managed Database or Managed Database Group in a specific compartment.
list_job_runs(compartment_id, **kwargs) 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.
list_jobs(compartment_id, **kwargs) Gets the job for a specific ID or the list of jobs for a Managed Database or Managed Database Group in a specific compartment.
list_managed_database_groups(compartment_id, …) Gets the Managed Database Group for a specific ID or the list of Managed Database Groups in a specific compartment.
list_managed_databases(compartment_id, **kwargs) Gets the Managed Database for a specific ID or the list of Managed Databases in a specific compartment.
list_tablespaces(managed_database_id, **kwargs) Gets the list of tablespaces for the specified managedDatabaseId.
remove_managed_database_from_managed_database_group(…) Removes a Managed Database from a Managed Database Group.
reset_database_parameters(…) Resets database parameter values to their default or startup values.
update_managed_database_group(…) Updates the Managed Database Group specified by managedDatabaseGroupId.
__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.

add_managed_database_to_managed_database_group(managed_database_group_id, add_managed_database_to_managed_database_group_details, **kwargs)

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:
  • managed_database_group_id (str) –

    (required) The OCID of the Managed Database Group.

  • add_managed_database_to_managed_database_group_details (oci.database_management.models.AddManagedDatabaseToManagedDatabaseGroupDetails) – (required) The Managed Database details required to add the Managed Database to a Managed Database Group.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • opc_retry_token (str) – (optional) 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.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type None

Return type:

Response

Example:

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

change_database_parameters(managed_database_id, change_database_parameters_details, **kwargs)

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:
  • managed_database_id (str) –

    (required) The OCID of the Managed Database.

  • change_database_parameters_details (oci.database_management.models.ChangeDatabaseParametersDetails) – (required) The details required to change database parameter values.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • opc_retry_token (str) – (optional) 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.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type UpdateDatabaseParametersResult

Return type:

Response

Example:

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

change_job_compartment(job_id, change_job_compartment_details, **kwargs)

Moves a job.

Parameters:
  • job_id (str) – (required) The identifier of the job.
  • change_job_compartment_details (oci.database_management.models.ChangeJobCompartmentDetails) –

    (required) The OCID of the compartment to move the job to.

  • opc_request_id (str) – (optional) The client request ID for tracing.
  • opc_retry_token (str) – (optional) 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 (str) – (optional) 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.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type None

Return type:

Response

Example:

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

change_managed_database_group_compartment(managed_database_group_id, change_managed_database_group_compartment_details, **kwargs)

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

Parameters:
  • managed_database_group_id (str) –

    (required) The OCID of the Managed Database Group.

  • change_managed_database_group_compartment_details (oci.database_management.models.ChangeManagedDatabaseGroupCompartmentDetails) –

    (required) The OCID of the compartment to move the Managed Database Group to.

  • opc_request_id (str) – (optional) The client request ID for tracing.
  • opc_retry_token (str) – (optional) 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 (str) – (optional) 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.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type None

Return type:

Response

Example:

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

create_job(create_job_details, **kwargs)

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:
  • create_job_details (oci.database_management.models.CreateJobDetails) – (required) The details required to create a job.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • opc_retry_token (str) – (optional) 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.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type Job

Return type:

Response

Example:

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

create_managed_database_group(create_managed_database_group_details, **kwargs)

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

Parameters:
  • create_managed_database_group_details (oci.database_management.models.CreateManagedDatabaseGroupDetails) – (required) The details required to create a Managed Database Group.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • opc_retry_token (str) – (optional) 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.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type ManagedDatabaseGroup

Return type:

Response

Example:

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

delete_job(job_id, **kwargs)

Deletes the job specified by jobId.

Parameters:
  • job_id (str) – (required) The identifier of the job.
  • if_match (str) – (optional) 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 (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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type None

Return type:

Response

Example:

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

delete_managed_database_group(managed_database_group_id, **kwargs)

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

Parameters:
  • managed_database_group_id (str) –

    (required) The OCID of the Managed Database Group.

  • if_match (str) – (optional) 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 (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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type None

Return type:

Response

Example:

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

get_cluster_cache_metric(managed_database_id, start_time, end_time, **kwargs)

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

Parameters:
  • managed_database_id (str) –

    (required) The OCID of the Managed Database.

  • start_time (str) – (required) The start time for the time range to retrieve the health metrics of a Managed Database in UTC in ISO-8601 format, which is “yyyy-MM-dd’T’hh:mm:ss.sss’Z’”.
  • end_time (str) – (required) The end time for the time range to retrieve the health metrics of a Managed Database in UTC in ISO-8601 format, which is “yyyy-MM-dd’T’hh:mm:ss.sss’Z’”.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type ClusterCacheMetric

Return type:

Response

Example:

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

get_database_fleet_health_metrics(compare_baseline_time, compare_target_time, **kwargs)

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 (str) – (required) The baseline time for metrics comparison.
  • compare_target_time (str) – (required) The target time for metrics comparison.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • managed_database_group_id (str) –

    (optional) The OCID of the Managed Database Group.

  • compartment_id (str) –

    (optional) The OCID of the compartment.

  • compare_type (str) –

    (optional) The time window used for metrics comparison.

    Allowed values are: “HOUR”, “DAY”

  • 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_database_type (str) – (optional) The filter used to filter the databases in the fleet by a specific Oracle Database type.
  • filter_by_database_sub_type (str) – (optional) The filter used to filter the databases in the fleet by a specific Oracle Database subtype.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type DatabaseFleetHealthMetrics

Return type:

Response

Example:

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

get_database_home_metrics(managed_database_id, start_time, end_time, **kwargs)

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 (str) –

    (required) The OCID of the Managed Database.

  • start_time (str) – (required) The start time for the time range to retrieve the health metrics of a Managed Database in UTC in ISO-8601 format, which is “yyyy-MM-dd’T’hh:mm:ss.sss’Z’”.
  • end_time (str) – (required) The end time for the time range to retrieve the health metrics of a Managed Database in UTC in ISO-8601 format, which is “yyyy-MM-dd’T’hh:mm:ss.sss’Z’”.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type DatabaseHomeMetrics

Return type:

Response

Example:

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

get_job(job_id, **kwargs)

Gets the details for the job specified by jobId.

Parameters:
  • job_id (str) – (required) The identifier of the job.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type Job

Return type:

Response

Example:

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

get_job_execution(job_execution_id, **kwargs)

Gets the details for the job execution specified by jobExecutionId.

Parameters:
  • job_execution_id (str) – (required) The identifier of the job execution.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type JobExecution

Return type:

Response

Example:

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

get_job_run(job_run_id, **kwargs)

Gets the details for the job run specified by jobRunId.

Parameters:
  • job_run_id (str) – (required) The identifier of the job run.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type JobRun

Return type:

Response

Example:

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

get_managed_database(managed_database_id, **kwargs)

Gets the details for the Managed Database specified by managedDatabaseId.

Parameters:
  • managed_database_id (str) –

    (required) The OCID of the Managed 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type ManagedDatabase

Return type:

Response

Example:

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

get_managed_database_group(managed_database_group_id, **kwargs)

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

Parameters:
  • managed_database_group_id (str) –

    (required) The OCID of the Managed Database Group.

  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type ManagedDatabaseGroup

Return type:

Response

Example:

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

list_database_parameters(managed_database_id, **kwargs)

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

Parameters:
  • managed_database_id (str) –

    (required) The OCID of the Managed Database.

  • opc_request_id (str) – (optional) The client request ID for tracing.
  • source (str) –

    (optional) 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.

    Allowed values are: “CURRENT”, “SPFILE”

  • name (str) – (optional) A filter to return all parameters that have the text given in their names.
  • is_allowed_values_included (bool) – (optional) When true, results include a list of valid values for parameters (if applicable).
  • sort_by (str) –

    (optional) 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.

    Allowed values are: “NAME”

  • sort_order (str) –

    (optional) The option to sort information in ascending (‘ASC’) or descending (‘DESC’) 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type DatabaseParametersCollection

Return type:

Response

Example:

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

list_job_executions(compartment_id, **kwargs)

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

Parameters:
  • compartment_id (str) –

    (required) The OCID of the compartment.

  • opc_request_id (str) – (optional) The client request ID for tracing.
  • id (str) – (optional) The identifier of the resource.
  • job_id (str) – (optional) The identifier of the job.
  • managed_database_id (str) –

    (optional) The OCID of the Managed Database.

  • managed_database_group_id (str) –

    (optional) The OCID of the Managed Database Group.

  • status (str) – (optional) The status of the job execution.
  • name (str) – (optional) A filter to return only resources that match the entire name.
  • limit (int) – (optional) The maximum number of records returned in 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.

    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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type JobExecutionCollection

Return type:

Response

Example:

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

list_job_runs(compartment_id, **kwargs)

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:
  • compartment_id (str) –

    (required) The OCID of the compartment.

  • opc_request_id (str) – (optional) The client request ID for tracing.
  • id (str) – (optional) The identifier of the resource.
  • job_id (str) – (optional) The identifier of the job.
  • managed_database_id (str) –

    (optional) The OCID of the Managed Database.

  • managed_database_group_id (str) –

    (optional) The OCID of the Managed Database Group.

  • run_status (str) – (optional) The status of the job run.
  • name (str) – (optional) A filter to return only resources that match the entire name.
  • limit (int) – (optional) The maximum number of records returned in 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.

    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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type JobRunCollection

Return type:

Response

Example:

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

list_jobs(compartment_id, **kwargs)

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:
  • compartment_id (str) –

    (required) The OCID of the compartment.

  • opc_request_id (str) – (optional) The client request ID for tracing.
  • id (str) – (optional) The identifier of the resource.
  • managed_database_group_id (str) –

    (optional) The OCID of the Managed Database Group.

  • managed_database_id (str) –

    (optional) The OCID of the Managed Database.

  • name (str) – (optional) A filter to return only resources that match the entire name.
  • lifecycle_state (str) –

    (optional) The lifecycle state of the job.

    Allowed values are: “ACTIVE”, “INACTIVE”

  • limit (int) – (optional) The maximum number of records returned in 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.

    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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type JobCollection

Return type:

Response

Example:

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

list_managed_database_groups(compartment_id, **kwargs)

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:
  • compartment_id (str) –

    (required) The OCID of the compartment.

  • opc_request_id (str) – (optional) The client request ID for tracing.
  • id (str) – (optional) The identifier of the resource.
  • name (str) – (optional) A filter to return only resources that match the entire name.
  • lifecycle_state (str) –

    (optional) The lifecycle state of a resource.

    Allowed values are: “CREATING”, “UPDATING”, “ACTIVE”, “DELETING”, “DELETED”, “FAILED”

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

    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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type ManagedDatabaseGroupCollection

Return type:

Response

Example:

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

list_managed_databases(compartment_id, **kwargs)

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

Parameters:
  • compartment_id (str) –

    (required) The OCID of the compartment.

  • opc_request_id (str) – (optional) The client request ID for tracing.
  • id (str) – (optional) The identifier of the resource.
  • name (str) – (optional) A filter to return only resources that match the entire name.
  • 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 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.

    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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type ManagedDatabaseCollection

Return type:

Response

Example:

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

list_tablespaces(managed_database_id, **kwargs)

Gets the list of tablespaces for the specified managedDatabaseId.

Parameters:
  • managed_database_id (str) –

    (required) The OCID of the Managed Database.

  • opc_request_id (str) – (optional) The client request ID for tracing.
  • name (str) – (optional) A filter to return only resources that match the entire name.
  • 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.

    Allowed values are: “ASC”, “DESC”

  • 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 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type TablespaceCollection

Return type:

Response

Example:

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

remove_managed_database_from_managed_database_group(managed_database_group_id, remove_managed_database_from_managed_database_group_details, **kwargs)

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:
  • managed_database_group_id (str) –

    (required) The OCID of the Managed Database Group.

  • remove_managed_database_from_managed_database_group_details (oci.database_management.models.RemoveManagedDatabaseFromManagedDatabaseGroupDetails) – (required) The Managed Database details required to remove the Managed Database from a Managed Database Group.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • opc_retry_token (str) – (optional) 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.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type None

Return type:

Response

Example:

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

reset_database_parameters(managed_database_id, reset_database_parameters_details, **kwargs)

Resets database parameter values to their default or startup values.

Parameters:
  • managed_database_id (str) –

    (required) The OCID of the Managed Database.

  • reset_database_parameters_details (oci.database_management.models.ResetDatabaseParametersDetails) – (required) The details required to reset database parameters.
  • opc_request_id (str) – (optional) The client request ID for tracing.
  • opc_retry_token (str) – (optional) 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.
  • 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type UpdateDatabaseParametersResult

Return type:

Response

Example:

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

update_managed_database_group(managed_database_group_id, update_managed_database_group_details, **kwargs)

Updates the Managed Database Group specified by managedDatabaseGroupId.

Parameters:
  • managed_database_group_id (str) –

    (required) The OCID of the Managed Database Group.

  • update_managed_database_group_details (oci.database_management.models.UpdateManagedDatabaseGroupDetails) – (required) The details required to update a Managed Database Group.
  • if_match (str) – (optional) 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 (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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type ManagedDatabaseGroup

Return type:

Response

Example:

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