alicloud.hbr.PolicyBinding
Explore with Pulumi AI
Provides a HBR Policy Binding resource.
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=[{
        "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
		}
		_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
		}
		defaultoqWvHQ, 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
		}
		defaultKtt2XY, err := oss.NewBucket(ctx, "defaultKtt2XY", &oss.BucketArgs{
			StorageClass: pulumi.String("Standard"),
			Bucket:       pulumi.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,
                  cross_account_role_name: Optional[str] = None,
                  cross_account_type: Optional[str] = None,
                  cross_account_user_id: Optional[int] = 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",
            },
        },
    },
    CrossAccountRoleName = "string",
    CrossAccountType = "string",
    CrossAccountUserId = 0,
    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"),
			},
		},
	},
	CrossAccountRoleName:     pulumi.String("string"),
	CrossAccountType:         pulumi.String("string"),
	CrossAccountUserId:       pulumi.Int(0),
	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())
    .crossAccountRoleName("string")
    .crossAccountType("string")
    .crossAccountUserId(0)
    .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={
        "udm_detail": {
            "destination_kms_key_id": "string",
            "disk_id_lists": ["string"],
            "exclude_disk_id_lists": ["string"],
        },
    },
    cross_account_role_name="string",
    cross_account_type="string",
    cross_account_user_id=0,
    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"],
        },
    },
    crossAccountRoleName: "string",
    crossAccountType: "string",
    crossAccountUserId: 0,
    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
    crossAccountRoleName: string
    crossAccountType: string
    crossAccountUserId: 0
    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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The PolicyBinding resource accepts the following input properties:
- AdvancedOptions Pulumi.Ali Cloud. Hbr. Inputs. Policy Binding Advanced Options 
- Backup Advanced Options See advanced_optionsbelow.
- CrossAccount stringRole Name 
- Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the name of the cross-account authorization role of the data source, and the management account uses this role to access the data source.
- CrossAccount stringType 
- Cross-account type, supported
- CrossAccount intUser Id 
- Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the ID of the actual account to which the data source belongs.
- DataSource 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.
- PolicyBinding stringDescription 
- Resource Description
- PolicyId 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.
- SourceType 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.
 
- SpeedLimit 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.
- AdvancedOptions PolicyBinding Advanced Options Args 
- Backup Advanced Options See advanced_optionsbelow.
- CrossAccount stringRole Name 
- Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the name of the cross-account authorization role of the data source, and the management account uses this role to access the data source.
- CrossAccount stringType 
- Cross-account type, supported
- CrossAccount intUser Id 
- Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the ID of the actual account to which the data source belongs.
- DataSource 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.
- PolicyBinding stringDescription 
- Resource Description
- PolicyId 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.
- SourceType 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.
 
- SpeedLimit 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.
- advancedOptions PolicyBinding Advanced Options 
- Backup Advanced Options See advanced_optionsbelow.
- crossAccount StringRole Name 
- Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the name of the cross-account authorization role of the data source, and the management account uses this role to access the data source.
- crossAccount StringType 
- Cross-account type, supported
- crossAccount IntegerUser Id 
- Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the ID of the actual account to which the data source belongs.
- dataSource 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.
- policyBinding StringDescription 
- Resource Description
- policyId 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.
- sourceType 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.
 
- speedLimit 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.
- advancedOptions PolicyBinding Advanced Options 
- Backup Advanced Options See advanced_optionsbelow.
- crossAccount stringRole Name 
- Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the name of the cross-account authorization role of the data source, and the management account uses this role to access the data source.
- crossAccount stringType 
- Cross-account type, supported
- crossAccount numberUser Id 
- Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the ID of the actual account to which the data source belongs.
- dataSource 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.
- policyBinding stringDescription 
- Resource Description
- policyId 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.
- sourceType 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.
 
- speedLimit 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.
- cross_account_ strrole_ name 
- Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the name of the cross-account authorization role of the data source, and the management account uses this role to access the data source.
- cross_account_ strtype 
- Cross-account type, supported
- cross_account_ intuser_ id 
- Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the ID of the actual account to which the data source belongs.
- 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.
- advancedOptions Property Map
- Backup Advanced Options See advanced_optionsbelow.
- crossAccount StringRole Name 
- Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the name of the cross-account authorization role of the data source, and the management account uses this role to access the data source.
- crossAccount StringType 
- Cross-account type, supported
- crossAccount NumberUser Id 
- Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the ID of the actual account to which the data source belongs.
- dataSource 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.
- policyBinding StringDescription 
- Resource Description
- policyId 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.
- sourceType 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.
 
- speedLimit 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:
- CreateTime string
- The creation time of the resource
- Id string
- The provider-assigned unique ID for this managed resource.
- CreateTime string
- The creation time of the resource
- Id string
- The provider-assigned unique ID for this managed resource.
- createTime String
- The creation time of the resource
- id String
- The provider-assigned unique ID for this managed resource.
- createTime 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.
- createTime 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,
        cross_account_role_name: Optional[str] = None,
        cross_account_type: Optional[str] = None,
        cross_account_user_id: Optional[int] = 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)resources:  _:    type: alicloud:hbr:PolicyBinding    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.
