alicloud.hbr.PolicyBinding
Explore with Pulumi AI
Provides a HBR Policy Binding resource. A policy binding relationship consists of a data source, a policy, and binding options.
For information about HBR Policy Binding and how to use it, see What is Policy Binding.
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",
});
const defaultKtt2XY = new alicloud.oss.Bucket("defaultKtt2XY", {
    storageClass: "Standard",
    bucket: `example-value-${_default.result}`,
});
const defaultPolicyBinding = new alicloud.hbr.PolicyBinding("default", {
    sourceType: "OSS",
    disabled: false,
    policyId: defaultoqWvHQ.id,
    dataSourceId: defaultKtt2XY.bucket,
    policyBindingDescription: "policy binding example (update)",
    source: "prefix-example-update/",
});
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")
default_ktt2_xy = alicloud.oss.Bucket("defaultKtt2XY",
    storage_class="Standard",
    bucket=f"example-value-{default['result']}")
default_policy_binding = alicloud.hbr.PolicyBinding("default",
    source_type="OSS",
    disabled=False,
    policy_id=defaultoq_wv_hq.id,
    data_source_id=default_ktt2_xy.bucket,
    policy_binding_description="policy binding example (update)",
    source="prefix-example-update/")
package main
import (
	"fmt"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/hbr"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oss"
	"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
		}
		defaultoqWvHQ, 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
		}
		defaultKtt2XY, err := oss.NewBucket(ctx, "defaultKtt2XY", &oss.BucketArgs{
			StorageClass: pulumi.String("Standard"),
			Bucket:       pulumi.String(fmt.Sprintf("example-value-%v", _default.Result)),
		})
		if err != nil {
			return err
		}
		_, err = hbr.NewPolicyBinding(ctx, "default", &hbr.PolicyBindingArgs{
			SourceType:               pulumi.String("OSS"),
			Disabled:                 pulumi.Bool(false),
			PolicyId:                 defaultoqWvHQ.ID(),
			DataSourceId:             defaultKtt2XY.Bucket,
			PolicyBindingDescription: pulumi.String("policy binding example (update)"),
			Source:                   pulumi.String("prefix-example-update/"),
		})
		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",
    });
    var defaultKtt2XY = new AliCloud.Oss.Bucket("defaultKtt2XY", new()
    {
        StorageClass = "Standard",
        BucketName = $"example-value-{@default.Result}",
    });
    var defaultPolicyBinding = new AliCloud.Hbr.PolicyBinding("default", new()
    {
        SourceType = "OSS",
        Disabled = false,
        PolicyId = defaultoqWvHQ.Id,
        DataSourceId = defaultKtt2XY.BucketName,
        PolicyBindingDescription = "policy binding example (update)",
        Source = "prefix-example-update/",
    });
});
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 com.pulumi.alicloud.oss.Bucket;
import com.pulumi.alicloud.oss.BucketArgs;
import com.pulumi.alicloud.hbr.PolicyBinding;
import com.pulumi.alicloud.hbr.PolicyBindingArgs;
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());
        var defaultKtt2XY = new Bucket("defaultKtt2XY", BucketArgs.builder()
            .storageClass("Standard")
            .bucket(String.format("example-value-%s", default_.result()))
            .build());
        var defaultPolicyBinding = new PolicyBinding("defaultPolicyBinding", PolicyBindingArgs.builder()
            .sourceType("OSS")
            .disabled("false")
            .policyId(defaultoqWvHQ.id())
            .dataSourceId(defaultKtt2XY.bucket())
            .policyBindingDescription("policy binding example (update)")
            .source("prefix-example-update/")
            .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
  defaultKtt2XY:
    type: alicloud:oss:Bucket
    properties:
      storageClass: Standard
      bucket: example-value-${default.result}
  defaultPolicyBinding:
    type: alicloud:hbr:PolicyBinding
    name: default
    properties:
      sourceType: OSS
      disabled: 'false'
      policyId: ${defaultoqWvHQ.id}
      dataSourceId: ${defaultKtt2XY.bucket}
      policyBindingDescription: policy binding example (update)
      source: prefix-example-update/
Create PolicyBinding Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PolicyBinding(name: string, args?: PolicyBindingArgs, opts?: CustomResourceOptions);@overload
def PolicyBinding(resource_name: str,
                  args: Optional[PolicyBindingArgs] = None,
                  opts: Optional[ResourceOptions] = None)
@overload
def PolicyBinding(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  advanced_options: Optional[PolicyBindingAdvancedOptionsArgs] = None,
                  data_source_id: Optional[str] = None,
                  disabled: Optional[bool] = None,
                  exclude: Optional[str] = None,
                  include: Optional[str] = None,
                  policy_binding_description: Optional[str] = None,
                  policy_id: Optional[str] = None,
                  source: Optional[str] = None,
                  source_type: Optional[str] = None,
                  speed_limit: Optional[str] = None)func NewPolicyBinding(ctx *Context, name string, args *PolicyBindingArgs, opts ...ResourceOption) (*PolicyBinding, error)public PolicyBinding(string name, PolicyBindingArgs? args = null, CustomResourceOptions? opts = null)
public PolicyBinding(String name, PolicyBindingArgs args)
public PolicyBinding(String name, PolicyBindingArgs args, CustomResourceOptions options)
type: alicloud:hbr:PolicyBinding
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 PolicyBindingArgs
 - 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 PolicyBindingArgs
 - 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 PolicyBindingArgs
 - The arguments to resource properties.
 - opts ResourceOption
 - Bag of options to control resource's behavior.
 
- name string
 - The unique name of the resource.
 - args PolicyBindingArgs
 - The arguments to resource properties.
 - opts CustomResourceOptions
 - Bag of options to control resource's behavior.
 
- name String
 - The unique name of the resource.
 - args PolicyBindingArgs
 - 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 policyBindingResource = new AliCloud.Hbr.PolicyBinding("policyBindingResource", new()
{
    AdvancedOptions = new AliCloud.Hbr.Inputs.PolicyBindingAdvancedOptionsArgs
    {
        UdmDetail = new AliCloud.Hbr.Inputs.PolicyBindingAdvancedOptionsUdmDetailArgs
        {
            DestinationKmsKeyId = "string",
            DiskIdLists = new[]
            {
                "string",
            },
            ExcludeDiskIdLists = new[]
            {
                "string",
            },
        },
    },
    DataSourceId = "string",
    Disabled = false,
    Exclude = "string",
    Include = "string",
    PolicyBindingDescription = "string",
    PolicyId = "string",
    Source = "string",
    SourceType = "string",
    SpeedLimit = "string",
});
example, err := hbr.NewPolicyBinding(ctx, "policyBindingResource", &hbr.PolicyBindingArgs{
	AdvancedOptions: &hbr.PolicyBindingAdvancedOptionsArgs{
		UdmDetail: &hbr.PolicyBindingAdvancedOptionsUdmDetailArgs{
			DestinationKmsKeyId: pulumi.String("string"),
			DiskIdLists: pulumi.StringArray{
				pulumi.String("string"),
			},
			ExcludeDiskIdLists: pulumi.StringArray{
				pulumi.String("string"),
			},
		},
	},
	DataSourceId:             pulumi.String("string"),
	Disabled:                 pulumi.Bool(false),
	Exclude:                  pulumi.String("string"),
	Include:                  pulumi.String("string"),
	PolicyBindingDescription: pulumi.String("string"),
	PolicyId:                 pulumi.String("string"),
	Source:                   pulumi.String("string"),
	SourceType:               pulumi.String("string"),
	SpeedLimit:               pulumi.String("string"),
})
var policyBindingResource = new PolicyBinding("policyBindingResource", PolicyBindingArgs.builder()
    .advancedOptions(PolicyBindingAdvancedOptionsArgs.builder()
        .udmDetail(PolicyBindingAdvancedOptionsUdmDetailArgs.builder()
            .destinationKmsKeyId("string")
            .diskIdLists("string")
            .excludeDiskIdLists("string")
            .build())
        .build())
    .dataSourceId("string")
    .disabled(false)
    .exclude("string")
    .include("string")
    .policyBindingDescription("string")
    .policyId("string")
    .source("string")
    .sourceType("string")
    .speedLimit("string")
    .build());
policy_binding_resource = alicloud.hbr.PolicyBinding("policyBindingResource",
    advanced_options=alicloud.hbr.PolicyBindingAdvancedOptionsArgs(
        udm_detail=alicloud.hbr.PolicyBindingAdvancedOptionsUdmDetailArgs(
            destination_kms_key_id="string",
            disk_id_lists=["string"],
            exclude_disk_id_lists=["string"],
        ),
    ),
    data_source_id="string",
    disabled=False,
    exclude="string",
    include="string",
    policy_binding_description="string",
    policy_id="string",
    source="string",
    source_type="string",
    speed_limit="string")
const policyBindingResource = new alicloud.hbr.PolicyBinding("policyBindingResource", {
    advancedOptions: {
        udmDetail: {
            destinationKmsKeyId: "string",
            diskIdLists: ["string"],
            excludeDiskIdLists: ["string"],
        },
    },
    dataSourceId: "string",
    disabled: false,
    exclude: "string",
    include: "string",
    policyBindingDescription: "string",
    policyId: "string",
    source: "string",
    sourceType: "string",
    speedLimit: "string",
});
type: alicloud:hbr:PolicyBinding
properties:
    advancedOptions:
        udmDetail:
            destinationKmsKeyId: string
            diskIdLists:
                - string
            excludeDiskIdLists:
                - string
    dataSourceId: string
    disabled: false
    exclude: string
    include: string
    policyBindingDescription: string
    policyId: string
    source: string
    sourceType: string
    speedLimit: string
PolicyBinding 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 PolicyBinding resource accepts the following input properties:
- Advanced
Options Pulumi.Ali Cloud. Hbr. Inputs. Policy Binding Advanced Options  - Backup Advanced Options. See 
advanced_optionsbelow. - Data
Source stringId  - The data source ID.
 - Disabled bool
 - Whether the policy is effective for the data source.
- true: Pause
 - false: not paused.
 
 - Exclude string
 - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates a file type that does not need to be backed up. All files of this type are not backed up. A maximum of 255 characters is supported.
 - Include string
 - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates the file types to be backed up, and all files of these types are backed up. A maximum of 255 characters is supported.
 - Policy
Binding stringDescription  - Resource Description.
 - Policy
Id string - The policy ID.
 - Source string
 - When SourceType is OSS, a prefix is specified to be backed up. If it is not specified, the entire root directory of the Bucket is backed up.
 - Source
Type string - Data source type, value range:
- UDM_ECS: indicates the ECS instance backup.
 - OSS: indicates an OSS backup.
 - NAS: indicates an Alibaba Cloud NAS Backup. When you bind a file system to a policy, Cloud Backup automatically creates a mount point for the file system. If you no longer need the mount point, delete it manually.
 - ECS_FILE: indicates that the ECS file is backed up.
 - File: indicates a local File backup.
 
 - Speed
Limit string - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates backup flow control. The format is {start}{end}{bandwidth}. Multiple flow control configurations use partitioning, and no overlap in configuration time is allowed. start: start hour. end: end of hour. bandwidth: limit rate, in KB/s.
 
- Advanced
Options PolicyBinding Advanced Options Args  - Backup Advanced Options. See 
advanced_optionsbelow. - Data
Source stringId  - The data source ID.
 - Disabled bool
 - Whether the policy is effective for the data source.
- true: Pause
 - false: not paused.
 
 - Exclude string
 - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates a file type that does not need to be backed up. All files of this type are not backed up. A maximum of 255 characters is supported.
 - Include string
 - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates the file types to be backed up, and all files of these types are backed up. A maximum of 255 characters is supported.
 - Policy
Binding stringDescription  - Resource Description.
 - Policy
Id string - The policy ID.
 - Source string
 - When SourceType is OSS, a prefix is specified to be backed up. If it is not specified, the entire root directory of the Bucket is backed up.
 - Source
Type string - Data source type, value range:
- UDM_ECS: indicates the ECS instance backup.
 - OSS: indicates an OSS backup.
 - NAS: indicates an Alibaba Cloud NAS Backup. When you bind a file system to a policy, Cloud Backup automatically creates a mount point for the file system. If you no longer need the mount point, delete it manually.
 - ECS_FILE: indicates that the ECS file is backed up.
 - File: indicates a local File backup.
 
 - Speed
Limit string - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates backup flow control. The format is {start}{end}{bandwidth}. Multiple flow control configurations use partitioning, and no overlap in configuration time is allowed. start: start hour. end: end of hour. bandwidth: limit rate, in KB/s.
 
- advanced
Options PolicyBinding Advanced Options  - Backup Advanced Options. See 
advanced_optionsbelow. - data
Source StringId  - The data source ID.
 - disabled Boolean
 - Whether the policy is effective for the data source.
- true: Pause
 - false: not paused.
 
 - exclude String
 - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates a file type that does not need to be backed up. All files of this type are not backed up. A maximum of 255 characters is supported.
 - include String
 - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates the file types to be backed up, and all files of these types are backed up. A maximum of 255 characters is supported.
 - policy
Binding StringDescription  - Resource Description.
 - policy
Id String - The policy ID.
 - source String
 - When SourceType is OSS, a prefix is specified to be backed up. If it is not specified, the entire root directory of the Bucket is backed up.
 - source
Type String - Data source type, value range:
- UDM_ECS: indicates the ECS instance backup.
 - OSS: indicates an OSS backup.
 - NAS: indicates an Alibaba Cloud NAS Backup. When you bind a file system to a policy, Cloud Backup automatically creates a mount point for the file system. If you no longer need the mount point, delete it manually.
 - ECS_FILE: indicates that the ECS file is backed up.
 - File: indicates a local File backup.
 
 - speed
Limit String - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates backup flow control. The format is {start}{end}{bandwidth}. Multiple flow control configurations use partitioning, and no overlap in configuration time is allowed. start: start hour. end: end of hour. bandwidth: limit rate, in KB/s.
 
- advanced
Options PolicyBinding Advanced Options  - Backup Advanced Options. See 
advanced_optionsbelow. - data
Source stringId  - The data source ID.
 - disabled boolean
 - Whether the policy is effective for the data source.
- true: Pause
 - false: not paused.
 
 - exclude string
 - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates a file type that does not need to be backed up. All files of this type are not backed up. A maximum of 255 characters is supported.
 - include string
 - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates the file types to be backed up, and all files of these types are backed up. A maximum of 255 characters is supported.
 - policy
Binding stringDescription  - Resource Description.
 - policy
Id string - The policy ID.
 - source string
 - When SourceType is OSS, a prefix is specified to be backed up. If it is not specified, the entire root directory of the Bucket is backed up.
 - source
Type string - Data source type, value range:
- UDM_ECS: indicates the ECS instance backup.
 - OSS: indicates an OSS backup.
 - NAS: indicates an Alibaba Cloud NAS Backup. When you bind a file system to a policy, Cloud Backup automatically creates a mount point for the file system. If you no longer need the mount point, delete it manually.
 - ECS_FILE: indicates that the ECS file is backed up.
 - File: indicates a local File backup.
 
 - speed
Limit string - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates backup flow control. The format is {start}{end}{bandwidth}. Multiple flow control configurations use partitioning, and no overlap in configuration time is allowed. start: start hour. end: end of hour. bandwidth: limit rate, in KB/s.
 
- advanced_
options PolicyBinding Advanced Options Args  - Backup Advanced Options. See 
advanced_optionsbelow. - data_
source_ strid  - The data source ID.
 - disabled bool
 - Whether the policy is effective for the data source.
- true: Pause
 - false: not paused.
 
 - exclude str
 - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates a file type that does not need to be backed up. All files of this type are not backed up. A maximum of 255 characters is supported.
 - include str
 - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates the file types to be backed up, and all files of these types are backed up. A maximum of 255 characters is supported.
 - policy_
binding_ strdescription  - Resource Description.
 - policy_
id str - The policy ID.
 - source str
 - When SourceType is OSS, a prefix is specified to be backed up. If it is not specified, the entire root directory of the Bucket is backed up.
 - source_
type str - Data source type, value range:
- UDM_ECS: indicates the ECS instance backup.
 - OSS: indicates an OSS backup.
 - NAS: indicates an Alibaba Cloud NAS Backup. When you bind a file system to a policy, Cloud Backup automatically creates a mount point for the file system. If you no longer need the mount point, delete it manually.
 - ECS_FILE: indicates that the ECS file is backed up.
 - File: indicates a local File backup.
 
 - speed_
limit str - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates backup flow control. The format is {start}{end}{bandwidth}. Multiple flow control configurations use partitioning, and no overlap in configuration time is allowed. start: start hour. end: end of hour. bandwidth: limit rate, in KB/s.
 
- advanced
Options Property Map - Backup Advanced Options. See 
advanced_optionsbelow. - data
Source StringId  - The data source ID.
 - disabled Boolean
 - Whether the policy is effective for the data source.
- true: Pause
 - false: not paused.
 
 - exclude String
 - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates a file type that does not need to be backed up. All files of this type are not backed up. A maximum of 255 characters is supported.
 - include String
 - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates the file types to be backed up, and all files of these types are backed up. A maximum of 255 characters is supported.
 - policy
Binding StringDescription  - Resource Description.
 - policy
Id String - The policy ID.
 - source String
 - When SourceType is OSS, a prefix is specified to be backed up. If it is not specified, the entire root directory of the Bucket is backed up.
 - source
Type String - Data source type, value range:
- UDM_ECS: indicates the ECS instance backup.
 - OSS: indicates an OSS backup.
 - NAS: indicates an Alibaba Cloud NAS Backup. When you bind a file system to a policy, Cloud Backup automatically creates a mount point for the file system. If you no longer need the mount point, delete it manually.
 - ECS_FILE: indicates that the ECS file is backed up.
 - File: indicates a local File backup.
 
 - speed
Limit String - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates backup flow control. The format is {start}{end}{bandwidth}. Multiple flow control configurations use partitioning, and no overlap in configuration time is allowed. start: start hour. end: end of hour. bandwidth: limit rate, in KB/s.
 
Outputs
All input properties are implicitly available as output properties. Additionally, the PolicyBinding resource produces the following output properties:
- Create
Time string - The creation time of the resource.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 
- Create
Time string - The creation time of the resource.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 
- create
Time String - The creation time of the resource.
 - id String
 - The provider-assigned unique ID for this managed resource.
 
- create
Time string - The creation time of the resource.
 - id string
 - The provider-assigned unique ID for this managed resource.
 
- create_
time str - The creation time of the resource.
 - id str
 - The provider-assigned unique ID for this managed resource.
 
- create
Time String - The creation time of the resource.
 - id String
 - The provider-assigned unique ID for this managed resource.
 
Look up Existing PolicyBinding Resource
Get an existing PolicyBinding 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?: PolicyBindingState, opts?: CustomResourceOptions): PolicyBinding@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        advanced_options: Optional[PolicyBindingAdvancedOptionsArgs] = None,
        create_time: Optional[str] = None,
        data_source_id: Optional[str] = None,
        disabled: Optional[bool] = None,
        exclude: Optional[str] = None,
        include: Optional[str] = None,
        policy_binding_description: Optional[str] = None,
        policy_id: Optional[str] = None,
        source: Optional[str] = None,
        source_type: Optional[str] = None,
        speed_limit: Optional[str] = None) -> PolicyBindingfunc GetPolicyBinding(ctx *Context, name string, id IDInput, state *PolicyBindingState, opts ...ResourceOption) (*PolicyBinding, error)public static PolicyBinding Get(string name, Input<string> id, PolicyBindingState? state, CustomResourceOptions? opts = null)public static PolicyBinding get(String name, Output<String> id, PolicyBindingState 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.
 
- Advanced
Options Pulumi.Ali Cloud. Hbr. Inputs. Policy Binding Advanced Options  - Backup Advanced Options. See 
advanced_optionsbelow. - Create
Time string - The creation time of the resource.
 - Data
Source stringId  - The data source ID.
 - Disabled bool
 - Whether the policy is effective for the data source.
- true: Pause
 - false: not paused.
 
 - Exclude string
 - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates a file type that does not need to be backed up. All files of this type are not backed up. A maximum of 255 characters is supported.
 - Include string
 - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates the file types to be backed up, and all files of these types are backed up. A maximum of 255 characters is supported.
 - Policy
Binding stringDescription  - Resource Description.
 - Policy
Id string - The policy ID.
 - Source string
 - When SourceType is OSS, a prefix is specified to be backed up. If it is not specified, the entire root directory of the Bucket is backed up.
 - Source
Type string - Data source type, value range:
- UDM_ECS: indicates the ECS instance backup.
 - OSS: indicates an OSS backup.
 - NAS: indicates an Alibaba Cloud NAS Backup. When you bind a file system to a policy, Cloud Backup automatically creates a mount point for the file system. If you no longer need the mount point, delete it manually.
 - ECS_FILE: indicates that the ECS file is backed up.
 - File: indicates a local File backup.
 
 - Speed
Limit string - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates backup flow control. The format is {start}{end}{bandwidth}. Multiple flow control configurations use partitioning, and no overlap in configuration time is allowed. start: start hour. end: end of hour. bandwidth: limit rate, in KB/s.
 
- Advanced
Options PolicyBinding Advanced Options Args  - Backup Advanced Options. See 
advanced_optionsbelow. - Create
Time string - The creation time of the resource.
 - Data
Source stringId  - The data source ID.
 - Disabled bool
 - Whether the policy is effective for the data source.
- true: Pause
 - false: not paused.
 
 - Exclude string
 - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates a file type that does not need to be backed up. All files of this type are not backed up. A maximum of 255 characters is supported.
 - Include string
 - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates the file types to be backed up, and all files of these types are backed up. A maximum of 255 characters is supported.
 - Policy
Binding stringDescription  - Resource Description.
 - Policy
Id string - The policy ID.
 - Source string
 - When SourceType is OSS, a prefix is specified to be backed up. If it is not specified, the entire root directory of the Bucket is backed up.
 - Source
Type string - Data source type, value range:
- UDM_ECS: indicates the ECS instance backup.
 - OSS: indicates an OSS backup.
 - NAS: indicates an Alibaba Cloud NAS Backup. When you bind a file system to a policy, Cloud Backup automatically creates a mount point for the file system. If you no longer need the mount point, delete it manually.
 - ECS_FILE: indicates that the ECS file is backed up.
 - File: indicates a local File backup.
 
 - Speed
Limit string - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates backup flow control. The format is {start}{end}{bandwidth}. Multiple flow control configurations use partitioning, and no overlap in configuration time is allowed. start: start hour. end: end of hour. bandwidth: limit rate, in KB/s.
 
- advanced
Options PolicyBinding Advanced Options  - Backup Advanced Options. See 
advanced_optionsbelow. - create
Time String - The creation time of the resource.
 - data
Source StringId  - The data source ID.
 - disabled Boolean
 - Whether the policy is effective for the data source.
- true: Pause
 - false: not paused.
 
 - exclude String
 - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates a file type that does not need to be backed up. All files of this type are not backed up. A maximum of 255 characters is supported.
 - include String
 - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates the file types to be backed up, and all files of these types are backed up. A maximum of 255 characters is supported.
 - policy
Binding StringDescription  - Resource Description.
 - policy
Id String - The policy ID.
 - source String
 - When SourceType is OSS, a prefix is specified to be backed up. If it is not specified, the entire root directory of the Bucket is backed up.
 - source
Type String - Data source type, value range:
- UDM_ECS: indicates the ECS instance backup.
 - OSS: indicates an OSS backup.
 - NAS: indicates an Alibaba Cloud NAS Backup. When you bind a file system to a policy, Cloud Backup automatically creates a mount point for the file system. If you no longer need the mount point, delete it manually.
 - ECS_FILE: indicates that the ECS file is backed up.
 - File: indicates a local File backup.
 
 - speed
Limit String - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates backup flow control. The format is {start}{end}{bandwidth}. Multiple flow control configurations use partitioning, and no overlap in configuration time is allowed. start: start hour. end: end of hour. bandwidth: limit rate, in KB/s.
 
- advanced
Options PolicyBinding Advanced Options  - Backup Advanced Options. See 
advanced_optionsbelow. - create
Time string - The creation time of the resource.
 - data
Source stringId  - The data source ID.
 - disabled boolean
 - Whether the policy is effective for the data source.
- true: Pause
 - false: not paused.
 
 - exclude string
 - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates a file type that does not need to be backed up. All files of this type are not backed up. A maximum of 255 characters is supported.
 - include string
 - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates the file types to be backed up, and all files of these types are backed up. A maximum of 255 characters is supported.
 - policy
Binding stringDescription  - Resource Description.
 - policy
Id string - The policy ID.
 - source string
 - When SourceType is OSS, a prefix is specified to be backed up. If it is not specified, the entire root directory of the Bucket is backed up.
 - source
Type string - Data source type, value range:
- UDM_ECS: indicates the ECS instance backup.
 - OSS: indicates an OSS backup.
 - NAS: indicates an Alibaba Cloud NAS Backup. When you bind a file system to a policy, Cloud Backup automatically creates a mount point for the file system. If you no longer need the mount point, delete it manually.
 - ECS_FILE: indicates that the ECS file is backed up.
 - File: indicates a local File backup.
 
 - speed
Limit string - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates backup flow control. The format is {start}{end}{bandwidth}. Multiple flow control configurations use partitioning, and no overlap in configuration time is allowed. start: start hour. end: end of hour. bandwidth: limit rate, in KB/s.
 
- advanced_
options PolicyBinding Advanced Options Args  - Backup Advanced Options. See 
advanced_optionsbelow. - create_
time str - The creation time of the resource.
 - data_
source_ strid  - The data source ID.
 - disabled bool
 - Whether the policy is effective for the data source.
- true: Pause
 - false: not paused.
 
 - exclude str
 - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates a file type that does not need to be backed up. All files of this type are not backed up. A maximum of 255 characters is supported.
 - include str
 - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates the file types to be backed up, and all files of these types are backed up. A maximum of 255 characters is supported.
 - policy_
binding_ strdescription  - Resource Description.
 - policy_
id str - The policy ID.
 - source str
 - When SourceType is OSS, a prefix is specified to be backed up. If it is not specified, the entire root directory of the Bucket is backed up.
 - source_
type str - Data source type, value range:
- UDM_ECS: indicates the ECS instance backup.
 - OSS: indicates an OSS backup.
 - NAS: indicates an Alibaba Cloud NAS Backup. When you bind a file system to a policy, Cloud Backup automatically creates a mount point for the file system. If you no longer need the mount point, delete it manually.
 - ECS_FILE: indicates that the ECS file is backed up.
 - File: indicates a local File backup.
 
 - speed_
limit str - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates backup flow control. The format is {start}{end}{bandwidth}. Multiple flow control configurations use partitioning, and no overlap in configuration time is allowed. start: start hour. end: end of hour. bandwidth: limit rate, in KB/s.
 
- advanced
Options Property Map - Backup Advanced Options. See 
advanced_optionsbelow. - create
Time String - The creation time of the resource.
 - data
Source StringId  - The data source ID.
 - disabled Boolean
 - Whether the policy is effective for the data source.
- true: Pause
 - false: not paused.
 
 - exclude String
 - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates a file type that does not need to be backed up. All files of this type are not backed up. A maximum of 255 characters is supported.
 - include String
 - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates the file types to be backed up, and all files of these types are backed up. A maximum of 255 characters is supported.
 - policy
Binding StringDescription  - Resource Description.
 - policy
Id String - The policy ID.
 - source String
 - When SourceType is OSS, a prefix is specified to be backed up. If it is not specified, the entire root directory of the Bucket is backed up.
 - source
Type String - Data source type, value range:
- UDM_ECS: indicates the ECS instance backup.
 - OSS: indicates an OSS backup.
 - NAS: indicates an Alibaba Cloud NAS Backup. When you bind a file system to a policy, Cloud Backup automatically creates a mount point for the file system. If you no longer need the mount point, delete it manually.
 - ECS_FILE: indicates that the ECS file is backed up.
 - File: indicates a local File backup.
 
 - speed
Limit String - This parameter is required only when the value of SourceType is ECS_FILE or File. Indicates backup flow control. The format is {start}{end}{bandwidth}. Multiple flow control configurations use partitioning, and no overlap in configuration time is allowed. start: start hour. end: end of hour. bandwidth: limit rate, in KB/s.
 
Supporting Types
PolicyBindingAdvancedOptions, PolicyBindingAdvancedOptionsArgs        
- Udm
Detail Pulumi.Ali Cloud. Hbr. Inputs. Policy Binding Advanced Options Udm Detail  - ECS Backup Advanced options. See 
udm_detailbelow. 
- Udm
Detail PolicyBinding Advanced Options Udm Detail  - ECS Backup Advanced options. See 
udm_detailbelow. 
- udm
Detail PolicyBinding Advanced Options Udm Detail  - ECS Backup Advanced options. See 
udm_detailbelow. 
- udm
Detail PolicyBinding Advanced Options Udm Detail  - ECS Backup Advanced options. See 
udm_detailbelow. 
- udm_
detail PolicyBinding Advanced Options Udm Detail  - ECS Backup Advanced options. See 
udm_detailbelow. 
- udm
Detail Property Map - ECS Backup Advanced options. See 
udm_detailbelow. 
PolicyBindingAdvancedOptionsUdmDetail, PolicyBindingAdvancedOptionsUdmDetailArgs            
- Destination
Kms stringKey Id  - Disk
Id List<string>Lists  - Exclude
Disk List<string>Id Lists  
- Destination
Kms stringKey Id  - Disk
Id []stringLists  - Exclude
Disk []stringId Lists  
- destination
Kms StringKey Id  - disk
Id List<String>Lists  - exclude
Disk List<String>Id Lists  
- destination
Kms stringKey Id  - disk
Id string[]Lists  - exclude
Disk string[]Id Lists  
- destination_
kms_ strkey_ id  - disk_
id_ Sequence[str]lists  - exclude_
disk_ Sequence[str]id_ lists  
- destination
Kms StringKey Id  - disk
Id List<String>Lists  - exclude
Disk List<String>Id Lists  
Import
HBR Policy Binding can be imported using the id, e.g.
$ pulumi import alicloud:hbr/policyBinding:PolicyBinding example <policy_id>:<source_type>:<data_source_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 
alicloudTerraform Provider.