1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. hbr
  5. PolicyBinding
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

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/",
});
Copy
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/")
Copy
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
	})
}
Copy
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/",
    });

});
Copy
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());

    }
}
Copy
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/
Copy

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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. String
The unique name of the resource.
args This property is required. 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",
});
Copy
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"),
})
Copy
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());
Copy
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")
Copy
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",
});
Copy
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
Copy

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 Changes to this property will trigger replacement. Pulumi.AliCloud.Hbr.Inputs.PolicyBindingAdvancedOptions
Backup Advanced Options See advanced_options below.
CrossAccountRoleName Changes to this property will trigger replacement. string
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.
CrossAccountType Changes to this property will trigger replacement. string
Cross-account type, supported
CrossAccountUserId Changes to this property will trigger replacement. int
Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the ID of the actual account to which the data source belongs.
DataSourceId Changes to this property will trigger replacement. string
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.
PolicyBindingDescription string
Resource Description
PolicyId Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. PolicyBindingAdvancedOptionsArgs
Backup Advanced Options See advanced_options below.
CrossAccountRoleName Changes to this property will trigger replacement. string
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.
CrossAccountType Changes to this property will trigger replacement. string
Cross-account type, supported
CrossAccountUserId Changes to this property will trigger replacement. int
Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the ID of the actual account to which the data source belongs.
DataSourceId Changes to this property will trigger replacement. string
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.
PolicyBindingDescription string
Resource Description
PolicyId Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. PolicyBindingAdvancedOptions
Backup Advanced Options See advanced_options below.
crossAccountRoleName Changes to this property will trigger replacement. String
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.
crossAccountType Changes to this property will trigger replacement. String
Cross-account type, supported
crossAccountUserId Changes to this property will trigger replacement. Integer
Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the ID of the actual account to which the data source belongs.
dataSourceId Changes to this property will trigger replacement. String
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.
policyBindingDescription String
Resource Description
policyId Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. PolicyBindingAdvancedOptions
Backup Advanced Options See advanced_options below.
crossAccountRoleName Changes to this property will trigger replacement. string
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.
crossAccountType Changes to this property will trigger replacement. string
Cross-account type, supported
crossAccountUserId Changes to this property will trigger replacement. number
Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the ID of the actual account to which the data source belongs.
dataSourceId Changes to this property will trigger replacement. string
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.
policyBindingDescription string
Resource Description
policyId Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. PolicyBindingAdvancedOptionsArgs
Backup Advanced Options See advanced_options below.
cross_account_role_name Changes to this property will trigger replacement. str
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_type Changes to this property will trigger replacement. str
Cross-account type, supported
cross_account_user_id Changes to this property will trigger replacement. int
Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the ID of the actual account to which the data source belongs.
data_source_id Changes to this property will trigger replacement. str
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_description str
Resource Description
policy_id Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. Property Map
Backup Advanced Options See advanced_options below.
crossAccountRoleName Changes to this property will trigger replacement. String
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.
crossAccountType Changes to this property will trigger replacement. String
Cross-account type, supported
crossAccountUserId Changes to this property will trigger replacement. Number
Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the ID of the actual account to which the data source belongs.
dataSourceId Changes to this property will trigger replacement. String
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.
policyBindingDescription String
Resource Description
policyId Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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) -> PolicyBinding
func 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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AdvancedOptions Changes to this property will trigger replacement. Pulumi.AliCloud.Hbr.Inputs.PolicyBindingAdvancedOptions
Backup Advanced Options See advanced_options below.
CreateTime string
The creation time of the resource
CrossAccountRoleName Changes to this property will trigger replacement. string
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.
CrossAccountType Changes to this property will trigger replacement. string
Cross-account type, supported
CrossAccountUserId Changes to this property will trigger replacement. int
Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the ID of the actual account to which the data source belongs.
DataSourceId Changes to this property will trigger replacement. string
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.
PolicyBindingDescription string
Resource Description
PolicyId Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. PolicyBindingAdvancedOptionsArgs
Backup Advanced Options See advanced_options below.
CreateTime string
The creation time of the resource
CrossAccountRoleName Changes to this property will trigger replacement. string
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.
CrossAccountType Changes to this property will trigger replacement. string
Cross-account type, supported
CrossAccountUserId Changes to this property will trigger replacement. int
Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the ID of the actual account to which the data source belongs.
DataSourceId Changes to this property will trigger replacement. string
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.
PolicyBindingDescription string
Resource Description
PolicyId Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. PolicyBindingAdvancedOptions
Backup Advanced Options See advanced_options below.
createTime String
The creation time of the resource
crossAccountRoleName Changes to this property will trigger replacement. String
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.
crossAccountType Changes to this property will trigger replacement. String
Cross-account type, supported
crossAccountUserId Changes to this property will trigger replacement. Integer
Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the ID of the actual account to which the data source belongs.
dataSourceId Changes to this property will trigger replacement. String
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.
policyBindingDescription String
Resource Description
policyId Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. PolicyBindingAdvancedOptions
Backup Advanced Options See advanced_options below.
createTime string
The creation time of the resource
crossAccountRoleName Changes to this property will trigger replacement. string
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.
crossAccountType Changes to this property will trigger replacement. string
Cross-account type, supported
crossAccountUserId Changes to this property will trigger replacement. number
Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the ID of the actual account to which the data source belongs.
dataSourceId Changes to this property will trigger replacement. string
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.
policyBindingDescription string
Resource Description
policyId Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. PolicyBindingAdvancedOptionsArgs
Backup Advanced Options See advanced_options below.
create_time str
The creation time of the resource
cross_account_role_name Changes to this property will trigger replacement. str
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_type Changes to this property will trigger replacement. str
Cross-account type, supported
cross_account_user_id Changes to this property will trigger replacement. int
Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the ID of the actual account to which the data source belongs.
data_source_id Changes to this property will trigger replacement. str
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_description str
Resource Description
policy_id Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. Property Map
Backup Advanced Options See advanced_options below.
createTime String
The creation time of the resource
crossAccountRoleName Changes to this property will trigger replacement. String
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.
crossAccountType Changes to this property will trigger replacement. String
Cross-account type, supported
crossAccountUserId Changes to this property will trigger replacement. Number
Valid only when CrossAccountType = CROSS_ACCOUNT, indicating the ID of the actual account to which the data source belongs.
dataSourceId Changes to this property will trigger replacement. String
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.
policyBindingDescription String
Resource Description
policyId Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. Pulumi.AliCloud.Hbr.Inputs.PolicyBindingAdvancedOptionsUdmDetail
ECS Backup Advanced options. See udm_detail below.
UdmDetail Changes to this property will trigger replacement. PolicyBindingAdvancedOptionsUdmDetail
ECS Backup Advanced options. See udm_detail below.
udmDetail Changes to this property will trigger replacement. PolicyBindingAdvancedOptionsUdmDetail
ECS Backup Advanced options. See udm_detail below.
udmDetail Changes to this property will trigger replacement. PolicyBindingAdvancedOptionsUdmDetail
ECS Backup Advanced options. See udm_detail below.
udm_detail Changes to this property will trigger replacement. PolicyBindingAdvancedOptionsUdmDetail
ECS Backup Advanced options. See udm_detail below.
udmDetail Changes to this property will trigger replacement. Property Map
ECS Backup Advanced options. See udm_detail below.

PolicyBindingAdvancedOptionsUdmDetail
, PolicyBindingAdvancedOptionsUdmDetailArgs

DestinationKmsKeyId string
Custom KMS key ID of encrypted copy.
DiskIdLists List<string>
The list of backup disks. If it is empty, all disks are backed up.
ExcludeDiskIdLists List<string>
List of cloud disk IDs that are not backed up.
DestinationKmsKeyId string
Custom KMS key ID of encrypted copy.
DiskIdLists []string
The list of backup disks. If it is empty, all disks are backed up.
ExcludeDiskIdLists []string
List of cloud disk IDs that are not backed up.
destinationKmsKeyId String
Custom KMS key ID of encrypted copy.
diskIdLists List<String>
The list of backup disks. If it is empty, all disks are backed up.
excludeDiskIdLists List<String>
List of cloud disk IDs that are not backed up.
destinationKmsKeyId string
Custom KMS key ID of encrypted copy.
diskIdLists string[]
The list of backup disks. If it is empty, all disks are backed up.
excludeDiskIdLists string[]
List of cloud disk IDs that are not backed up.
destination_kms_key_id str
Custom KMS key ID of encrypted copy.
disk_id_lists Sequence[str]
The list of backup disks. If it is empty, all disks are backed up.
exclude_disk_id_lists Sequence[str]
List of cloud disk IDs that are not backed up.
destinationKmsKeyId String
Custom KMS key ID of encrypted copy.
diskIdLists List<String>
The list of backup disks. If it is empty, all disks are backed up.
excludeDiskIdLists List<String>
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>
Copy

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

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.