Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
oci.RecoveryMod.getProtectionPolicy
Explore with Pulumi AI
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:
- Protection
Policy stringId - The protection policy OCID.
- Protection
Policy stringId - The protection policy OCID.
- protection
Policy StringId - The protection policy OCID.
- protection
Policy stringId - The protection policy OCID.
- protection_
policy_ strid - The protection policy OCID.
- protection
Policy StringId - The protection policy OCID.
getProtectionPolicy Result
The following output properties are available:
- Backup
Retention intPeriod In Days - 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 string - The OCID of the compartment that contains the protection policy.
- 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 - Display
Name string - A user provided name for the protection policy.
- 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.
- Is
Predefined boolPolicy - 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 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.
- Policy
Locked stringDate Time - 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 stringId - State string
- The current state of the protection policy.
- 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 - Time
Created string - An RFC3339 formatted datetime string that indicates the created time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
- Time
Updated 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 intPeriod In Days - 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 string - The OCID of the compartment that contains the protection policy.
- 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 - Display
Name string - A user provided name for the protection policy.
- 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.
- Is
Predefined boolPolicy - 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 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.
- Policy
Locked stringDate Time - 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 stringId - State string
- The current state of the protection policy.
- 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 - Time
Created string - An RFC3339 formatted datetime string that indicates the created time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
- Time
Updated 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 IntegerPeriod In Days - 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 String - The OCID of the compartment that contains the protection policy.
- 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 - display
Name String - A user provided name for the protection policy.
- 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.
- is
Predefined BooleanPolicy - 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 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.
- policy
Locked StringDate Time - 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 StringId - state String
- The current state of the protection policy.
- 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 - time
Created String - An RFC3339 formatted datetime string that indicates the created time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
- time
Updated 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 numberPeriod In Days - 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 string - The OCID of the compartment that contains the protection policy.
- {[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 - display
Name string - A user provided name for the protection policy.
- {[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.
- is
Predefined booleanPolicy - 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 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.
- policy
Locked stringDate Time - 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 stringId - state string
- The current state of the protection policy.
- {[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 - time
Created string - An RFC3339 formatted datetime string that indicates the created time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
- time
Updated 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_ intperiod_ in_ days - 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.
- 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.
- 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_ boolpolicy - 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_ strdate_ time - 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_ strid - state str
- The current state of the protection policy.
- 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'.
- backup
Retention NumberPeriod In Days - 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 String - The OCID of the compartment that contains the protection policy.
- 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 - display
Name String - A user provided name for the protection policy.
- 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.
- is
Predefined BooleanPolicy - 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 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.
- policy
Locked StringDate Time - 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 StringId - state String
- The current state of the protection policy.
- 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 - time
Created String - An RFC3339 formatted datetime string that indicates the created time for the protection policy. For example: '2020-05-22T21:10:29.600Z'.
- time
Updated 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.
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi