1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. hbr
  5. Policy
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.hbr.Policy

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    Provides a HBR Policy resource.

    For information about HBR Policy and how to use it, see What is Policy.

    NOTE: Available since v1.221.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const _default = new random.index.Integer("default", {
        max: 99999,
        min: 10000,
    });
    const defaultyk84Hc = new alicloud.hbr.Vault("defaultyk84Hc", {
        vaultType: "STANDARD",
        vaultName: `example-value-${_default.result}`,
    });
    const defaultoqWvHQ = new alicloud.hbr.Policy("defaultoqWvHQ", {
        policyName: `example-value-${_default.result}`,
        rules: [{
            ruleType: "BACKUP",
            backupType: "COMPLETE",
            schedule: "I|1631685600|P1D",
            retention: 7,
            archiveDays: 0,
            vaultId: defaultyk84Hc.id,
        }],
        policyDescription: "policy example",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = random.index.Integer("default",
        max=99999,
        min=10000)
    defaultyk84_hc = alicloud.hbr.Vault("defaultyk84Hc",
        vault_type="STANDARD",
        vault_name=f"example-value-{default['result']}")
    defaultoq_wv_hq = alicloud.hbr.Policy("defaultoqWvHQ",
        policy_name=f"example-value-{default['result']}",
        rules=[alicloud.hbr.PolicyRuleArgs(
            rule_type="BACKUP",
            backup_type="COMPLETE",
            schedule="I|1631685600|P1D",
            retention=7,
            archive_days=0,
            vault_id=defaultyk84_hc.id,
        )],
        policy_description="policy example")
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/hbr"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
    			Max: 99999,
    			Min: 10000,
    		})
    		if err != nil {
    			return err
    		}
    		defaultyk84Hc, err := hbr.NewVault(ctx, "defaultyk84Hc", &hbr.VaultArgs{
    			VaultType: pulumi.String("STANDARD"),
    			VaultName: pulumi.String(fmt.Sprintf("example-value-%v", _default.Result)),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = hbr.NewPolicy(ctx, "defaultoqWvHQ", &hbr.PolicyArgs{
    			PolicyName: pulumi.String(fmt.Sprintf("example-value-%v", _default.Result)),
    			Rules: hbr.PolicyRuleArray{
    				&hbr.PolicyRuleArgs{
    					RuleType:    pulumi.String("BACKUP"),
    					BackupType:  pulumi.String("COMPLETE"),
    					Schedule:    pulumi.String("I|1631685600|P1D"),
    					Retention:   pulumi.Int(7),
    					ArchiveDays: pulumi.Int(0),
    					VaultId:     defaultyk84Hc.ID(),
    				},
    			},
    			PolicyDescription: pulumi.String("policy example"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var @default = new Random.Index.Integer("default", new()
        {
            Max = 99999,
            Min = 10000,
        });
    
        var defaultyk84Hc = new AliCloud.Hbr.Vault("defaultyk84Hc", new()
        {
            VaultType = "STANDARD",
            VaultName = $"example-value-{@default.Result}",
        });
    
        var defaultoqWvHQ = new AliCloud.Hbr.Policy("defaultoqWvHQ", new()
        {
            PolicyName = $"example-value-{@default.Result}",
            Rules = new[]
            {
                new AliCloud.Hbr.Inputs.PolicyRuleArgs
                {
                    RuleType = "BACKUP",
                    BackupType = "COMPLETE",
                    Schedule = "I|1631685600|P1D",
                    Retention = 7,
                    ArchiveDays = 0,
                    VaultId = defaultyk84Hc.Id,
                },
            },
            PolicyDescription = "policy example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.integer;
    import com.pulumi.random.IntegerArgs;
    import com.pulumi.alicloud.hbr.Vault;
    import com.pulumi.alicloud.hbr.VaultArgs;
    import com.pulumi.alicloud.hbr.Policy;
    import com.pulumi.alicloud.hbr.PolicyArgs;
    import com.pulumi.alicloud.hbr.inputs.PolicyRuleArgs;
    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 config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            var default_ = new Integer("default", IntegerArgs.builder()
                .max(99999)
                .min(10000)
                .build());
    
            var defaultyk84Hc = new Vault("defaultyk84Hc", VaultArgs.builder()
                .vaultType("STANDARD")
                .vaultName(String.format("example-value-%s", default_.result()))
                .build());
    
            var defaultoqWvHQ = new Policy("defaultoqWvHQ", PolicyArgs.builder()
                .policyName(String.format("example-value-%s", default_.result()))
                .rules(PolicyRuleArgs.builder()
                    .ruleType("BACKUP")
                    .backupType("COMPLETE")
                    .schedule("I|1631685600|P1D")
                    .retention("7")
                    .archiveDays("0")
                    .vaultId(defaultyk84Hc.id())
                    .build())
                .policyDescription("policy example")
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      default:
        type: random:integer
        properties:
          max: 99999
          min: 10000
      defaultyk84Hc:
        type: alicloud:hbr:Vault
        properties:
          vaultType: STANDARD
          vaultName: example-value-${default.result}
      defaultoqWvHQ:
        type: alicloud:hbr:Policy
        properties:
          policyName: example-value-${default.result}
          rules:
            - ruleType: BACKUP
              backupType: COMPLETE
              schedule: I|1631685600|P1D
              retention: '7'
              archiveDays: '0'
              vaultId: ${defaultyk84Hc.id}
          policyDescription: policy example
    

    Create Policy Resource

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

    Constructor syntax

    new Policy(name: string, args?: PolicyArgs, opts?: CustomResourceOptions);
    @overload
    def Policy(resource_name: str,
               args: Optional[PolicyArgs] = None,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Policy(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               policy_description: Optional[str] = None,
               policy_name: Optional[str] = None,
               rules: Optional[Sequence[PolicyRuleArgs]] = None)
    func NewPolicy(ctx *Context, name string, args *PolicyArgs, opts ...ResourceOption) (*Policy, error)
    public Policy(string name, PolicyArgs? args = null, CustomResourceOptions? opts = null)
    public Policy(String name, PolicyArgs args)
    public Policy(String name, PolicyArgs args, CustomResourceOptions options)
    
    type: alicloud:hbr:Policy
    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 PolicyArgs
    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 PolicyArgs
    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 PolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PolicyArgs
    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 policyResource = new AliCloud.Hbr.Policy("policyResource", new()
    {
        PolicyDescription = "string",
        PolicyName = "string",
        Rules = new[]
        {
            new AliCloud.Hbr.Inputs.PolicyRuleArgs
            {
                RuleType = "string",
                ArchiveDays = 0,
                BackupType = "string",
                KeepLatestSnapshots = 0,
                ReplicationRegionId = "string",
                Retention = 0,
                RetentionRules = new[]
                {
                    new AliCloud.Hbr.Inputs.PolicyRuleRetentionRuleArgs
                    {
                        AdvancedRetentionType = "string",
                        Retention = 0,
                    },
                },
                RuleId = "string",
                Schedule = "string",
                VaultId = "string",
            },
        },
    });
    
    example, err := hbr.NewPolicy(ctx, "policyResource", &hbr.PolicyArgs{
    	PolicyDescription: pulumi.String("string"),
    	PolicyName:        pulumi.String("string"),
    	Rules: hbr.PolicyRuleArray{
    		&hbr.PolicyRuleArgs{
    			RuleType:            pulumi.String("string"),
    			ArchiveDays:         pulumi.Int(0),
    			BackupType:          pulumi.String("string"),
    			KeepLatestSnapshots: pulumi.Int(0),
    			ReplicationRegionId: pulumi.String("string"),
    			Retention:           pulumi.Int(0),
    			RetentionRules: hbr.PolicyRuleRetentionRuleArray{
    				&hbr.PolicyRuleRetentionRuleArgs{
    					AdvancedRetentionType: pulumi.String("string"),
    					Retention:             pulumi.Int(0),
    				},
    			},
    			RuleId:   pulumi.String("string"),
    			Schedule: pulumi.String("string"),
    			VaultId:  pulumi.String("string"),
    		},
    	},
    })
    
    var policyResource = new Policy("policyResource", PolicyArgs.builder()
        .policyDescription("string")
        .policyName("string")
        .rules(PolicyRuleArgs.builder()
            .ruleType("string")
            .archiveDays(0)
            .backupType("string")
            .keepLatestSnapshots(0)
            .replicationRegionId("string")
            .retention(0)
            .retentionRules(PolicyRuleRetentionRuleArgs.builder()
                .advancedRetentionType("string")
                .retention(0)
                .build())
            .ruleId("string")
            .schedule("string")
            .vaultId("string")
            .build())
        .build());
    
    policy_resource = alicloud.hbr.Policy("policyResource",
        policy_description="string",
        policy_name="string",
        rules=[alicloud.hbr.PolicyRuleArgs(
            rule_type="string",
            archive_days=0,
            backup_type="string",
            keep_latest_snapshots=0,
            replication_region_id="string",
            retention=0,
            retention_rules=[alicloud.hbr.PolicyRuleRetentionRuleArgs(
                advanced_retention_type="string",
                retention=0,
            )],
            rule_id="string",
            schedule="string",
            vault_id="string",
        )])
    
    const policyResource = new alicloud.hbr.Policy("policyResource", {
        policyDescription: "string",
        policyName: "string",
        rules: [{
            ruleType: "string",
            archiveDays: 0,
            backupType: "string",
            keepLatestSnapshots: 0,
            replicationRegionId: "string",
            retention: 0,
            retentionRules: [{
                advancedRetentionType: "string",
                retention: 0,
            }],
            ruleId: "string",
            schedule: "string",
            vaultId: "string",
        }],
    });
    
    type: alicloud:hbr:Policy
    properties:
        policyDescription: string
        policyName: string
        rules:
            - archiveDays: 0
              backupType: string
              keepLatestSnapshots: 0
              replicationRegionId: string
              retention: 0
              retentionRules:
                - advancedRetentionType: string
                  retention: 0
              ruleId: string
              ruleType: string
              schedule: string
              vaultId: string
    

    Policy 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 Policy resource accepts the following input properties:

    PolicyDescription string
    The policy description.
    PolicyName string
    Policy Name.
    Rules List<Pulumi.AliCloud.Hbr.Inputs.PolicyRule>
    A list of policy rules. See rules below.
    PolicyDescription string
    The policy description.
    PolicyName string
    Policy Name.
    Rules []PolicyRuleArgs
    A list of policy rules. See rules below.
    policyDescription String
    The policy description.
    policyName String
    Policy Name.
    rules List<PolicyRule>
    A list of policy rules. See rules below.
    policyDescription string
    The policy description.
    policyName string
    Policy Name.
    rules PolicyRule[]
    A list of policy rules. See rules below.
    policy_description str
    The policy description.
    policy_name str
    Policy Name.
    rules Sequence[PolicyRuleArgs]
    A list of policy rules. See rules below.
    policyDescription String
    The policy description.
    policyName String
    Policy Name.
    rules List<Property Map>
    A list of policy rules. See rules below.

    Outputs

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

    CreateTime string
    Policy creation time.
    Id string
    The provider-assigned unique ID for this managed resource.
    CreateTime string
    Policy creation time.
    Id string
    The provider-assigned unique ID for this managed resource.
    createTime String
    Policy creation time.
    id String
    The provider-assigned unique ID for this managed resource.
    createTime string
    Policy creation time.
    id string
    The provider-assigned unique ID for this managed resource.
    create_time str
    Policy creation time.
    id str
    The provider-assigned unique ID for this managed resource.
    createTime String
    Policy creation time.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Policy Resource

    Get an existing Policy 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?: PolicyState, opts?: CustomResourceOptions): Policy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[str] = None,
            policy_description: Optional[str] = None,
            policy_name: Optional[str] = None,
            rules: Optional[Sequence[PolicyRuleArgs]] = None) -> Policy
    func GetPolicy(ctx *Context, name string, id IDInput, state *PolicyState, opts ...ResourceOption) (*Policy, error)
    public static Policy Get(string name, Input<string> id, PolicyState? state, CustomResourceOptions? opts = null)
    public static Policy get(String name, Output<String> id, PolicyState 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:
    CreateTime string
    Policy creation time.
    PolicyDescription string
    The policy description.
    PolicyName string
    Policy Name.
    Rules List<Pulumi.AliCloud.Hbr.Inputs.PolicyRule>
    A list of policy rules. See rules below.
    CreateTime string
    Policy creation time.
    PolicyDescription string
    The policy description.
    PolicyName string
    Policy Name.
    Rules []PolicyRuleArgs
    A list of policy rules. See rules below.
    createTime String
    Policy creation time.
    policyDescription String
    The policy description.
    policyName String
    Policy Name.
    rules List<PolicyRule>
    A list of policy rules. See rules below.
    createTime string
    Policy creation time.
    policyDescription string
    The policy description.
    policyName string
    Policy Name.
    rules PolicyRule[]
    A list of policy rules. See rules below.
    create_time str
    Policy creation time.
    policy_description str
    The policy description.
    policy_name str
    Policy Name.
    rules Sequence[PolicyRuleArgs]
    A list of policy rules. See rules below.
    createTime String
    Policy creation time.
    policyDescription String
    The policy description.
    policyName String
    Policy Name.
    rules List<Property Map>
    A list of policy rules. See rules below.

    Supporting Types

    PolicyRule, PolicyRuleArgs

    RuleType string
    Rule Type.
    ArchiveDays int
    This parameter is required only when the value of RuleType is **TRANSITION. The minimum value is 30, and the Retention-ArchiveDays needs to be greater than or equal to 60.
    BackupType string
    This parameter is required only when the RuleType value is **BACKUP. Backup Type.
    KeepLatestSnapshots int
    This parameter is required only when RuleType is set to BACKUP.
    ReplicationRegionId string
    Only when the RuleType value is.
    Retention int
    Retention time, in days.
    RetentionRules List<Pulumi.AliCloud.Hbr.Inputs.PolicyRuleRetentionRule>
    This parameter is required only when the value of RuleType is TRANSITION. See retention_rules below.
    RuleId string
    Rule ID.
    Schedule string
    This parameter is required only if you set the RuleType parameter to BACKUP. This parameter specifies the backup schedule settings. Format: I|{startTime}|{interval}. The system runs the first backup job at a point in time that is specified in the {startTime} parameter and the subsequent backup jobs at an interval that is specified in the {interval} parameter. The system does not run a backup job before the specified point in time. Each backup job, except the first one, starts only after the previous backup job is complete. For example, I|1631685600|P1D specifies that the system runs the first backup job at 14:00:00 on September 15, 2021 and the subsequent backup jobs once a day. * startTime: the time at which the system starts to run a backup job. The time must follow the UNIX time format. Unit: seconds. * interval: the interval at which the system runs a backup job. The interval must follow the ISO 8601 standard. For example, PT1H specifies an interval of one hour. P1D specifies an interval of one day.
    VaultId string
    Vault ID.
    RuleType string
    Rule Type.
    ArchiveDays int
    This parameter is required only when the value of RuleType is **TRANSITION. The minimum value is 30, and the Retention-ArchiveDays needs to be greater than or equal to 60.
    BackupType string
    This parameter is required only when the RuleType value is **BACKUP. Backup Type.
    KeepLatestSnapshots int
    This parameter is required only when RuleType is set to BACKUP.
    ReplicationRegionId string
    Only when the RuleType value is.
    Retention int
    Retention time, in days.
    RetentionRules []PolicyRuleRetentionRule
    This parameter is required only when the value of RuleType is TRANSITION. See retention_rules below.
    RuleId string
    Rule ID.
    Schedule string
    This parameter is required only if you set the RuleType parameter to BACKUP. This parameter specifies the backup schedule settings. Format: I|{startTime}|{interval}. The system runs the first backup job at a point in time that is specified in the {startTime} parameter and the subsequent backup jobs at an interval that is specified in the {interval} parameter. The system does not run a backup job before the specified point in time. Each backup job, except the first one, starts only after the previous backup job is complete. For example, I|1631685600|P1D specifies that the system runs the first backup job at 14:00:00 on September 15, 2021 and the subsequent backup jobs once a day. * startTime: the time at which the system starts to run a backup job. The time must follow the UNIX time format. Unit: seconds. * interval: the interval at which the system runs a backup job. The interval must follow the ISO 8601 standard. For example, PT1H specifies an interval of one hour. P1D specifies an interval of one day.
    VaultId string
    Vault ID.
    ruleType String
    Rule Type.
    archiveDays Integer
    This parameter is required only when the value of RuleType is **TRANSITION. The minimum value is 30, and the Retention-ArchiveDays needs to be greater than or equal to 60.
    backupType String
    This parameter is required only when the RuleType value is **BACKUP. Backup Type.
    keepLatestSnapshots Integer
    This parameter is required only when RuleType is set to BACKUP.
    replicationRegionId String
    Only when the RuleType value is.
    retention Integer
    Retention time, in days.
    retentionRules List<PolicyRuleRetentionRule>
    This parameter is required only when the value of RuleType is TRANSITION. See retention_rules below.
    ruleId String
    Rule ID.
    schedule String
    This parameter is required only if you set the RuleType parameter to BACKUP. This parameter specifies the backup schedule settings. Format: I|{startTime}|{interval}. The system runs the first backup job at a point in time that is specified in the {startTime} parameter and the subsequent backup jobs at an interval that is specified in the {interval} parameter. The system does not run a backup job before the specified point in time. Each backup job, except the first one, starts only after the previous backup job is complete. For example, I|1631685600|P1D specifies that the system runs the first backup job at 14:00:00 on September 15, 2021 and the subsequent backup jobs once a day. * startTime: the time at which the system starts to run a backup job. The time must follow the UNIX time format. Unit: seconds. * interval: the interval at which the system runs a backup job. The interval must follow the ISO 8601 standard. For example, PT1H specifies an interval of one hour. P1D specifies an interval of one day.
    vaultId String
    Vault ID.
    ruleType string
    Rule Type.
    archiveDays number
    This parameter is required only when the value of RuleType is **TRANSITION. The minimum value is 30, and the Retention-ArchiveDays needs to be greater than or equal to 60.
    backupType string
    This parameter is required only when the RuleType value is **BACKUP. Backup Type.
    keepLatestSnapshots number
    This parameter is required only when RuleType is set to BACKUP.
    replicationRegionId string
    Only when the RuleType value is.
    retention number
    Retention time, in days.
    retentionRules PolicyRuleRetentionRule[]
    This parameter is required only when the value of RuleType is TRANSITION. See retention_rules below.
    ruleId string
    Rule ID.
    schedule string
    This parameter is required only if you set the RuleType parameter to BACKUP. This parameter specifies the backup schedule settings. Format: I|{startTime}|{interval}. The system runs the first backup job at a point in time that is specified in the {startTime} parameter and the subsequent backup jobs at an interval that is specified in the {interval} parameter. The system does not run a backup job before the specified point in time. Each backup job, except the first one, starts only after the previous backup job is complete. For example, I|1631685600|P1D specifies that the system runs the first backup job at 14:00:00 on September 15, 2021 and the subsequent backup jobs once a day. * startTime: the time at which the system starts to run a backup job. The time must follow the UNIX time format. Unit: seconds. * interval: the interval at which the system runs a backup job. The interval must follow the ISO 8601 standard. For example, PT1H specifies an interval of one hour. P1D specifies an interval of one day.
    vaultId string
    Vault ID.
    rule_type str
    Rule Type.
    archive_days int
    This parameter is required only when the value of RuleType is **TRANSITION. The minimum value is 30, and the Retention-ArchiveDays needs to be greater than or equal to 60.
    backup_type str
    This parameter is required only when the RuleType value is **BACKUP. Backup Type.
    keep_latest_snapshots int
    This parameter is required only when RuleType is set to BACKUP.
    replication_region_id str
    Only when the RuleType value is.
    retention int
    Retention time, in days.
    retention_rules Sequence[PolicyRuleRetentionRule]
    This parameter is required only when the value of RuleType is TRANSITION. See retention_rules below.
    rule_id str
    Rule ID.
    schedule str
    This parameter is required only if you set the RuleType parameter to BACKUP. This parameter specifies the backup schedule settings. Format: I|{startTime}|{interval}. The system runs the first backup job at a point in time that is specified in the {startTime} parameter and the subsequent backup jobs at an interval that is specified in the {interval} parameter. The system does not run a backup job before the specified point in time. Each backup job, except the first one, starts only after the previous backup job is complete. For example, I|1631685600|P1D specifies that the system runs the first backup job at 14:00:00 on September 15, 2021 and the subsequent backup jobs once a day. * startTime: the time at which the system starts to run a backup job. The time must follow the UNIX time format. Unit: seconds. * interval: the interval at which the system runs a backup job. The interval must follow the ISO 8601 standard. For example, PT1H specifies an interval of one hour. P1D specifies an interval of one day.
    vault_id str
    Vault ID.
    ruleType String
    Rule Type.
    archiveDays Number
    This parameter is required only when the value of RuleType is **TRANSITION. The minimum value is 30, and the Retention-ArchiveDays needs to be greater than or equal to 60.
    backupType String
    This parameter is required only when the RuleType value is **BACKUP. Backup Type.
    keepLatestSnapshots Number
    This parameter is required only when RuleType is set to BACKUP.
    replicationRegionId String
    Only when the RuleType value is.
    retention Number
    Retention time, in days.
    retentionRules List<Property Map>
    This parameter is required only when the value of RuleType is TRANSITION. See retention_rules below.
    ruleId String
    Rule ID.
    schedule String
    This parameter is required only if you set the RuleType parameter to BACKUP. This parameter specifies the backup schedule settings. Format: I|{startTime}|{interval}. The system runs the first backup job at a point in time that is specified in the {startTime} parameter and the subsequent backup jobs at an interval that is specified in the {interval} parameter. The system does not run a backup job before the specified point in time. Each backup job, except the first one, starts only after the previous backup job is complete. For example, I|1631685600|P1D specifies that the system runs the first backup job at 14:00:00 on September 15, 2021 and the subsequent backup jobs once a day. * startTime: the time at which the system starts to run a backup job. The time must follow the UNIX time format. Unit: seconds. * interval: the interval at which the system runs a backup job. The interval must follow the ISO 8601 standard. For example, PT1H specifies an interval of one hour. P1D specifies an interval of one day.
    vaultId String
    Vault ID.

    PolicyRuleRetentionRule, PolicyRuleRetentionRuleArgs

    Import

    HBR Policy can be imported using the id, e.g.

    $ pulumi import alicloud:hbr/policy:Policy example <id>
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi