ProtectedDatabase¶
- class oci.recovery.models.ProtectedDatabase(**kwargs)¶
Bases:
objectA protected database is an Oracle Cloud Database whose backups are managed by Oracle Database Autonomous Recovery Service. Each protected database requires a recovery service subnet and a protection policy to use Recovery Service as the backup destination for centralized backup and recovery
Attributes:
A constant which can be used with the backup_cloud_location property of a ProtectedDatabase.
A constant which can be used with the backup_cloud_location property of a ProtectedDatabase.
A constant which can be used with the backup_cloud_location property of a ProtectedDatabase.
A constant which can be used with the backup_cloud_location property of a ProtectedDatabase.
A constant which can be used with the database_size property of a ProtectedDatabase.
A constant which can be used with the database_size property of a ProtectedDatabase.
A constant which can be used with the database_size property of a ProtectedDatabase.
A constant which can be used with the database_size property of a ProtectedDatabase.
A constant which can be used with the database_size property of a ProtectedDatabase.
A constant which can be used with the database_size property of a ProtectedDatabase.
A constant which can be used with the database_size property of a ProtectedDatabase.
A constant which can be used with the health property of a ProtectedDatabase.
A constant which can be used with the health property of a ProtectedDatabase.
A constant which can be used with the health property of a ProtectedDatabase.
A constant which can be used with the lifecycle_state property of a ProtectedDatabase.
A constant which can be used with the lifecycle_state property of a ProtectedDatabase.
A constant which can be used with the lifecycle_state property of a ProtectedDatabase.
A constant which can be used with the lifecycle_state property of a ProtectedDatabase.
A constant which can be used with the lifecycle_state property of a ProtectedDatabase.
A constant which can be used with the lifecycle_state property of a ProtectedDatabase.
A constant which can be used with the lifecycle_state property of a ProtectedDatabase.
Gets the backup_cloud_location of this ProtectedDatabase.
Gets the change_rate of this ProtectedDatabase.
[Required] Gets the compartment_id of this ProtectedDatabase.
Gets the compression_ratio of this ProtectedDatabase.
Gets the database_id of this ProtectedDatabase.
[Required] Gets the database_size of this ProtectedDatabase.
Gets the database_size_in_gbs of this ProtectedDatabase.
[Required] Gets the db_unique_name of this ProtectedDatabase.
Gets the defined_tags of this ProtectedDatabase.
Gets the display_name of this ProtectedDatabase.
Gets the freeform_tags of this ProtectedDatabase.
Gets the health of this ProtectedDatabase.
Gets the health_details of this ProtectedDatabase.
[Required] Gets the id of this ProtectedDatabase.
Gets the is_read_only_resource of this ProtectedDatabase.
Gets the is_redo_logs_shipped of this ProtectedDatabase.
Gets the lifecycle_details of this ProtectedDatabase.
Gets the lifecycle_state of this ProtectedDatabase.
Gets the metrics of this ProtectedDatabase.
Gets the policy_locked_date_time of this ProtectedDatabase.
[Required] Gets the protection_policy_id of this ProtectedDatabase.
[Required] Gets the recovery_service_subnets of this ProtectedDatabase.
Gets the subscription_id of this ProtectedDatabase.
Gets the system_tags of this ProtectedDatabase.
Gets the time_created of this ProtectedDatabase.
Gets the time_updated of this ProtectedDatabase.
[Required] Gets the vpc_user_name of this ProtectedDatabase.
Methods:
__init__(**kwargs)Initializes a new ProtectedDatabase object with values from keyword arguments.
- BACKUP_CLOUD_LOCATION_AWS = 'AWS'¶
A constant which can be used with the backup_cloud_location property of a ProtectedDatabase. This constant has a value of “AWS”
- BACKUP_CLOUD_LOCATION_AZURE = 'AZURE'¶
A constant which can be used with the backup_cloud_location property of a ProtectedDatabase. This constant has a value of “AZURE”
- BACKUP_CLOUD_LOCATION_GCP = 'GCP'¶
A constant which can be used with the backup_cloud_location property of a ProtectedDatabase. This constant has a value of “GCP”
- BACKUP_CLOUD_LOCATION_OCI = 'OCI'¶
A constant which can be used with the backup_cloud_location property of a ProtectedDatabase. This constant has a value of “OCI”
- DATABASE_SIZE_AUTO = 'AUTO'¶
A constant which can be used with the database_size property of a ProtectedDatabase. This constant has a value of “AUTO”
- DATABASE_SIZE_L = 'L'¶
A constant which can be used with the database_size property of a ProtectedDatabase. This constant has a value of “L”
- DATABASE_SIZE_M = 'M'¶
A constant which can be used with the database_size property of a ProtectedDatabase. This constant has a value of “M”
- DATABASE_SIZE_S = 'S'¶
A constant which can be used with the database_size property of a ProtectedDatabase. This constant has a value of “S”
- DATABASE_SIZE_XL = 'XL'¶
A constant which can be used with the database_size property of a ProtectedDatabase. This constant has a value of “XL”
- DATABASE_SIZE_XS = 'XS'¶
A constant which can be used with the database_size property of a ProtectedDatabase. This constant has a value of “XS”
- DATABASE_SIZE_XXL = 'XXL'¶
A constant which can be used with the database_size property of a ProtectedDatabase. This constant has a value of “XXL”
- HEALTH_ALERT = 'ALERT'¶
A constant which can be used with the health property of a ProtectedDatabase. This constant has a value of “ALERT”
- HEALTH_PROTECTED = 'PROTECTED'¶
A constant which can be used with the health property of a ProtectedDatabase. This constant has a value of “PROTECTED”
- HEALTH_WARNING = 'WARNING'¶
A constant which can be used with the health property of a ProtectedDatabase. This constant has a value of “WARNING”
- LIFECYCLE_STATE_ACTIVE = 'ACTIVE'¶
A constant which can be used with the lifecycle_state property of a ProtectedDatabase. This constant has a value of “ACTIVE”
- LIFECYCLE_STATE_CREATING = 'CREATING'¶
A constant which can be used with the lifecycle_state property of a ProtectedDatabase. This constant has a value of “CREATING”
- LIFECYCLE_STATE_DELETED = 'DELETED'¶
A constant which can be used with the lifecycle_state property of a ProtectedDatabase. This constant has a value of “DELETED”
- LIFECYCLE_STATE_DELETE_SCHEDULED = 'DELETE_SCHEDULED'¶
A constant which can be used with the lifecycle_state property of a ProtectedDatabase. This constant has a value of “DELETE_SCHEDULED”
- LIFECYCLE_STATE_DELETING = 'DELETING'¶
A constant which can be used with the lifecycle_state property of a ProtectedDatabase. This constant has a value of “DELETING”
- LIFECYCLE_STATE_FAILED = 'FAILED'¶
A constant which can be used with the lifecycle_state property of a ProtectedDatabase. This constant has a value of “FAILED”
- LIFECYCLE_STATE_UPDATING = 'UPDATING'¶
A constant which can be used with the lifecycle_state property of a ProtectedDatabase. This constant has a value of “UPDATING”
- __init__(**kwargs)¶
Initializes a new ProtectedDatabase object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):
- Parameters
id (str) – The value to assign to the id property of this ProtectedDatabase.
display_name (str) – The value to assign to the display_name property of this ProtectedDatabase.
compartment_id (str) – The value to assign to the compartment_id property of this ProtectedDatabase.
db_unique_name (str) – The value to assign to the db_unique_name property of this ProtectedDatabase.
vpc_user_name (str) – The value to assign to the vpc_user_name property of this ProtectedDatabase.
database_size (str) – The value to assign to the database_size property of this ProtectedDatabase. Allowed values for this property are: “XS”, “S”, “M”, “L”, “XL”, “XXL”, “AUTO”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
protection_policy_id (str) – The value to assign to the protection_policy_id property of this ProtectedDatabase.
policy_locked_date_time (str) – The value to assign to the policy_locked_date_time property of this ProtectedDatabase.
recovery_service_subnets (list[oci.recovery.models.RecoveryServiceSubnetDetails]) – The value to assign to the recovery_service_subnets property of this ProtectedDatabase.
database_id (str) – The value to assign to the database_id property of this ProtectedDatabase.
database_size_in_gbs (int) – The value to assign to the database_size_in_gbs property of this ProtectedDatabase.
change_rate (float) – The value to assign to the change_rate property of this ProtectedDatabase.
compression_ratio (float) – The value to assign to the compression_ratio property of this ProtectedDatabase.
is_redo_logs_shipped (bool) – The value to assign to the is_redo_logs_shipped property of this ProtectedDatabase.
time_created (datetime) – The value to assign to the time_created property of this ProtectedDatabase.
time_updated (datetime) – The value to assign to the time_updated property of this ProtectedDatabase.
lifecycle_state (str) – The value to assign to the lifecycle_state property of this ProtectedDatabase. Allowed values for this property are: “CREATING”, “UPDATING”, “ACTIVE”, “DELETE_SCHEDULED”, “DELETING”, “DELETED”, “FAILED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
health (str) – The value to assign to the health property of this ProtectedDatabase. Allowed values for this property are: “PROTECTED”, “WARNING”, “ALERT”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
is_read_only_resource (bool) – The value to assign to the is_read_only_resource property of this ProtectedDatabase.
lifecycle_details (str) – The value to assign to the lifecycle_details property of this ProtectedDatabase.
health_details (str) – The value to assign to the health_details property of this ProtectedDatabase.
metrics (oci.recovery.models.Metrics) – The value to assign to the metrics property of this ProtectedDatabase.
backup_cloud_location (str) – The value to assign to the backup_cloud_location property of this ProtectedDatabase. Allowed values for this property are: “AZURE”, “OCI”, “GCP”, “AWS”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
subscription_id (str) – The value to assign to the subscription_id property of this ProtectedDatabase.
freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this ProtectedDatabase.
defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this ProtectedDatabase.
system_tags (dict(str, dict(str, object))) – The value to assign to the system_tags property of this ProtectedDatabase.
- property backup_cloud_location¶
Gets the backup_cloud_location of this ProtectedDatabase. Indicates the cloud service environment where the protected database is provisioned. For example, Oracle Cloud or Microsoft Azure.
Allowed values for this property are: “AZURE”, “OCI”, “GCP”, “AWS”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The backup_cloud_location of this ProtectedDatabase.
- Return type
str
- property change_rate¶
Gets the change_rate of this ProtectedDatabase. The percentage of data changes that exist in the database between successive incremental backups.
- Returns
The change_rate of this ProtectedDatabase.
- Return type
float
- property compartment_id¶
[Required] Gets the compartment_id of this ProtectedDatabase. The OCID of the compartment that contains the protected database.
- Returns
The compartment_id of this ProtectedDatabase.
- Return type
str
- property compression_ratio¶
Gets the compression_ratio of this ProtectedDatabase. The compression ratio of the protected database. The compression ratio represents the ratio of compressed block size to expanded block size.
- Returns
The compression_ratio of this ProtectedDatabase.
- Return type
float
- property database_id¶
Gets the database_id of this ProtectedDatabase. The OCID of the protected database.
- Returns
The database_id of this ProtectedDatabase.
- Return type
str
- property database_size¶
[Required] Gets the database_size of this ProtectedDatabase. The size of the protected database. XS - Less than 5GB, S - 5GB to 50GB, M - 50GB to 500GB, L - 500GB to 1TB, XL - 1TB to 5TB, XXL - Greater than 5TB.
Allowed values for this property are: “XS”, “S”, “M”, “L”, “XL”, “XXL”, “AUTO”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The database_size of this ProtectedDatabase.
- Return type
str
- property database_size_in_gbs¶
Gets the database_size_in_gbs of this ProtectedDatabase. The size of the database in GBs, in gigabytes.
- Returns
The database_size_in_gbs of this ProtectedDatabase.
- Return type
int
- property db_unique_name¶
[Required] Gets the db_unique_name of this ProtectedDatabase. The dbUniqueName for the protected database in Recovery Service. You cannot change the unique name.
- Returns
The db_unique_name of this ProtectedDatabase.
- Return type
str
- property defined_tags¶
Gets the defined_tags of this ProtectedDatabase. Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {“foo-namespace”: {“bar-key”: “value”}}. For more information, see Resource Tags
- Returns
The defined_tags of this ProtectedDatabase.
- Return type
dict(str, dict(str, object))
- property display_name¶
Gets the display_name of this ProtectedDatabase. The protected database name. You can change the displayName. Avoid entering confidential information.
- Returns
The display_name of this ProtectedDatabase.
- Return type
str
- property freeform_tags¶
Gets the freeform_tags of this ProtectedDatabase. Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {“bar-key”: “value”}
- Returns
The freeform_tags of this ProtectedDatabase.
- Return type
dict(str, str)
- property health¶
Gets the health of this ProtectedDatabase. Indicates the protection status of the database.
- A ‘PROTECTED’ status indicates that Recovery Service can ensure database recovery to any point in time within the entire recovery window. The potential data loss exposure since the last backup is:
Less than 10 seconds, if Real-time data protection is enabled
Less than 70 minutes if Real-time data protection is disabled
- A ‘WARNING’ status indicates that Recovery Service can ensure database recovery within the current recovery window - 1 day. The potential data loss exposure since the last backup is:
Greater than 10 seconds, if Real-time data protection is enabled
Greater than 60 minutes, if if Real-time data protection is disabled
An ‘ALERT’ status indicates that Recovery Service cannot recover the database within the current recovery window.
Allowed values for this property are: “PROTECTED”, “WARNING”, “ALERT”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The health of this ProtectedDatabase.
- Return type
str
- property health_details¶
Gets the health_details of this ProtectedDatabase. A message describing the current health of the protected database.
- Returns
The health_details of this ProtectedDatabase.
- Return type
str
- property id¶
[Required] Gets the id of this ProtectedDatabase. The OCID of the protected database.
- Returns
The id of this ProtectedDatabase.
- Return type
str
- property is_read_only_resource¶
Gets the is_read_only_resource of this ProtectedDatabase. Indicates whether the protected database is created by Recovery Service or created manually. Set to <b>TRUE</b> for a service-defined protected database. When you enable the OCI-managed automatic backups option for a database and set Recovery Service as the backup destination, then Recovery Service creates the associated protected database resource. Set to <b>FALSE</b> for a user-defined protected database.
- Returns
The is_read_only_resource of this ProtectedDatabase.
- Return type
bool
- property is_redo_logs_shipped¶
Gets the is_redo_logs_shipped of this ProtectedDatabase. The value TRUE indicates that the protected database is configured to use Real-time data protection, and redo-data is sent from the protected database to Recovery Service. Real-time data protection substantially reduces the window of potential data loss that exists between successive archived redo log backups. For this to be effective, additional configuration is needed on client side.
- Returns
The is_redo_logs_shipped of this ProtectedDatabase.
- Return type
bool
- property lifecycle_details¶
Gets the lifecycle_details of this ProtectedDatabase. Detailed description about the current lifecycle state of the protected database. For example, it can be used to provide actionable information for a resource in a Failed state.
- Returns
The lifecycle_details of this ProtectedDatabase.
- Return type
str
- property lifecycle_state¶
Gets the lifecycle_state of this ProtectedDatabase. The current state of the Protected Database.
Allowed values for this property are: “CREATING”, “UPDATING”, “ACTIVE”, “DELETE_SCHEDULED”, “DELETING”, “DELETED”, “FAILED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The lifecycle_state of this ProtectedDatabase.
- Return type
str
- property metrics¶
Gets the metrics of this ProtectedDatabase.
- Returns
The metrics of this ProtectedDatabase.
- Return type
- property policy_locked_date_time¶
Gets the policy_locked_date_time of this ProtectedDatabase. An RFC3339 formatted datetime string that specifies the exact date and time for the retention lock to take effect and permanently lock the retention period defined in the policy.
The retention lock feature controls whether Recovery Service strictly preserves backups for the duration defined in a policy. Retention lock is useful to enforce recovery window compliance and to prevent unintentional modifications to protected database backups. Recovery Service enforces a 14-day delay before the retention lock set for a policy can take effect.
- Returns
The policy_locked_date_time of this ProtectedDatabase.
- Return type
str
- property protection_policy_id¶
[Required] Gets the protection_policy_id of this ProtectedDatabase. The OCID of the protection policy associated with the protected database.
- Returns
The protection_policy_id of this ProtectedDatabase.
- Return type
str
- property recovery_service_subnets¶
[Required] Gets the recovery_service_subnets of this ProtectedDatabase. List of recovery service subnet resources associated with the protected database.
- Returns
The recovery_service_subnets of this ProtectedDatabase.
- Return type
- property subscription_id¶
Gets the subscription_id of this ProtectedDatabase. The OCID of the cloud service subscription to which the protected database is linked.
- Returns
The subscription_id of this ProtectedDatabase.
- Return type
str
- property system_tags¶
Gets the system_tags of this ProtectedDatabase. Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {“orcl-cloud”: {“free-tier-retained”: “true”}}. For more information, see Resource Tags
- Returns
The system_tags of this ProtectedDatabase.
- Return type
dict(str, dict(str, object))
- property time_created¶
Gets the time_created of this ProtectedDatabase. An RFC3339 formatted datetime string that indicates the created time for a protected database. For example: ‘2020-05-22T21:10:29.600Z’
- Returns
The time_created of this ProtectedDatabase.
- Return type
datetime
- property time_updated¶
Gets the time_updated of this ProtectedDatabase. An RFC3339 formatted datetime string that indicates the last updated time for a protected database. For example: ‘2020-05-22T21:10:29.600Z’
- Returns
The time_updated of this ProtectedDatabase.
- Return type
datetime
- property vpc_user_name¶
[Required] Gets the vpc_user_name of this ProtectedDatabase. The virtual private catalog (VPC) user credentials that authenticates the protected database to access Recovery Service.
- Returns
The vpc_user_name of this ProtectedDatabase.
- Return type
str