1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. hbr
  5. Policy
Alibaba Cloud v3.95.0 published on Thursday, Feb 12, 2026 by Pulumi
alicloud logo
Alibaba Cloud v3.95.0 published on Thursday, Feb 12, 2026 by Pulumi

    Provides a Hybrid Backup Recovery (HBR) Policy resource.

    For information about Hybrid Backup Recovery (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=[{
            "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
    		}
    		_default, 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.Sprintf("example-value-%v", _default.Result),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = hbr.NewPolicy(ctx, "defaultoqWvHQ", &hbr.PolicyArgs{
    			PolicyName: pulumi.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
    

    📚 Need more examples? VIEW MORE EXAMPLES

    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,
               policy_type: 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 alicloudPolicyResource = new AliCloud.Hbr.Policy("alicloudPolicyResource", new()
    {
        PolicyDescription = "string",
        PolicyName = "string",
        PolicyType = "string",
        Rules = new[]
        {
            new AliCloud.Hbr.Inputs.PolicyRuleArgs
            {
                RuleType = "string",
                ArchiveDays = 0,
                BackupType = "string",
                DataSourceFilters = new[]
                {
                    new AliCloud.Hbr.Inputs.PolicyRuleDataSourceFilterArgs
                    {
                        SourceType = "string",
                    },
                },
                KeepLatestSnapshots = 0,
                ReplicationRegionId = "string",
                Retention = 0,
                RetentionRules = new[]
                {
                    new AliCloud.Hbr.Inputs.PolicyRuleRetentionRuleArgs
                    {
                        AdvancedRetentionType = "string",
                        Retention = 0,
                    },
                },
                RuleId = "string",
                Schedule = "string",
                TagFilters = new[]
                {
                    new AliCloud.Hbr.Inputs.PolicyRuleTagFilterArgs
                    {
                        Key = "string",
                        Operator = "string",
                        Value = "string",
                    },
                },
                VaultId = "string",
            },
        },
    });
    
    example, err := hbr.NewPolicy(ctx, "alicloudPolicyResource", &hbr.PolicyArgs{
    	PolicyDescription: pulumi.String("string"),
    	PolicyName:        pulumi.String("string"),
    	PolicyType:        pulumi.String("string"),
    	Rules: hbr.PolicyRuleArray{
    		&hbr.PolicyRuleArgs{
    			RuleType:    pulumi.String("string"),
    			ArchiveDays: pulumi.Int(0),
    			BackupType:  pulumi.String("string"),
    			DataSourceFilters: hbr.PolicyRuleDataSourceFilterArray{
    				&hbr.PolicyRuleDataSourceFilterArgs{
    					SourceType: 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"),
    			TagFilters: hbr.PolicyRuleTagFilterArray{
    				&hbr.PolicyRuleTagFilterArgs{
    					Key:      pulumi.String("string"),
    					Operator: pulumi.String("string"),
    					Value:    pulumi.String("string"),
    				},
    			},
    			VaultId: pulumi.String("string"),
    		},
    	},
    })
    
    var alicloudPolicyResource = new com.pulumi.alicloud.hbr.Policy("alicloudPolicyResource", com.pulumi.alicloud.hbr.PolicyArgs.builder()
        .policyDescription("string")
        .policyName("string")
        .policyType("string")
        .rules(PolicyRuleArgs.builder()
            .ruleType("string")
            .archiveDays(0)
            .backupType("string")
            .dataSourceFilters(PolicyRuleDataSourceFilterArgs.builder()
                .sourceType("string")
                .build())
            .keepLatestSnapshots(0)
            .replicationRegionId("string")
            .retention(0)
            .retentionRules(PolicyRuleRetentionRuleArgs.builder()
                .advancedRetentionType("string")
                .retention(0)
                .build())
            .ruleId("string")
            .schedule("string")
            .tagFilters(PolicyRuleTagFilterArgs.builder()
                .key("string")
                .operator("string")
                .value("string")
                .build())
            .vaultId("string")
            .build())
        .build());
    
    alicloud_policy_resource = alicloud.hbr.Policy("alicloudPolicyResource",
        policy_description="string",
        policy_name="string",
        policy_type="string",
        rules=[{
            "rule_type": "string",
            "archive_days": 0,
            "backup_type": "string",
            "data_source_filters": [{
                "source_type": "string",
            }],
            "keep_latest_snapshots": 0,
            "replication_region_id": "string",
            "retention": 0,
            "retention_rules": [{
                "advanced_retention_type": "string",
                "retention": 0,
            }],
            "rule_id": "string",
            "schedule": "string",
            "tag_filters": [{
                "key": "string",
                "operator": "string",
                "value": "string",
            }],
            "vault_id": "string",
        }])
    
    const alicloudPolicyResource = new alicloud.hbr.Policy("alicloudPolicyResource", {
        policyDescription: "string",
        policyName: "string",
        policyType: "string",
        rules: [{
            ruleType: "string",
            archiveDays: 0,
            backupType: "string",
            dataSourceFilters: [{
                sourceType: "string",
            }],
            keepLatestSnapshots: 0,
            replicationRegionId: "string",
            retention: 0,
            retentionRules: [{
                advancedRetentionType: "string",
                retention: 0,
            }],
            ruleId: "string",
            schedule: "string",
            tagFilters: [{
                key: "string",
                operator: "string",
                value: "string",
            }],
            vaultId: "string",
        }],
    });
    
    type: alicloud:hbr:Policy
    properties:
        policyDescription: string
        policyName: string
        policyType: string
        rules:
            - archiveDays: 0
              backupType: string
              dataSourceFilters:
                - sourceType: string
              keepLatestSnapshots: 0
              replicationRegionId: string
              retention: 0
              retentionRules:
                - advancedRetentionType: string
                  retention: 0
              ruleId: string
              ruleType: string
              schedule: string
              tagFilters:
                - key: string
                  operator: string
                  value: 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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Policy resource accepts the following input properties:

    PolicyDescription string
    The policy description.
    PolicyName string
    Policy Name
    PolicyType string
    The policy type. The UDM_ECS_ONLY and STANDARD types are supported. The policy with PolicyType = UDM_ECS_ONLY can only be used for ECS instances. The policy with PolicyType = STANDARD can only be used for data sources other than ECS instances.
    Rules List<Pulumi.AliCloud.Hbr.Inputs.PolicyRule>
    A list of policy rules See rules below.
    PolicyDescription string
    The policy description.
    PolicyName string
    Policy Name
    PolicyType string
    The policy type. The UDM_ECS_ONLY and STANDARD types are supported. The policy with PolicyType = UDM_ECS_ONLY can only be used for ECS instances. The policy with PolicyType = STANDARD can only be used for data sources other than ECS instances.
    Rules []PolicyRuleArgs
    A list of policy rules See rules below.
    policyDescription String
    The policy description.
    policyName String
    Policy Name
    policyType String
    The policy type. The UDM_ECS_ONLY and STANDARD types are supported. The policy with PolicyType = UDM_ECS_ONLY can only be used for ECS instances. The policy with PolicyType = STANDARD can only be used for data sources other than ECS instances.
    rules List<PolicyRule>
    A list of policy rules See rules below.
    policyDescription string
    The policy description.
    policyName string
    Policy Name
    policyType string
    The policy type. The UDM_ECS_ONLY and STANDARD types are supported. The policy with PolicyType = UDM_ECS_ONLY can only be used for ECS instances. The policy with PolicyType = STANDARD can only be used for data sources other than ECS instances.
    rules PolicyRule[]
    A list of policy rules See rules below.
    policy_description str
    The policy description.
    policy_name str
    Policy Name
    policy_type str
    The policy type. The UDM_ECS_ONLY and STANDARD types are supported. The policy with PolicyType = UDM_ECS_ONLY can only be used for ECS instances. The policy with PolicyType = STANDARD can only be used for data sources other than ECS instances.
    rules Sequence[PolicyRuleArgs]
    A list of policy rules See rules below.
    policyDescription String
    The policy description.
    policyName String
    Policy Name
    policyType String
    The policy type. The UDM_ECS_ONLY and STANDARD types are supported. The policy with PolicyType = UDM_ECS_ONLY can only be used for ECS instances. The policy with PolicyType = STANDARD can only be used for data sources other than ECS instances.
    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,
            policy_type: 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)
    resources:  _:    type: alicloud:hbr:Policy    get:      id: ${id}
    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
    PolicyType string
    The policy type. The UDM_ECS_ONLY and STANDARD types are supported. The policy with PolicyType = UDM_ECS_ONLY can only be used for ECS instances. The policy with PolicyType = STANDARD can only be used for data sources other than ECS instances.
    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
    PolicyType string
    The policy type. The UDM_ECS_ONLY and STANDARD types are supported. The policy with PolicyType = UDM_ECS_ONLY can only be used for ECS instances. The policy with PolicyType = STANDARD can only be used for data sources other than ECS instances.
    Rules []PolicyRuleArgs
    A list of policy rules See rules below.
    createTime String
    Policy creation time
    policyDescription String
    The policy description.
    policyName String
    Policy Name
    policyType String
    The policy type. The UDM_ECS_ONLY and STANDARD types are supported. The policy with PolicyType = UDM_ECS_ONLY can only be used for ECS instances. The policy with PolicyType = STANDARD can only be used for data sources other than ECS instances.
    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
    policyType string
    The policy type. The UDM_ECS_ONLY and STANDARD types are supported. The policy with PolicyType = UDM_ECS_ONLY can only be used for ECS instances. The policy with PolicyType = STANDARD can only be used for data sources other than ECS instances.
    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
    policy_type str
    The policy type. The UDM_ECS_ONLY and STANDARD types are supported. The policy with PolicyType = UDM_ECS_ONLY can only be used for ECS instances. The policy with PolicyType = STANDARD can only be used for data sources other than ECS instances.
    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
    policyType String
    The policy type. The UDM_ECS_ONLY and STANDARD types are supported. The policy with PolicyType = UDM_ECS_ONLY can only be used for ECS instances. The policy with PolicyType = STANDARD can only be used for data sources other than ECS instances.
    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
    DataSourceFilters List<Pulumi.AliCloud.Hbr.Inputs.PolicyRuleDataSourceFilter>
    This parameter is required only when the value of RuleType is TAG. See data_source_filters below.
    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.
    TagFilters List<Pulumi.AliCloud.Hbr.Inputs.PolicyRuleTagFilter>
    This parameter is required only when the value of RuleType is TAG. Resource label filtering rules. See tag_filters below.
    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
    DataSourceFilters []PolicyRuleDataSourceFilter
    This parameter is required only when the value of RuleType is TAG. See data_source_filters below.
    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.
    TagFilters []PolicyRuleTagFilter
    This parameter is required only when the value of RuleType is TAG. Resource label filtering rules. See tag_filters below.
    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
    dataSourceFilters List<PolicyRuleDataSourceFilter>
    This parameter is required only when the value of RuleType is TAG. See data_source_filters below.
    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.
    tagFilters List<PolicyRuleTagFilter>
    This parameter is required only when the value of RuleType is TAG. Resource label filtering rules. See tag_filters below.
    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
    dataSourceFilters PolicyRuleDataSourceFilter[]
    This parameter is required only when the value of RuleType is TAG. See data_source_filters below.
    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.
    tagFilters PolicyRuleTagFilter[]
    This parameter is required only when the value of RuleType is TAG. Resource label filtering rules. See tag_filters below.
    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
    data_source_filters Sequence[PolicyRuleDataSourceFilter]
    This parameter is required only when the value of RuleType is TAG. See data_source_filters below.
    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.
    tag_filters Sequence[PolicyRuleTagFilter]
    This parameter is required only when the value of RuleType is TAG. Resource label filtering rules. See tag_filters below.
    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
    dataSourceFilters List<Property Map>
    This parameter is required only when the value of RuleType is TAG. See data_source_filters below.
    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.
    tagFilters List<Property Map>
    This parameter is required only when the value of RuleType is TAG. Resource label filtering rules. See tag_filters below.
    vaultId String
    Vault ID

    PolicyRuleDataSourceFilter, PolicyRuleDataSourceFilterArgs

    SourceType string
    The data source type. Value range: UDM_ECS: indicates that the ECS machine is backed up. This data source type is supported only when PolicyType is set to UDM_ECS_ONLY. OSS: indicates an OSS backup. This data source type is supported only when the PolicyType value is STANDARD. NAS: indicates an Alibaba Cloud NAS backup. This data source type is supported only when the PolicyType value is STANDARD. ECS_FILE: indicates an ECS file backup. This data source type is supported only when the PolicyType value is STANDARD. OTS: indicates the Tablestore backup. This data source type is supported only when the PolicyType value is STANDARD.
    SourceType string
    The data source type. Value range: UDM_ECS: indicates that the ECS machine is backed up. This data source type is supported only when PolicyType is set to UDM_ECS_ONLY. OSS: indicates an OSS backup. This data source type is supported only when the PolicyType value is STANDARD. NAS: indicates an Alibaba Cloud NAS backup. This data source type is supported only when the PolicyType value is STANDARD. ECS_FILE: indicates an ECS file backup. This data source type is supported only when the PolicyType value is STANDARD. OTS: indicates the Tablestore backup. This data source type is supported only when the PolicyType value is STANDARD.
    sourceType String
    The data source type. Value range: UDM_ECS: indicates that the ECS machine is backed up. This data source type is supported only when PolicyType is set to UDM_ECS_ONLY. OSS: indicates an OSS backup. This data source type is supported only when the PolicyType value is STANDARD. NAS: indicates an Alibaba Cloud NAS backup. This data source type is supported only when the PolicyType value is STANDARD. ECS_FILE: indicates an ECS file backup. This data source type is supported only when the PolicyType value is STANDARD. OTS: indicates the Tablestore backup. This data source type is supported only when the PolicyType value is STANDARD.
    sourceType string
    The data source type. Value range: UDM_ECS: indicates that the ECS machine is backed up. This data source type is supported only when PolicyType is set to UDM_ECS_ONLY. OSS: indicates an OSS backup. This data source type is supported only when the PolicyType value is STANDARD. NAS: indicates an Alibaba Cloud NAS backup. This data source type is supported only when the PolicyType value is STANDARD. ECS_FILE: indicates an ECS file backup. This data source type is supported only when the PolicyType value is STANDARD. OTS: indicates the Tablestore backup. This data source type is supported only when the PolicyType value is STANDARD.
    source_type str
    The data source type. Value range: UDM_ECS: indicates that the ECS machine is backed up. This data source type is supported only when PolicyType is set to UDM_ECS_ONLY. OSS: indicates an OSS backup. This data source type is supported only when the PolicyType value is STANDARD. NAS: indicates an Alibaba Cloud NAS backup. This data source type is supported only when the PolicyType value is STANDARD. ECS_FILE: indicates an ECS file backup. This data source type is supported only when the PolicyType value is STANDARD. OTS: indicates the Tablestore backup. This data source type is supported only when the PolicyType value is STANDARD.
    sourceType String
    The data source type. Value range: UDM_ECS: indicates that the ECS machine is backed up. This data source type is supported only when PolicyType is set to UDM_ECS_ONLY. OSS: indicates an OSS backup. This data source type is supported only when the PolicyType value is STANDARD. NAS: indicates an Alibaba Cloud NAS backup. This data source type is supported only when the PolicyType value is STANDARD. ECS_FILE: indicates an ECS file backup. This data source type is supported only when the PolicyType value is STANDARD. OTS: indicates the Tablestore backup. This data source type is supported only when the PolicyType value is STANDARD.

    PolicyRuleRetentionRule, PolicyRuleRetentionRuleArgs

    AdvancedRetentionType string
    Valid values: annually, MONTHLY, and WEEKLY:- annually: the first backup of each year. - MONTHLY: The first backup of the month. - WEEKLY: The first backup of the week. - DAILY: The first backup of the day.
    Retention int
    Retention time, in days
    AdvancedRetentionType string
    Valid values: annually, MONTHLY, and WEEKLY:- annually: the first backup of each year. - MONTHLY: The first backup of the month. - WEEKLY: The first backup of the week. - DAILY: The first backup of the day.
    Retention int
    Retention time, in days
    advancedRetentionType String
    Valid values: annually, MONTHLY, and WEEKLY:- annually: the first backup of each year. - MONTHLY: The first backup of the month. - WEEKLY: The first backup of the week. - DAILY: The first backup of the day.
    retention Integer
    Retention time, in days
    advancedRetentionType string
    Valid values: annually, MONTHLY, and WEEKLY:- annually: the first backup of each year. - MONTHLY: The first backup of the month. - WEEKLY: The first backup of the week. - DAILY: The first backup of the day.
    retention number
    Retention time, in days
    advanced_retention_type str
    Valid values: annually, MONTHLY, and WEEKLY:- annually: the first backup of each year. - MONTHLY: The first backup of the month. - WEEKLY: The first backup of the week. - DAILY: The first backup of the day.
    retention int
    Retention time, in days
    advancedRetentionType String
    Valid values: annually, MONTHLY, and WEEKLY:- annually: the first backup of each year. - MONTHLY: The first backup of the month. - WEEKLY: The first backup of the week. - DAILY: The first backup of the day.
    retention Number
    Retention time, in days

    PolicyRuleTagFilter, PolicyRuleTagFilterArgs

    Key string
    The tag key.
    Operator string
    Tag matching rules, support EQUAL: Match tag key and tag value. NOT: matches the tag key, but does NOT match the tag value.
    Value string
    The label value, which is empty and represents any value.
    Key string
    The tag key.
    Operator string
    Tag matching rules, support EQUAL: Match tag key and tag value. NOT: matches the tag key, but does NOT match the tag value.
    Value string
    The label value, which is empty and represents any value.
    key String
    The tag key.
    operator String
    Tag matching rules, support EQUAL: Match tag key and tag value. NOT: matches the tag key, but does NOT match the tag value.
    value String
    The label value, which is empty and represents any value.
    key string
    The tag key.
    operator string
    Tag matching rules, support EQUAL: Match tag key and tag value. NOT: matches the tag key, but does NOT match the tag value.
    value string
    The label value, which is empty and represents any value.
    key str
    The tag key.
    operator str
    Tag matching rules, support EQUAL: Match tag key and tag value. NOT: matches the tag key, but does NOT match the tag value.
    value str
    The label value, which is empty and represents any value.
    key String
    The tag key.
    operator String
    Tag matching rules, support EQUAL: Match tag key and tag value. NOT: matches the tag key, but does NOT match the tag value.
    value String
    The label value, which is empty and represents any value.

    Import

    Hybrid Backup Recovery (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.95.0 published on Thursday, Feb 12, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate