DatabaseRecoveryClient

class oci.recovery.DatabaseRecoveryClient(config, **kwargs)

Use Oracle Database Autonomous Recovery Service API to manage Protected Databases.

Methods

__init__(config, **kwargs) Creates a new service client
cancel_protected_database_deletion(…) Cancels the scheduled deletion of a protected database, and returns the protected database to an ACTIVE state.
change_protected_database_compartment(…) Moves a protected database resource from the existing compartment to the specified compartment.
change_protected_database_subscription(…) Associates the protected database with a new cloud service environment, such as Microsoft Azure.
change_protection_policy_compartment(…) Moves a protection policy resource from the existing compartment to the specified compartment.
change_recovery_service_subnet_compartment(…) Moves a recovery service subnet resource from the existing compartment to the specified compartment.
create_protected_database(…) Creates a new Protected Database.
create_protection_policy(…) Creates a new Protection Policy.
create_recovery_service_subnet(…) Creates a new Recovery Service Subnet.
delete_protected_database(…) Deletes a protected database based on the specified protected database ID.
delete_protection_policy(…) Deletes a specified protection policy.
delete_recovery_service_subnet(…) Deletes a specified recovery service subnet.
fetch_protected_database_configuration(…) Downloads the network service configuration file ‘tnsnames.ora’ for a specified protected database.
get_protected_database(…) Gets information about a specified protected database.
get_protection_policy(protection_policy_id, …) Gets information about a specified protection policy.
get_recovery_service_subnet(…) Gets information about a specified recovery service subnet.
get_work_request(work_request_id, **kwargs) Gets the status of the work request based on the specified ID
list_protected_databases(compartment_id, …) Lists the protected databases based on the specified parameters.
list_protection_policies(compartment_id, …) Gets a list of protection policies based on the specified parameters.
list_recovery_service_subnets(…) Returns a list of Recovery Service Subnets.
list_work_request_errors(work_request_id, …) Return a (paginated) list of errors for a given work request.
list_work_request_logs(work_request_id, **kwargs) Return a (paginated) list of logs for a given work request.
list_work_requests(compartment_id, **kwargs) Lists the work requests in a compartment.
schedule_protected_database_deletion(…) Defines a preferred schedule to delete a protected database after you terminate the source database.
update_protected_database(…) Updates the Protected Database
update_protection_policy(…) Updates the specified protection policy.
update_recovery_service_subnet(…) Updates the specified recovery service subnet.
__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.
cancel_protected_database_deletion(protected_database_id, **kwargs)

Cancels the scheduled deletion of a protected database, and returns the protected database to an ACTIVE state. You can cancel the deletion only if the protected database is in the DELETE SCHEDULED state.

Parameters:
  • protected_database_id (str) – (required) The protected database OCID.
  • 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) Unique identifier for the request.
  • 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 None

Return type:

Response

Example:

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

change_protected_database_compartment(protected_database_id, change_protected_database_compartment_details, **kwargs)

Moves a protected database resource from the existing compartment to the specified compartment. When provided, If-Match is checked against ETag values of the resource.

Parameters:
  • protected_database_id (str) – (required) The protected database OCID.
  • change_protected_database_compartment_details (oci.recovery.models.ChangeProtectedDatabaseCompartmentDetails) – (required) The configuration details required to move a protected database from the existing compartment to a specified compartment.
  • 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) Unique identifier for the request.
  • 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 None

Return type:

Response

Example:

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

change_protected_database_subscription(protected_database_id, change_protected_database_subscription_details, **kwargs)

Associates the protected database with a new cloud service environment, such as Microsoft Azure.

Parameters:
  • protected_database_id (str) – (required) The protected database OCID.
  • change_protected_database_subscription_details (oci.recovery.models.ChangeProtectedDatabaseSubscriptionDetails) – (required) Associate a protected database with a different subscription.
  • opc_request_id (str) – (optional) Unique identifier for the request.
  • 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. 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 None

Return type:

Response

Example:

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

change_protection_policy_compartment(protection_policy_id, change_protection_policy_compartment_details, **kwargs)

Moves a protection policy resource from the existing compartment to the specified compartment. When provided, If-Match is checked against ETag values of the resource.

Parameters:
  • protection_policy_id (str) – (required) The protection policy OCID.
  • change_protection_policy_compartment_details (oci.recovery.models.ChangeProtectionPolicyCompartmentDetails) – (required) The configuration details required to move a protection policy from the existing compartment to a specified compartment.
  • 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) Unique identifier for the request.
  • 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 None

Return type:

Response

Example:

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

change_recovery_service_subnet_compartment(recovery_service_subnet_id, change_recovery_service_subnet_compartment_details, **kwargs)

Moves a recovery service subnet resource from the existing compartment to the specified compartment. When provided, If-Match is checked against ETag values of the resource.

Parameters:
  • recovery_service_subnet_id (str) – (required) The recovery service subnet OCID.
  • change_recovery_service_subnet_compartment_details (oci.recovery.models.ChangeRecoveryServiceSubnetCompartmentDetails) – (required) The configuration details required to move a Recovery Service subnet from the existing compartment to a specified compartment.
  • 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) Unique identifier for the request.
  • 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 None

Return type:

Response

Example:

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

create_protected_database(create_protected_database_details, **kwargs)

Creates a new Protected Database.

Parameters:
  • create_protected_database_details (oci.recovery.models.CreateProtectedDatabaseDetails) – (required) Describes the parameters required to create a protected database.
  • 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.
  • opc_request_id (str) – (optional) Unique identifier for the request.
  • opc_dry_run (bool) –

    (optional) Indicates if the request is to test the preparedness for creating a protected database, without actually creating a protected database.

    If you set the opcDryRun option as true, then Recovery Service only performs a test run to check for any missing prerequisites or configurations required to create a protected database, and then returns error messages to warn you about any missing requirements.

    If an error occurs, you can review, correct, and repeat the dry run until the createProtectedDatabase request does not return any errors.

    These are the common issues that you can identify by performing a dry run of the createProtectedDatabase request:

    • The Recovery Service subnet has insufficient free IP addresses to support the required number of private endpoints. See, troubleshooting information
    • Recovery Service does not have permissions to manage the network resources in a chosen compartment
    • Recovery Service is out of capacity. See, Service Limits for more information
    • Recovery Service resources exceed quota limits
    • A protected database, having the same database ID, already exists
    • The specified protection policy does not exist, or it is not in an Active state
    • The specified Recovery Service subnet does not exist, or it is not in an Active state

    See, Prerequisites for Using Recovery Service for more information.

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

Return type:

Response

Example:

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

create_protection_policy(create_protection_policy_details, **kwargs)

Creates a new Protection Policy.

Parameters:
  • create_protection_policy_details (oci.recovery.models.CreateProtectionPolicyDetails) – (required) Describes the parameters required to create a custom protection policy.
  • 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.
  • opc_request_id (str) – (optional) Unique identifier for the request.
  • 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 ProtectionPolicy

Return type:

Response

Example:

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

create_recovery_service_subnet(create_recovery_service_subnet_details, **kwargs)

Creates a new Recovery Service Subnet.

Parameters:
  • create_recovery_service_subnet_details (oci.recovery.models.CreateRecoveryServiceSubnetDetails) – (required) Describes the parameters required to create a recovery service subnet.
  • 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.
  • opc_request_id (str) – (optional) Unique identifier for the request.
  • 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 RecoveryServiceSubnet

Return type:

Response

Example:

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

delete_protected_database(protected_database_id, **kwargs)

Deletes a protected database based on the specified protected database ID.

Parameters:
  • protected_database_id (str) – (required) The protected database OCID.
  • deletion_schedule (str) –

    (optional) Defines a preferred schedule to delete a protected database after you terminate the source database. * The default schedule is DELETE_AFTER_72_HOURS, so that the delete operation can occur 72 hours (3 days) after the source database is terminated . * The alternate schedule is DELETE_AFTER_RETENTION_PERIOD. Specify this option if you want to delete a protected database only after the policy-defined backup retention period expires.

    Allowed values are: “DELETE_AFTER_RETENTION_PERIOD”, “DELETE_AFTER_72_HOURS”

  • 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) Unique identifier for the request.
  • 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 None

Return type:

Response

Example:

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

delete_protection_policy(protection_policy_id, **kwargs)

Deletes a specified protection policy. You can delete custom policies only. Deleting a Oracle predefined policies will result in status code 405 Method Not Allowed.

Parameters:
  • protection_policy_id (str) – (required) The protection policy OCID.
  • 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) Unique identifier for the request.
  • 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 None

Return type:

Response

Example:

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

delete_recovery_service_subnet(recovery_service_subnet_id, **kwargs)

Deletes a specified recovery service subnet.

Parameters:
  • recovery_service_subnet_id (str) – (required) The recovery service subnet OCID.
  • 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) Unique identifier for the request.
  • 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 None

Return type:

Response

Example:

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

fetch_protected_database_configuration(protected_database_id, **kwargs)

Downloads the network service configuration file ‘tnsnames.ora’ for a specified protected database. Applies to user-defined recovery systems only.

Parameters:
  • protected_database_id (str) – (required) The protected database OCID.
  • fetch_protected_database_configuration_details (oci.recovery.models.FetchProtectedDatabaseConfigurationDetails) – (optional) Which configuration to get
  • opc_request_id (str) – (optional) Unique identifier for the request.
  • 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. 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 stream

Return type:

Response

Example:

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

get_protected_database(protected_database_id, **kwargs)

Gets information about a specified protected database.

Parameters:
  • protected_database_id (str) – (required) The protected database OCID.
  • opc_request_id (str) – (optional) Unique identifier for the request.
  • 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 ProtectedDatabase

Return type:

Response

Example:

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

get_protection_policy(protection_policy_id, **kwargs)

Gets information about a specified protection policy.

Parameters:
  • protection_policy_id (str) – (required) The protection policy OCID.
  • opc_request_id (str) – (optional) Unique identifier for the request.
  • 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 ProtectionPolicy

Return type:

Response

Example:

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

get_recovery_service_subnet(recovery_service_subnet_id, **kwargs)

Gets information about a specified recovery service subnet.

Parameters:
  • recovery_service_subnet_id (str) – (required) The recovery service subnet OCID.
  • opc_request_id (str) – (optional) Unique identifier for the request.
  • 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 RecoveryServiceSubnet

Return type:

Response

Example:

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

get_work_request(work_request_id, **kwargs)

Gets the status of the work request based on the specified ID

Parameters:
  • work_request_id (str) – (required) The OCID of the work request.
  • opc_request_id (str) – (optional) Unique identifier for the request.
  • 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 WorkRequest

Return type:

Response

Example:

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

list_protected_databases(compartment_id, **kwargs)

Lists the protected databases based on the specified parameters.

Parameters:
  • compartment_id (str) – (required) The compartment OCID.
  • lifecycle_state (str) –

    (optional) A filter to return only the resources that match the specified lifecycle state.

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

  • display_name (str) – (optional) A filter to return only resources that match the entire ‘displayname’ given.
  • id (str) – (optional) The protected database OCID.
  • protection_policy_id (str) – (optional) The protection policy OCID.
  • recovery_service_subnet_id (str) – (optional) The recovery service subnet OCID.
  • limit (int) – (optional) The maximum number of items to return per page.
  • page (str) – (optional) The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
  • sort_order (str) –

    (optional) The sort order to use, either ascending (ASC) or descending (DESC). Allowed values are:

    • ASC
    • DESC

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If you do not specify a value, then TIMECREATED is used as the default sort order. Allowed values are:

    • TIMECREATED
    • DISPLAYNAME

    Allowed values are: “timeCreated”, “displayName”

  • opc_request_id (str) – (optional) Unique identifier for the request.
  • 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 ProtectedDatabaseCollection

Return type:

Response

Example:

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

list_protection_policies(compartment_id, **kwargs)

Gets a list of protection policies based on the specified parameters.

Parameters:
  • compartment_id (str) – (required) The compartment OCID.
  • lifecycle_state (str) –

    (optional) A filter to return only resources their lifecycleState matches the given lifecycleState.

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

  • display_name (str) – (optional) A filter to return only resources that match the entire ‘displayname’ given.
  • protection_policy_id (str) – (optional) The protection policy OCID.
  • owner (str) –

    (optional) A filter to return only the policies that match the owner as ‘Customer’ or ‘Oracle’.

    Allowed values are: “oracle”, “customer”

  • limit (int) – (optional) The maximum number of items to return. Specify a value greater than 4.
  • page (str) – (optional) The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
  • sort_order (str) –

    (optional) The sort order to use, either ascending (ASC) or descending (DESC). Allowed values are:

    • ASC
    • DESC

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If you do not specify a value, then TIMECREATED is used as the default sort order. Allowed values are:

    • TIMECREATED
    • DISPLAYNAME

    Allowed values are: “timeCreated”, “displayName”

  • opc_request_id (str) – (optional) Unique identifier for the request.
  • 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 ProtectionPolicyCollection

Return type:

Response

Example:

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

list_recovery_service_subnets(compartment_id, **kwargs)

Returns a list of Recovery Service Subnets.

Parameters:
  • compartment_id (str) – (required) The compartment OCID.
  • lifecycle_state (str) –

    (optional) A filter to return only the resources that match the specified lifecycle state.

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

  • display_name (str) – (optional) A filter to return only resources that match the entire ‘displayname’ given.
  • id (str) – (optional) The recovery service subnet OCID.
  • vcn_id (str) – (optional) The OCID of the virtual cloud network (VCN) associated with the recovery service subnet.
  • limit (int) – (optional) The maximum number of items to return per page.
  • page (str) – (optional) The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
  • sort_order (str) –

    (optional) The sort order to use, either ascending (ASC) or descending (DESC). Allowed values are:

    • ASC
    • DESC

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If you do not specify a value, then TIMECREATED is used as the default sort order. Allowed values are:

    • TIMECREATED
    • DISPLAYNAME

    Allowed values are: “timeCreated”, “displayName”

  • opc_request_id (str) – (optional) Unique identifier for the request.
  • 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 RecoveryServiceSubnetCollection

