1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. RecoveryMod
  5. ProtectionPolicy
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.RecoveryMod.ProtectionPolicy

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

    This resource provides the Protection Policy resource in Oracle Cloud Infrastructure Recovery service.

    Creates a new Protection Policy.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testProtectionPolicy = new oci.recoverymod.ProtectionPolicy("test_protection_policy", {
        backupRetentionPeriodInDays: protectionPolicyBackupRetentionPeriodInDays,
        compartmentId: compartmentId,
        displayName: protectionPolicyDisplayName,
        definedTags: {
            "foo-namespace.bar-key": "value",
        },
        freeformTags: {
            "bar-key": "value",
        },
        mustEnforceCloudLocality: protectionPolicyMustEnforceCloudLocality,
        policyLockedDateTime: protectionPolicyPolicyLockedDateTime,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_protection_policy = oci.recovery_mod.ProtectionPolicy("test_protection_policy",
        backup_retention_period_in_days=protection_policy_backup_retention_period_in_days,
        compartment_id=compartment_id,
        display_name=protection_policy_display_name,
        defined_tags={
            "foo-namespace.bar-key": "value",
        },
        freeform_tags={
            "bar-key": "value",
        },
        must_enforce_cloud_locality=protection_policy_must_enforce_cloud_locality,
        policy_locked_date_time=protection_policy_policy_locked_date_time)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/RecoveryMod"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := RecoveryMod.NewProtectionPolicy(ctx, "test_protection_policy", &RecoveryMod.ProtectionPolicyArgs{
    			BackupRetentionPeriodInDays: pulumi.Any(protectionPolicyBackupRetentionPeriodInDays),
    			CompartmentId:               pulumi.Any(compartmentId),
    			DisplayName:                 pulumi.Any(protectionPolicyDisplayName),
    			DefinedTags: pulumi.StringMap{
    				"foo-namespace.bar-key": pulumi.String("value"),
    			},
    			FreeformTags: pulumi.StringMap{
    				"bar-key": pulumi.String("value"),
    			},
    			MustEnforceCloudLocality: pulumi.Any(protectionPolicyMustEnforceCloudLocality),
    			PolicyLockedDateTime:     pulumi.Any(protectionPolicyPolicyLockedDateTime),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testProtectionPolicy = new Oci.RecoveryMod.ProtectionPolicy("test_protection_policy", new()
        {
            BackupRetentionPeriodInDays = protectionPolicyBackupRetentionPeriodInDays,
            CompartmentId = compartmentId,
            DisplayName = protectionPolicyDisplayName,
            DefinedTags = 
            {
                { "foo-namespace.bar-key", "value" },
            },
            FreeformTags = 
            {
                { "bar-key", "value" },
            },
            MustEnforceCloudLocality = protectionPolicyMustEnforceCloudLocality,
            PolicyLockedDateTime = protectionPolicyPolicyLockedDateTime,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.RecoveryMod.ProtectionPolicy;
    import com.pulumi.oci.RecoveryMod.ProtectionPolicyArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var testProtectionPolicy = new ProtectionPolicy("testProtectionPolicy", ProtectionPolicyArgs.builder()
                .backupRetentionPeriodInDays(protectionPolicyBackupRetentionPeriodInDays)
                .compartmentId(compartmentId)
                .displayName(protectionPolicyDisplayName)
                .definedTags(Map.of("foo-namespace.bar-key", "value"))
                .freeformTags(Map.of("bar-key", "value"))
                .mustEnforceCloudLocality(protectionPolicyMustEnforceCloudLocality)
                .policyLockedDateTime(protectionPolicyPolicyLockedDateTime)
                .build());
    
        }
    }
    
    resources:
      testProtectionPolicy:
        type: oci:RecoveryMod:ProtectionPolicy
        name: test_protection_policy
        properties:
          backupRetentionPeriodInDays: ${protectionPolicyBackupRetentionPeriodInDays}
          compartmentId: ${compartmentId}
          displayName: ${protectionPolicyDisplayName}
          definedTags:
            foo-namespace.bar-key: value
          freeformTags:
            bar-key: value
          mustEnforceCloudLocality: ${protectionPolicyMustEnforceCloudLocality}
          policyLockedDateTime: ${protectionPolicyPolicyLockedDateTime}
    

    Create ProtectionPolicy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ProtectionPolicy(name: string, args: ProtectionPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def ProtectionPolicy(resource_name: str,
                         args: ProtectionPolicyArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def ProtectionPolicy(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         backup_retention_period_in_days: Optional[int] = None,
                         compartment_id: Optional[str] = None,
                         display_name: Optional[str] = None,
                         defined_tags: Optional[Mapping[str, str]] = None,
                         freeform_tags: Optional[Mapping[str, str]] = None,
                         must_enforce_cloud_locality: Optional[bool] = None,
                         policy_locked_date_time: Optional[str] = None)
    func NewProtectionPolicy(ctx *Context, name string, args ProtectionPolicyArgs, opts ...ResourceOption) (*ProtectionPolicy, error)
    public ProtectionPolicy(string name, ProtectionPolicyArgs args, CustomResourceOptions? opts = null)
    public ProtectionPolicy(String name, ProtectionPolicyArgs args)
    public ProtectionPolicy(String name, ProtectionPolicyArgs args, CustomResourceOptions options)
    
    type: oci:RecoveryMod:ProtectionPolicy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ProtectionPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ProtectionPolicyArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ProtectionPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProtectionPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProtectionPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var protectionPolicyResource = new Oci.RecoveryMod.ProtectionPolicy("protectionPolicyResource", new()
    {
        BackupRetentionPeriodInDays = 0,
        CompartmentId = "string",
        DisplayName = "string",
        DefinedTags = 
        {
            { "string", "string" },
        },
        FreeformTags = 
        {
            { "string", "string" },
        },
        MustEnforceCloudLocality = false,
        PolicyLockedDateTime = "string",
    });
    
    example, err := RecoveryMod.NewProtectionPolicy(ctx, "protectionPolicyResource", &RecoveryMod.ProtectionPolicyArgs{
    	BackupRetentionPeriodInDays: pulumi.Int(0),
    	CompartmentId:               pulumi.String("string"),
    	DisplayName:                 pulumi.String("string"),
    	DefinedTags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	FreeformTags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	MustEnforceCloudLocality: pulumi.Bool(false),
    	PolicyLockedDateTime:     pulumi.String("string"),
    })
    
    var protectionPolicyResource = new ProtectionPolicy("protectionPolicyResource", ProtectionPolicyArgs.builder()
        .backupRetentionPeriodInDays(0)
        .compartmentId("string")
        .displayName("string")
        .definedTags(Map.of("string", "string"))
        .freeformTags(Map.of("string", "string"))
        .mustEnforceCloudLocality(false)
        .policyLockedDateTime("string")
        .build());
    
    protection_policy_resource = oci.recovery_mod.ProtectionPolicy("protectionPolicyResource",
        backup_retention_period_in_days=0,
        compartment_id="string",
        display_name="string",
        defined_tags={
            "string": "string",
        },
        freeform_tags={
            "string": "string",
        },
        must_enforce_cloud_locality=False,
        policy_locked_date_time="string")
    
    const protectionPolicyResource = new oci.recoverymod.ProtectionPolicy("protectionPolicyResource", {
        backupRetentionPeriodInDays: 0,
        compartmentId: "string",
        displayName: "string",
        definedTags: {
            string: "string",
        },
        freeformTags: {
            string: "string",
        },
        mustEnforceCloudLocality: false,
        policyLockedDateTime: "string",
    });
    
    type: oci:RecoveryMod:ProtectionPolicy
    properties:
        backupRetentionPeriodInDays: 0
        compartmentId: string
        definedTags:
            string: string
        displayName: string
        freeformTags:
            string: string
        mustEnforceCloudLocality: false
        policyLockedDateTime: string
    

    ProtectionPolicy Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ProtectionPolicy resource accepts the following input properties:

    BackupRetentionPeriodInDays int
    (Updatable) The maximum number of days to retain backups for a protected database.
    CompartmentId string
    (Updatable) Compartment Identifier
    DisplayName 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.
    DefinedTags Dictionary<string, string>
    (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
    FreeformTags Dictionary<string, string>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    MustEnforceCloudLocality bool
    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.
    PolicyLockedDateTime string

    (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

    BackupRetentionPeriodInDays int
    (Updatable) The maximum number of days to retain backups for a protected database.
    CompartmentId string
    (Updatable) Compartment Identifier
    DisplayName 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.
    DefinedTags map[string]string
    (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
    FreeformTags map[string]string
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    MustEnforceCloudLocality bool
    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.
    PolicyLockedDateTime string

    (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

    backupRetentionPeriodInDays Integer
    (Updatable) The maximum number of days to retain backups for a protected database.
    compartmentId String
    (Updatable) Compartment Identifier
    displayName 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.
    definedTags Map<String,String>
    (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
    freeformTags Map<String,String>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    mustEnforceCloudLocality Boolean
    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.
    policyLockedDateTime String

    (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

    backupRetentionPeriodInDays number
    (Updatable) The maximum number of days to retain backups for a protected database.
    compartmentId string
    (Updatable) Compartment Identifier
    displayName 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.
    definedTags {[key: string]: string}
    (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
    freeformTags {[key: string]: string}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    mustEnforceCloudLocality boolean
    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.
    policyLockedDateTime string

    (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

    backup_retention_period_in_days int
    (Updatable) The maximum number of days to retain backups for a protected database.
    compartment_id str
    (Updatable) Compartment Identifier
    display_name str
    (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.
    defined_tags Mapping[str, str]
    (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
    freeform_tags Mapping[str, str]
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    must_enforce_cloud_locality bool
    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.
    policy_locked_date_time str

    (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

    backupRetentionPeriodInDays Number
    (Updatable) The maximum number of days to retain backups for a protected database.
    compartmentId String
    (Updatable) Compartment Identifier
    displayName 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.
    definedTags Map<String>
    (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
    freeformTags Map<String>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    mustEnforceCloudLocality Boolean
    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.
    policyLockedDateTime String

    (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

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ProtectionPolicy resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    IsPredefinedPolicy bool
    Set to TRUE if the policy is Oracle-defined, and FALSE for a user-defined custom policy. You can modify only the custom policies.
    LifecycleDetails string
    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.
    State string
    The current state of the protection policy.
    SystemTags Dictionary<string, string>
    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
    TimeCreated string
    An RFC3339 formatted datetime string that indicates the created time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
    TimeUpdated string
    An RFC3339 formatted datetime string that indicates the updated time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsPredefinedPolicy bool
    Set to TRUE if the policy is Oracle-defined, and FALSE for a user-defined custom policy. You can modify only the custom policies.
    LifecycleDetails string
    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.
    State string
    The current state of the protection policy.
    SystemTags map[string]string
    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
    TimeCreated string
    An RFC3339 formatted datetime string that indicates the created time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
    TimeUpdated string
    An RFC3339 formatted datetime string that indicates the updated time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
    id String
    The provider-assigned unique ID for this managed resource.
    isPredefinedPolicy Boolean
    Set to TRUE if the policy is Oracle-defined, and FALSE for a user-defined custom policy. You can modify only the custom policies.
    lifecycleDetails String
    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.
    state String
    The current state of the protection policy.
    systemTags Map<String,String>
    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
    timeCreated String
    An RFC3339 formatted datetime string that indicates the created time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
    timeUpdated String
    An RFC3339 formatted datetime string that indicates the updated time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
    id string
    The provider-assigned unique ID for this managed resource.
    isPredefinedPolicy boolean
    Set to TRUE if the policy is Oracle-defined, and FALSE for a user-defined custom policy. You can modify only the custom policies.
    lifecycleDetails string
    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.
    state string
    The current state of the protection policy.
    systemTags {[key: string]: string}
    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
    timeCreated string
    An RFC3339 formatted datetime string that indicates the created time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
    timeUpdated string
    An RFC3339 formatted datetime string that indicates the updated time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
    id str
    The provider-assigned unique ID for this managed resource.
    is_predefined_policy bool
    Set to TRUE if the policy is Oracle-defined, and FALSE for a user-defined custom policy. You can modify only the custom policies.
    lifecycle_details str
    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.
    state str
    The current state of the protection policy.
    system_tags Mapping[str, str]
    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
    time_created str
    An RFC3339 formatted datetime string that indicates the created time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
    time_updated str
    An RFC3339 formatted datetime string that indicates the updated time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
    id String
    The provider-assigned unique ID for this managed resource.
    isPredefinedPolicy Boolean
    Set to TRUE if the policy is Oracle-defined, and FALSE for a user-defined custom policy. You can modify only the custom policies.
    lifecycleDetails String
    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.
    state String
    The current state of the protection policy.
    systemTags Map<String>
    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
    timeCreated String
    An RFC3339 formatted datetime string that indicates the created time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
    timeUpdated String
    An RFC3339 formatted datetime string that indicates the updated time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.

    Look up Existing ProtectionPolicy Resource

    Get an existing ProtectionPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ProtectionPolicyState, opts?: CustomResourceOptions): ProtectionPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            backup_retention_period_in_days: Optional[int] = None,
            compartment_id: Optional[str] = None,
            defined_tags: Optional[Mapping[str, str]] = None,
            display_name: Optional[str] = None,
            freeform_tags: Optional[Mapping[str, str]] = None,
            is_predefined_policy: Optional[bool] = None,
            lifecycle_details: Optional[str] = None,
            must_enforce_cloud_locality: Optional[bool] = None,
            policy_locked_date_time: Optional[str] = None,
            state: Optional[str] = None,
            system_tags: Optional[Mapping[str, str]] = None,
            time_created: Optional[str] = None,
            time_updated: Optional[str] = None) -> ProtectionPolicy
    func GetProtectionPolicy(ctx *Context, name string, id IDInput, state *ProtectionPolicyState, opts ...ResourceOption) (*ProtectionPolicy, error)
    public static ProtectionPolicy Get(string name, Input<string> id, ProtectionPolicyState? state, CustomResourceOptions? opts = null)
    public static ProtectionPolicy get(String name, Output<String> id, ProtectionPolicyState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    BackupRetentionPeriodInDays int
    (Updatable) The maximum number of days to retain backups for a protected database.
    CompartmentId string
    (Updatable) Compartment Identifier
    DefinedTags Dictionary<string, string>
    (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
    DisplayName 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.
    FreeformTags Dictionary<string, string>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    IsPredefinedPolicy bool
    Set to TRUE if the policy is Oracle-defined, and FALSE for a user-defined custom policy. You can modify only the custom policies.
    LifecycleDetails string
    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.
    MustEnforceCloudLocality bool
    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.
    PolicyLockedDateTime string

    (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

    State string
    The current state of the protection policy.
    SystemTags Dictionary<string, string>
    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
    TimeCreated string
    An RFC3339 formatted datetime string that indicates the created time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
    TimeUpdated string
    An RFC3339 formatted datetime string that indicates the updated time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
    BackupRetentionPeriodInDays int
    (Updatable) The maximum number of days to retain backups for a protected database.
    CompartmentId string
    (Updatable) Compartment Identifier
    DefinedTags map[string]string
    (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
    DisplayName 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.
    FreeformTags map[string]string
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    IsPredefinedPolicy bool
    Set to TRUE if the policy is Oracle-defined, and FALSE for a user-defined custom policy. You can modify only the custom policies.
    LifecycleDetails string
    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.
    MustEnforceCloudLocality bool
    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.
    PolicyLockedDateTime string

    (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

    State string
    The current state of the protection policy.
    SystemTags map[string]string
    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
    TimeCreated string
    An RFC3339 formatted datetime string that indicates the created time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
    TimeUpdated string
    An RFC3339 formatted datetime string that indicates the updated time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
    backupRetentionPeriodInDays Integer
    (Updatable) The maximum number of days to retain backups for a protected database.
    compartmentId String
    (Updatable) Compartment Identifier
    definedTags Map<String,String>
    (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
    displayName 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.
    freeformTags Map<String,String>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    isPredefinedPolicy Boolean
    Set to TRUE if the policy is Oracle-defined, and FALSE for a user-defined custom policy. You can modify only the custom policies.
    lifecycleDetails String
    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.
    mustEnforceCloudLocality Boolean
    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.
    policyLockedDateTime String

    (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

    state String
    The current state of the protection policy.
    systemTags Map<String,String>
    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
    timeCreated String
    An RFC3339 formatted datetime string that indicates the created time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
    timeUpdated String
    An RFC3339 formatted datetime string that indicates the updated time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
    backupRetentionPeriodInDays number
    (Updatable) The maximum number of days to retain backups for a protected database.
    compartmentId string
    (Updatable) Compartment Identifier
    definedTags {[key: string]: string}
    (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
    displayName 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.
    freeformTags {[key: string]: string}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    isPredefinedPolicy boolean
    Set to TRUE if the policy is Oracle-defined, and FALSE for a user-defined custom policy. You can modify only the custom policies.
    lifecycleDetails string
    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.
    mustEnforceCloudLocality boolean
    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.
    policyLockedDateTime string

    (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

    state string
    The current state of the protection policy.
    systemTags {[key: string]: string}
    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
    timeCreated string
    An RFC3339 formatted datetime string that indicates the created time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
    timeUpdated string
    An RFC3339 formatted datetime string that indicates the updated time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
    backup_retention_period_in_days int
    (Updatable) The maximum number of days to retain backups for a protected database.
    compartment_id str
    (Updatable) Compartment Identifier
    defined_tags Mapping[str, str]
    (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
    display_name str
    (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.
    freeform_tags Mapping[str, str]
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    is_predefined_policy bool
    Set to TRUE if the policy is Oracle-defined, and FALSE for a user-defined custom policy. You can modify only the custom policies.
    lifecycle_details str
    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.
    must_enforce_cloud_locality bool
    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.
    policy_locked_date_time str

    (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

    state str
    The current state of the protection policy.
    system_tags Mapping[str, str]
    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
    time_created str
    An RFC3339 formatted datetime string that indicates the created time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
    time_updated str
    An RFC3339 formatted datetime string that indicates the updated time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
    backupRetentionPeriodInDays Number
    (Updatable) The maximum number of days to retain backups for a protected database.
    compartmentId String
    (Updatable) Compartment Identifier
    definedTags Map<String>
    (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
    displayName 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.
    freeformTags Map<String>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    isPredefinedPolicy Boolean
    Set to TRUE if the policy is Oracle-defined, and FALSE for a user-defined custom policy. You can modify only the custom policies.
    lifecycleDetails String
    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.
    mustEnforceCloudLocality Boolean
    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.
    policyLockedDateTime String

    (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

    state String
    The current state of the protection policy.
    systemTags Map<String>
    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
    timeCreated String
    An RFC3339 formatted datetime string that indicates the created time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
    timeUpdated String
    An RFC3339 formatted datetime string that indicates the updated time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.

    Import

    ProtectionPolicies can be imported using the id, e.g.

    $ pulumi import oci:RecoveryMod/protectionPolicy:ProtectionPolicy test_protection_policy "id"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi