ProtectionPolicy¶
- class oci.recovery.models.ProtectionPolicy(**kwargs)¶
Bases:
objectThe details of a protection policy.A policy defines the exact number of days to retain protected database backups created by Recovery Service. Each protected database must be associated with one protection policy. You can use Oracle-defined protection policies or create custom policies to suit your internal backup storage regulation demands.
Attributes:
A constant which can be used with the lifecycle_state property of a ProtectionPolicy.
A constant which can be used with the lifecycle_state property of a ProtectionPolicy.
A constant which can be used with the lifecycle_state property of a ProtectionPolicy.
A constant which can be used with the lifecycle_state property of a ProtectionPolicy.
A constant which can be used with the lifecycle_state property of a ProtectionPolicy.
A constant which can be used with the lifecycle_state property of a ProtectionPolicy.
A constant which can be used with the lifecycle_state property of a ProtectionPolicy.
[Required] Gets the backup_retention_period_in_days of this ProtectionPolicy.
[Required] Gets the compartment_id of this ProtectionPolicy.
Gets the defined_tags of this ProtectionPolicy.
Gets the display_name of this ProtectionPolicy.
Gets the freeform_tags of this ProtectionPolicy.
[Required] Gets the id of this ProtectionPolicy.
[Required] Gets the is_predefined_policy of this ProtectionPolicy.
Gets the lifecycle_details of this ProtectionPolicy.
Gets the lifecycle_state of this ProtectionPolicy.
Gets the must_enforce_cloud_locality of this ProtectionPolicy.
Gets the policy_locked_date_time of this ProtectionPolicy.
Gets the system_tags of this ProtectionPolicy.
Gets the time_created of this ProtectionPolicy.
Gets the time_updated of this ProtectionPolicy.
Methods:
__init__(**kwargs)Initializes a new ProtectionPolicy object with values from keyword arguments.
- LIFECYCLE_STATE_ACTIVE = 'ACTIVE'¶
A constant which can be used with the lifecycle_state property of a ProtectionPolicy. This constant has a value of “ACTIVE”
- LIFECYCLE_STATE_CREATING = 'CREATING'¶
A constant which can be used with the lifecycle_state property of a ProtectionPolicy. This constant has a value of “CREATING”
- LIFECYCLE_STATE_DELETED = 'DELETED'¶
A constant which can be used with the lifecycle_state property of a ProtectionPolicy. 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 ProtectionPolicy. 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 ProtectionPolicy. This constant has a value of “DELETING”
- LIFECYCLE_STATE_FAILED = 'FAILED'¶
A constant which can be used with the lifecycle_state property of a ProtectionPolicy. This constant has a value of “FAILED”
- LIFECYCLE_STATE_UPDATING = 'UPDATING'¶
A constant which can be used with the lifecycle_state property of a ProtectionPolicy. This constant has a value of “UPDATING”
- __init__(**kwargs)¶
Initializes a new ProtectionPolicy 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 ProtectionPolicy.
display_name (str) – The value to assign to the display_name property of this ProtectionPolicy.
compartment_id (str) – The value to assign to the compartment_id property of this ProtectionPolicy.
backup_retention_period_in_days (int) – The value to assign to the backup_retention_period_in_days property of this ProtectionPolicy.
is_predefined_policy (bool) – The value to assign to the is_predefined_policy property of this ProtectionPolicy.
policy_locked_date_time (str) – The value to assign to the policy_locked_date_time property of this ProtectionPolicy.
must_enforce_cloud_locality (bool) – The value to assign to the must_enforce_cloud_locality property of this ProtectionPolicy.
time_created (datetime) – The value to assign to the time_created property of this ProtectionPolicy.
time_updated (datetime) – The value to assign to the time_updated property of this ProtectionPolicy.
lifecycle_state (str) – The value to assign to the lifecycle_state property of this ProtectionPolicy. 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’.
lifecycle_details (str) – The value to assign to the lifecycle_details property of this ProtectionPolicy.
freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this ProtectionPolicy.
defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this ProtectionPolicy.
system_tags (dict(str, dict(str, object))) – The value to assign to the system_tags property of this ProtectionPolicy.
- property backup_retention_period_in_days¶
[Required] Gets the backup_retention_period_in_days of this ProtectionPolicy. The maximum number of days to retain backups for a protected database. Specify a period ranging from a minimum 14 days to a maximum 95 days. For example, specify the value 55 if you want to retain backups for 55 days.
- Returns
The backup_retention_period_in_days of this ProtectionPolicy.
- Return type
int
- property compartment_id¶
[Required] Gets the compartment_id of this ProtectionPolicy. The OCID of the compartment that contains the protection policy.
- Returns
The compartment_id of this ProtectionPolicy.
- Return type
str
- property defined_tags¶
Gets the defined_tags of this ProtectionPolicy. 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 ProtectionPolicy.
- Return type
dict(str, dict(str, object))
- property display_name¶
Gets the display_name of this ProtectionPolicy. A user provided name for the protection policy.
- Returns
The display_name of this ProtectionPolicy.
- Return type
str
- property freeform_tags¶
Gets the freeform_tags of this ProtectionPolicy. 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 ProtectionPolicy.
- Return type
dict(str, str)
- property id¶
[Required] Gets the id of this ProtectionPolicy. The protection policy OCID.
- Returns
The id of this ProtectionPolicy.
- Return type
str
- property is_predefined_policy¶
[Required] Gets the is_predefined_policy of this ProtectionPolicy. Set to TRUE if the policy is Oracle-defined, and FALSE for a user-defined custom policy. You can modify only the custom policies.
- Returns
The is_predefined_policy of this ProtectionPolicy.
- Return type
bool
- property lifecycle_details¶
Gets the lifecycle_details of this ProtectionPolicy. Detailed description about the current lifecycle state of the protection policy. For example, it can be used to provide actionable information for a resource in a Failed state.
- Returns
The lifecycle_details of this ProtectionPolicy.
- Return type
str
- property lifecycle_state¶
Gets the lifecycle_state of this ProtectionPolicy. The current state of the protection policy.
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 ProtectionPolicy.
- Return type
str
- property must_enforce_cloud_locality¶
Gets the must_enforce_cloud_locality of this ProtectionPolicy. Indicates whether the protection policy enforces Recovery Service to retain backups in the same cloud service environment where your Oracle Database is provisioned.
- Returns
The must_enforce_cloud_locality of this ProtectionPolicy.
- Return type
bool
- property policy_locked_date_time¶
Gets the policy_locked_date_time of this ProtectionPolicy. 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.
- Returns
The policy_locked_date_time of this ProtectionPolicy.
- Return type
str
- property system_tags¶
Gets the system_tags of this ProtectionPolicy. 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 ProtectionPolicy.
- Return type
dict(str, dict(str, object))
- property time_created¶
Gets the time_created of this ProtectionPolicy. An RFC3339 formatted datetime string that indicates the created time for the protection policy. For example: ‘2020-05-22T21:10:29.600Z’.
- Returns
The time_created of this ProtectionPolicy.
- Return type
datetime
- property time_updated¶
Gets the time_updated of this ProtectionPolicy. An RFC3339 formatted datetime string that indicates the updated time for the protection policy. For example: ‘2020-05-22T21:10:29.600Z’.
- Returns
The time_updated of this ProtectionPolicy.
- Return type
datetime