Return type:

Response

Example:

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

list_work_request_errors(work_request_id, **kwargs)

Return a (paginated) list of errors for a given work request.

Parameters:
  • work_request_id (str) – (required) The OCID of the work request.
  • opc_request_id (str) – (optional) Unique identifier for the request.
  • page (str) – (optional) The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
  • limit (int) – (optional) The maximum number of items to return per page.
  • sort_by (str) –

    (optional) The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending.

    Allowed values are: “timeCreated”

  • sort_order (str) –

    (optional) The sort order to use, either ascending (ASC) or descending (DESC). Allowed values are:

    • ASC
    • DESC

    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 WorkRequestErrorCollection

Return type:

Response

Example:

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

list_work_request_logs(work_request_id, **kwargs)

Return a (paginated) list of logs for a given work request.

Parameters:
  • work_request_id (str) – (required) The OCID of the work request.
  • opc_request_id (str) – (optional) Unique identifier for the request.
  • page (str) – (optional) The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
  • limit (int) – (optional) The maximum number of items to return per page.
  • sort_by (str) –

    (optional) The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending.

    Allowed values are: “timeCreated”

  • sort_order (str) –

    (optional) The sort order to use, either ascending (ASC) or descending (DESC). Allowed values are:

    • ASC
    • DESC

    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 WorkRequestLogEntryCollection

Return type:

Response

Example:

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

list_work_requests(compartment_id, **kwargs)

Lists the work requests in a compartment.

Parameters:
  • compartment_id (str) – (required) The compartment OCID.
  • work_request_id (str) – (optional) Unique Oracle-assigned identifier of the work request.
  • status (str) –

    (optional) A filter to return only resources their lifecycleState matches the given OperationStatus.

    Allowed values are: “ACCEPTED”, “WAITING”, “IN_PROGRESS”, “FAILED”, “SUCCEEDED”, “CANCELING”, “CANCELED”

  • resource_id (str) – (optional) The ID of the resource affected by the work request.
  • opc_request_id (str) – (optional) Unique identifier for the request.
  • page (str) – (optional) The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
  • limit (int) – (optional) The maximum number of items to return per page.
  • sort_order (str) –

    (optional) The sort order to use, either ascending (ASC) or descending (DESC). Allowed values are:

    • ASC
    • DESC

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending.

    Allowed values are: “timeAccepted”

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

Return type:

Response

Example:

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

schedule_protected_database_deletion(protected_database_id, **kwargs)

Defines a preferred schedule to delete a protected database after you terminate the source database. The default schedule is DELETE_AFTER_72_HOURS, so that the delete operation can occur 72 hours (3 days) after the source database is terminated. The alternate schedule is DELETE_AFTER_RETENTION_PERIOD. Specify this option if you want to delete a protected database only after the policy-defined backup retention period expires.

Parameters:
  • protected_database_id (str) – (required) The protected database OCID.
  • schedule_protected_database_deletion_details (oci.recovery.models.ScheduleProtectedDatabaseDeletionDetails) – (optional) The details for scheduling deletion of the protected database
  • 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) Unique identifier for the request.
  • 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 None

Return type:

Response

Example:

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

update_protected_database(protected_database_id, update_protected_database_details, **kwargs)

Updates the Protected Database

Parameters:
  • protected_database_id (str) – (required) The protected database OCID.
  • update_protected_database_details (oci.recovery.models.UpdateProtectedDatabaseDetails) – (required) Describes the parameters required to update a protected database.
  • 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) Unique identifier for the request.
  • 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 None

Return type:

Response

Example:

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

update_protection_policy(protection_policy_id, update_protection_policy_details, **kwargs)

Updates the specified protection policy.

Parameters:
  • protection_policy_id (str) – (required) The protection policy OCID.
  • update_protection_policy_details (oci.recovery.models.UpdateProtectionPolicyDetails) – (required) The information to be updated.
  • 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) Unique identifier for the request.
  • 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 None

Return type:

Response

Example:

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

update_recovery_service_subnet(recovery_service_subnet_id, update_recovery_service_subnet_details, **kwargs)

Updates the specified recovery service subnet.

Parameters:
  • recovery_service_subnet_id (str) – (required) The recovery service subnet OCID.
  • update_recovery_service_subnet_details (oci.recovery.models.UpdateRecoveryServiceSubnetDetails) – (required) Describes the parameters required to update a recovery service subnet.
  • 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) Unique identifier for the request.
  • 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 None

Return type:

Response

Example:

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