- AdvancedOptions Pulumi.Ali Cloud. Hbr. Inputs. Policy Binding Advanced Options 
- Backup Advanced Options See advanced_optionsbelow.
- CreateTime string
- The creation time of the resource
- CrossAccount stringRole Name 
- Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the name of the cross-account authorization role of the data source, and the management account uses this role to access the data source.
- CrossAccount stringType 
- Cross-account type, supported
- CrossAccount intUser Id 
- Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the ID of the actual account to which the data source belongs.
- DataSource 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.
- PolicyBinding stringDescription 
- Resource Description
- PolicyId 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.
- SourceType 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.
 
- SpeedLimit 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.
- AdvancedOptions PolicyBinding Advanced Options Args 
- Backup Advanced Options See advanced_optionsbelow.
- CreateTime string
- The creation time of the resource
- CrossAccount stringRole Name 
- Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the name of the cross-account authorization role of the data source, and the management account uses this role to access the data source.
- CrossAccount stringType 
- Cross-account type, supported
- CrossAccount intUser Id 
- Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the ID of the actual account to which the data source belongs.
- DataSource 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.
- PolicyBinding stringDescription 
- Resource Description
- PolicyId 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.
- SourceType 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.
 
- SpeedLimit 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.
- advancedOptions PolicyBinding Advanced Options 
- Backup Advanced Options See advanced_optionsbelow.
- createTime String
- The creation time of the resource
- crossAccount StringRole Name 
- Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the name of the cross-account authorization role of the data source, and the management account uses this role to access the data source.
- crossAccount StringType 
- Cross-account type, supported
- crossAccount IntegerUser Id 
- Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the ID of the actual account to which the data source belongs.
- dataSource 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.
- policyBinding StringDescription 
- Resource Description
- policyId 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.
- sourceType 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.
 
- speedLimit 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.
- advancedOptions PolicyBinding Advanced Options 
- Backup Advanced Options See advanced_optionsbelow.
- createTime string
- The creation time of the resource
- crossAccount stringRole Name 
- Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the name of the cross-account authorization role of the data source, and the management account uses this role to access the data source.
- crossAccount stringType 
- Cross-account type, supported
- crossAccount numberUser Id 
- Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the ID of the actual account to which the data source belongs.
- dataSource 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.
- policyBinding stringDescription 
- Resource Description
- policyId 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.
- sourceType 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.
 
- speedLimit 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
- cross_account_ strrole_ name 
- Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the name of the cross-account authorization role of the data source, and the management account uses this role to access the data source.
- cross_account_ strtype 
- Cross-account type, supported
- cross_account_ intuser_ id 
- Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the ID of the actual account to which the data source belongs.
- 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.
- advancedOptions Property Map
- Backup Advanced Options See advanced_optionsbelow.
- createTime String
- The creation time of the resource
- crossAccount StringRole Name 
- Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the name of the cross-account authorization role of the data source, and the management account uses this role to access the data source.
- crossAccount StringType 
- Cross-account type, supported
- crossAccount NumberUser Id 
- Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the ID of the actual account to which the data source belongs.
- dataSource 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.
- policyBinding StringDescription 
- Resource Description
- policyId 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.
- sourceType 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.
 
- speedLimit 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        
- UdmDetail Pulumi.Ali Cloud. Hbr. Inputs. Policy Binding Advanced Options Udm Detail 
- ECS Backup Advanced options. See udm_detailbelow.
- UdmDetail PolicyBinding Advanced Options Udm Detail 
- ECS Backup Advanced options. See udm_detailbelow.
- udmDetail PolicyBinding Advanced Options Udm Detail 
- ECS Backup Advanced options. See udm_detailbelow.
- udmDetail 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.
- udmDetail Property Map
- ECS Backup Advanced options. See udm_detailbelow.
PolicyBindingAdvancedOptionsUdmDetail, PolicyBindingAdvancedOptionsUdmDetailArgs            
- DestinationKms stringKey Id 
- Custom KMS key ID of encrypted copy.
- DiskId List<string>Lists 
- The list of backup disks. If it is empty, all disks are backed up.
- ExcludeDisk List<string>Id Lists 
- List of cloud disk IDs that are not backed up.
- DestinationKms stringKey Id 
- Custom KMS key ID of encrypted copy.
- DiskId []stringLists 
- The list of backup disks. If it is empty, all disks are backed up.
- ExcludeDisk []stringId Lists 
- List of cloud disk IDs that are not backed up.
- destinationKms StringKey Id 
- Custom KMS key ID of encrypted copy.
- diskId List<String>Lists 
- The list of backup disks. If it is empty, all disks are backed up.
- excludeDisk List<String>Id Lists 
- List of cloud disk IDs that are not backed up.
- destinationKms stringKey Id 
- Custom KMS key ID of encrypted copy.
- diskId string[]Lists 
- The list of backup disks. If it is empty, all disks are backed up.
- excludeDisk string[]Id Lists 
- List of cloud disk IDs that are not backed up.
- destination_kms_ strkey_ id 
- Custom KMS key ID of encrypted copy.
- disk_id_ Sequence[str]lists 
- The list of backup disks. If it is empty, all disks are backed up.
- exclude_disk_ Sequence[str]id_ lists 
- List of cloud disk IDs that are not backed up.
- destinationKms StringKey Id 
- Custom KMS key ID of encrypted copy.
- diskId List<String>Lists 
- The list of backup disks. If it is empty, all disks are backed up.
- excludeDisk List<String>Id Lists 
- List of cloud disk IDs that are not backed up.
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.