import * as pulumi from "@pulumi/pulumi"; /** * This resource provides the Protection Policy resource in Oracle Cloud Infrastructure Recovery service. * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/recovery-service/latest/ProtectionPolicy * * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/recovery * * Creates a new Protection Policy. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as oci from "@pulumi/oci"; * * const testProtectionPolicy = new oci.recoverymod.ProtectionPolicy("test_protection_policy", { * backupRetentionPeriodInDays: Number(protectionPolicyBackupRetentionPeriodInDays), * compartmentId: compartmentId, * displayName: protectionPolicyDisplayName, * definedTags: { * "foo-namespace.bar-key": "value", * }, * freeformTags: { * "bar-key": "value", * }, * mustEnforceCloudLocality: protectionPolicyMustEnforceCloudLocality === "true", * policyLockedDateTime: protectionPolicyPolicyLockedDateTime, * }); * ``` * * ## Import * * ProtectionPolicies can be imported using the `id`, e.g. * * ```sh * $ pulumi import oci:RecoveryMod/protectionPolicy:ProtectionPolicy test_protection_policy "id" * ``` */ export declare class ProtectionPolicy extends pulumi.CustomResource { /** * Get an existing ProtectionPolicy resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ProtectionPolicyState, opts?: pulumi.CustomResourceOptions): ProtectionPolicy; /** * Returns true if the given object is an instance of ProtectionPolicy. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ProtectionPolicy; /** * (Updatable) The maximum number of days to retain backups for a protected database. */ readonly backupRetentionPeriodInDays: pulumi.Output; /** * (Updatable) Compartment Identifier */ readonly compartmentId: pulumi.Output; /** * (Updatable) 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](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/resourcetags.htm) */ readonly definedTags: pulumi.Output<{ [key: string]: string; }>; /** * (Updatable) A user provided name for the protection policy. The 'displayName' does not have to be unique, and it can be modified. Avoid entering confidential information. */ readonly displayName: pulumi.Output; /** * (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` */ readonly freeformTags: pulumi.Output<{ [key: string]: string; }>; /** * Set to TRUE if the policy is Oracle-defined, and FALSE for a user-defined custom policy. You can modify only the custom policies. */ readonly isPredefinedPolicy: pulumi.Output; /** * 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. */ readonly lifecycleDetails: pulumi.Output; /** * Indicates whether the protection policy enforces Recovery Service to retain backups in the same cloud service environment where your Oracle Database is provisioned. This parameter is applicable if your Oracle Database runs in a different cloud service environment, such as Microsoft Azure. If you set the mustEnforceCloudLocality parameter to TRUE, then Recovery Service stores the database backups locally in the same cloud service environment where the database resides. For example, if your Oracle Database is provisioned on Microsoft Azure, then Recovery Service stores the database backups in Azure. Note: You cannot change the mustEnforceCloudLocality setting for a protection policy after you create it. */ readonly mustEnforceCloudLocality: pulumi.Output; /** * (Updatable) 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. Therefore, you must set policyLockedDateTime to a date that occurs 14 days after the current date. * * For example, assuming that the current date is Aug 1, 2023 9 pm, you can set policyLockedDateTime to '2023-08-15T21:00:00.600Z' (Aug 15, 2023, 9:00 pm), or greater. * * During the 14-day delay period, you can either increase or decrease the retention period in the policy. * * However, you are only allowed to increase the retention period on or after the retention lock date. * * You cannot change the value of policyLockedDateTime if the retention lock is already in effect. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ readonly policyLockedDateTime: pulumi.Output; /** * The current state of the protection policy. */ readonly state: pulumi.Output; /** * 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](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/resourcetags.htm) */ readonly systemTags: pulumi.Output<{ [key: string]: string; }>; /** * An RFC3339 formatted datetime string that indicates the created time for the protection policy. For example: '2020-05-22T21:10:29.600Z'. */ readonly timeCreated: pulumi.Output; /** * An RFC3339 formatted datetime string that indicates the updated time for the protection policy. For example: '2020-05-22T21:10:29.600Z'. */ readonly timeUpdated: pulumi.Output; /** * Create a ProtectionPolicy resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ProtectionPolicyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ProtectionPolicy resources. */ export interface ProtectionPolicyState { /** * (Updatable) The maximum number of days to retain backups for a protected database. */ backupRetentionPeriodInDays?: pulumi.Input; /** * (Updatable) Compartment Identifier */ compartmentId?: pulumi.Input; /** * (Updatable) 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](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/resourcetags.htm) */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) A user provided name for the protection policy. The 'displayName' does not have to be unique, and it can be modified. Avoid entering confidential information. */ displayName?: pulumi.Input; /** * (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Set to TRUE if the policy is Oracle-defined, and FALSE for a user-defined custom policy. You can modify only the custom policies. */ isPredefinedPolicy?: pulumi.Input; /** * 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. */ lifecycleDetails?: pulumi.Input; /** * Indicates whether the protection policy enforces Recovery Service to retain backups in the same cloud service environment where your Oracle Database is provisioned. This parameter is applicable if your Oracle Database runs in a different cloud service environment, such as Microsoft Azure. If you set the mustEnforceCloudLocality parameter to TRUE, then Recovery Service stores the database backups locally in the same cloud service environment where the database resides. For example, if your Oracle Database is provisioned on Microsoft Azure, then Recovery Service stores the database backups in Azure. Note: You cannot change the mustEnforceCloudLocality setting for a protection policy after you create it. */ mustEnforceCloudLocality?: pulumi.Input; /** * (Updatable) 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. Therefore, you must set policyLockedDateTime to a date that occurs 14 days after the current date. * * For example, assuming that the current date is Aug 1, 2023 9 pm, you can set policyLockedDateTime to '2023-08-15T21:00:00.600Z' (Aug 15, 2023, 9:00 pm), or greater. * * During the 14-day delay period, you can either increase or decrease the retention period in the policy. * * However, you are only allowed to increase the retention period on or after the retention lock date. * * You cannot change the value of policyLockedDateTime if the retention lock is already in effect. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ policyLockedDateTime?: pulumi.Input; /** * The current state of the protection policy. */ state?: pulumi.Input; /** * 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](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/resourcetags.htm) */ systemTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * An RFC3339 formatted datetime string that indicates the created time for the protection policy. For example: '2020-05-22T21:10:29.600Z'. */ timeCreated?: pulumi.Input; /** * An RFC3339 formatted datetime string that indicates the updated time for the protection policy. For example: '2020-05-22T21:10:29.600Z'. */ timeUpdated?: pulumi.Input; } /** * The set of arguments for constructing a ProtectionPolicy resource. */ export interface ProtectionPolicyArgs { /** * (Updatable) The maximum number of days to retain backups for a protected database. */ backupRetentionPeriodInDays: pulumi.Input; /** * (Updatable) Compartment Identifier */ compartmentId: pulumi.Input; /** * (Updatable) 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](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/resourcetags.htm) */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) A user provided name for the protection policy. The 'displayName' does not have to be unique, and it can be modified. Avoid entering confidential information. */ displayName: pulumi.Input; /** * (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Indicates whether the protection policy enforces Recovery Service to retain backups in the same cloud service environment where your Oracle Database is provisioned. This parameter is applicable if your Oracle Database runs in a different cloud service environment, such as Microsoft Azure. If you set the mustEnforceCloudLocality parameter to TRUE, then Recovery Service stores the database backups locally in the same cloud service environment where the database resides. For example, if your Oracle Database is provisioned on Microsoft Azure, then Recovery Service stores the database backups in Azure. Note: You cannot change the mustEnforceCloudLocality setting for a protection policy after you create it. */ mustEnforceCloudLocality?: pulumi.Input; /** * (Updatable) 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. Therefore, you must set policyLockedDateTime to a date that occurs 14 days after the current date. * * For example, assuming that the current date is Aug 1, 2023 9 pm, you can set policyLockedDateTime to '2023-08-15T21:00:00.600Z' (Aug 15, 2023, 9:00 pm), or greater. * * During the 14-day delay period, you can either increase or decrease the retention period in the policy. * * However, you are only allowed to increase the retention period on or after the retention lock date. * * You cannot change the value of policyLockedDateTime if the retention lock is already in effect. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ policyLockedDateTime?: pulumi.Input; } //# sourceMappingURL=protectionPolicy.d.ts.map