1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. RecoveryMod
  5. getProtectionPolicy
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.RecoveryMod.getProtectionPolicy

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

    This data source provides details about a specific Protection Policy resource in Oracle Cloud Infrastructure Recovery service.

    Gets information about a specified protection policy.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testProtectionPolicy = oci.RecoveryMod.getProtectionPolicy({
        protectionPolicyId: testProtectionPolicyOciRecoveryProtectionPolicy.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_protection_policy = oci.RecoveryMod.get_protection_policy(protection_policy_id=test_protection_policy_oci_recovery_protection_policy["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/RecoveryMod"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := RecoveryMod.GetProtectionPolicy(ctx, &recoverymod.GetProtectionPolicyArgs{
    			ProtectionPolicyId: testProtectionPolicyOciRecoveryProtectionPolicy.Id,
    		}, nil)
    		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 = Oci.RecoveryMod.GetProtectionPolicy.Invoke(new()
        {
            ProtectionPolicyId = testProtectionPolicyOciRecoveryProtectionPolicy.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.RecoveryMod.RecoveryModFunctions;
    import com.pulumi.oci.RecoveryMod.inputs.GetProtectionPolicyArgs;
    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) {
            final var testProtectionPolicy = RecoveryModFunctions.getProtectionPolicy(GetProtectionPolicyArgs.builder()
                .protectionPolicyId(testProtectionPolicyOciRecoveryProtectionPolicy.id())
                .build());
    
        }
    }
    
    variables:
      testProtectionPolicy:
        fn::invoke:
          Function: oci:RecoveryMod:getProtectionPolicy
          Arguments:
            protectionPolicyId: ${testProtectionPolicyOciRecoveryProtectionPolicy.id}
    

    Using getProtectionPolicy

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getProtectionPolicy(args: GetProtectionPolicyArgs, opts?: InvokeOptions): Promise<GetProtectionPolicyResult>
    function getProtectionPolicyOutput(args: GetProtectionPolicyOutputArgs, opts?: InvokeOptions): Output<GetProtectionPolicyResult>
    def get_protection_policy(protection_policy_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetProtectionPolicyResult
    def get_protection_policy_output(protection_policy_id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetProtectionPolicyResult]
    func GetProtectionPolicy(ctx *Context, args *GetProtectionPolicyArgs, opts ...InvokeOption) (*GetProtectionPolicyResult, error)
    func GetProtectionPolicyOutput(ctx *Context, args *GetProtectionPolicyOutputArgs, opts ...InvokeOption) GetProtectionPolicyResultOutput

    > Note: This function is named GetProtectionPolicy in the Go SDK.

    public static class GetProtectionPolicy 
    {
        public static Task<GetProtectionPolicyResult> InvokeAsync(GetProtectionPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetProtectionPolicyResult> Invoke(GetProtectionPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetProtectionPolicyResult> getProtectionPolicy(GetProtectionPolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:RecoveryMod/getProtectionPolicy:getProtectionPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ProtectionPolicyId string
    The protection policy OCID.
    ProtectionPolicyId string
    The protection policy OCID.
    protectionPolicyId String
    The protection policy OCID.
    protectionPolicyId string
    The protection policy OCID.
    protection_policy_id str
    The protection policy OCID.
    protectionPolicyId String
    The protection policy OCID.

    getProtectionPolicy Result

    The following output properties are available:

    BackupRetentionPeriodInDays int
    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.
    CompartmentId string
    The OCID of the compartment that contains the protection policy.
    DefinedTags Dictionary<string, object>
    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
    A user provided name for the protection policy.
    FreeformTags Dictionary<string, object>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Id string
    The protection policy OCID.
    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.
    PolicyLockedDateTime string
    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.
    ProtectionPolicyId string
    State string
    The current state of the protection policy.
    SystemTags Dictionary<string, object>
    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
    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.
    CompartmentId string
    The OCID of the compartment that contains the protection policy.
    DefinedTags map[string]interface{}
    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
    A user provided name for the protection policy.
    FreeformTags map[string]interface{}
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Id string
    The protection policy OCID.
    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.
    PolicyLockedDateTime string
    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.
    ProtectionPolicyId string
    State string
    The current state of the protection policy.
    SystemTags map[string]interface{}
    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
    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.
    compartmentId String
    The OCID of the compartment that contains the protection policy.
    definedTags Map<String,Object>
    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
    A user provided name for the protection policy.
    freeformTags Map<String,Object>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id String
    The protection policy OCID.
    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.
    policyLockedDateTime String
    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.
    protectionPolicyId String
    state String
    The current state of the protection policy.
    systemTags Map<String,Object>
    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
    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.
    compartmentId string
    The OCID of the compartment that contains the protection policy.
    definedTags {[key: string]: any}
    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
    A user provided name for the protection policy.
    freeformTags {[key: string]: any}
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id string
    The protection policy OCID.
    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.
    policyLockedDateTime string
    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.
    protectionPolicyId string
    state string
    The current state of the protection policy.
    systemTags {[key: string]: any}
    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
    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.
    compartment_id str
    The OCID of the compartment that contains the protection policy.
    defined_tags Mapping[str, Any]
    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
    A user provided name for the protection policy.
    freeform_tags Mapping[str, Any]
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id str
    The protection policy OCID.
    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.
    policy_locked_date_time str
    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.
    protection_policy_id str
    state str
    The current state of the protection policy.
    system_tags Mapping[str, Any]
    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
    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.
    compartmentId String
    The OCID of the compartment that contains the protection policy.
    definedTags Map<Any>
    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
    A user provided name for the protection policy.
    freeformTags Map<Any>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id String
    The protection policy OCID.
    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.
    policyLockedDateTime String
    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.
    protectionPolicyId String
    state String
    The current state of the protection policy.
    systemTags Map<Any>
    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'.

    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 v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi