1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. hbr
  5. ReplicationVault
Alibaba Cloud v3.81.0 published on Monday, Jun 23, 2025 by Pulumi

alicloud.hbr.ReplicationVault

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.81.0 published on Monday, Jun 23, 2025 by Pulumi

    Provides a Hybrid Backup Recovery (HBR) Replication Vault resource.

    The replication vault used by the cross-region backup function of Cloud Backup.

    For information about Hybrid Backup Recovery (HBR) Replication Vault and how to use it, see What is Replication Vault.

    NOTE: Available since v1.252.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 sourceRegion = config.get("sourceRegion") || "cn-hangzhou";
    const _default = alicloud.hbr.getReplicationVaultRegions({});
    const defaultInteger = new random.index.Integer("default", {
        min: 10000,
        max: 99999,
    });
    const defaultVault = new alicloud.hbr.Vault("default", {vaultName: `terraform-example-${defaultInteger.result}`});
    const defaultReplicationVault = new alicloud.hbr.ReplicationVault("default", {
        replicationSourceRegionId: sourceRegion,
        replicationSourceVaultId: defaultVault.id,
        vaultName: "terraform-example",
        vaultStorageClass: "STANDARD",
        description: "terraform-example",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    config = pulumi.Config()
    source_region = config.get("sourceRegion")
    if source_region is None:
        source_region = "cn-hangzhou"
    default = alicloud.hbr.get_replication_vault_regions()
    default_integer = random.index.Integer("default",
        min=10000,
        max=99999)
    default_vault = alicloud.hbr.Vault("default", vault_name=f"terraform-example-{default_integer['result']}")
    default_replication_vault = alicloud.hbr.ReplicationVault("default",
        replication_source_region_id=source_region,
        replication_source_vault_id=default_vault.id,
        vault_name="terraform-example",
        vault_storage_class="STANDARD",
        description="terraform-example")
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/hbr"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		sourceRegion := "cn-hangzhou"
    		if param := cfg.Get("sourceRegion"); param != "" {
    			sourceRegion = param
    		}
    		_, err := hbr.GetReplicationVaultRegions(ctx, &hbr.GetReplicationVaultRegionsArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		defaultInteger, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
    			Min: 10000,
    			Max: 99999,
    		})
    		if err != nil {
    			return err
    		}
    		defaultVault, err := hbr.NewVault(ctx, "default", &hbr.VaultArgs{
    			VaultName: pulumi.Sprintf("terraform-example-%v", defaultInteger.Result),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = hbr.NewReplicationVault(ctx, "default", &hbr.ReplicationVaultArgs{
    			ReplicationSourceRegionId: pulumi.String(sourceRegion),
    			ReplicationSourceVaultId:  defaultVault.ID(),
    			VaultName:                 pulumi.String("terraform-example"),
    			VaultStorageClass:         pulumi.String("STANDARD"),
    			Description:               pulumi.String("terraform-example"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var sourceRegion = config.Get("sourceRegion") ?? "cn-hangzhou";
        var @default = AliCloud.Hbr.GetReplicationVaultRegions.Invoke();
    
        var defaultInteger = new Random.Index.Integer("default", new()
        {
            Min = 10000,
            Max = 99999,
        });
    
        var defaultVault = new AliCloud.Hbr.Vault("default", new()
        {
            VaultName = $"terraform-example-{defaultInteger.Result}",
        });
    
        var defaultReplicationVault = new AliCloud.Hbr.ReplicationVault("default", new()
        {
            ReplicationSourceRegionId = sourceRegion,
            ReplicationSourceVaultId = defaultVault.Id,
            VaultName = "terraform-example",
            VaultStorageClass = "STANDARD",
            Description = "terraform-example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.hbr.HbrFunctions;
    import com.pulumi.alicloud.hbr.inputs.GetReplicationVaultRegionsArgs;
    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.ReplicationVault;
    import com.pulumi.alicloud.hbr.ReplicationVaultArgs;
    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 sourceRegion = config.get("sourceRegion").orElse("cn-hangzhou");
            final var default = HbrFunctions.getReplicationVaultRegions(GetReplicationVaultRegionsArgs.builder()
                .build());
    
            var defaultInteger = new Integer("defaultInteger", IntegerArgs.builder()
                .min(10000)
                .max(99999)
                .build());
    
            var defaultVault = new Vault("defaultVault", VaultArgs.builder()
                .vaultName(String.format("terraform-example-%s", defaultInteger.result()))
                .build());
    
            var defaultReplicationVault = new ReplicationVault("defaultReplicationVault", ReplicationVaultArgs.builder()
                .replicationSourceRegionId(sourceRegion)
                .replicationSourceVaultId(defaultVault.id())
                .vaultName("terraform-example")
                .vaultStorageClass("STANDARD")
                .description("terraform-example")
                .build());
    
        }
    }
    
    configuration:
      sourceRegion:
        type: string
        default: cn-hangzhou
    resources:
      defaultInteger:
        type: random:integer
        name: default
        properties:
          min: 10000
          max: 99999
      defaultVault:
        type: alicloud:hbr:Vault
        name: default
        properties:
          vaultName: terraform-example-${defaultInteger.result}
      defaultReplicationVault:
        type: alicloud:hbr:ReplicationVault
        name: default
        properties:
          replicationSourceRegionId: ${sourceRegion}
          replicationSourceVaultId: ${defaultVault.id}
          vaultName: terraform-example
          vaultStorageClass: STANDARD
          description: terraform-example
    variables:
      default:
        fn::invoke:
          function: alicloud:hbr:getReplicationVaultRegions
          arguments: {}
    

    Create ReplicationVault Resource

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

    Constructor syntax

    new ReplicationVault(name: string, args: ReplicationVaultArgs, opts?: CustomResourceOptions);
    @overload
    def ReplicationVault(resource_name: str,
                         args: ReplicationVaultArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def ReplicationVault(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         replication_source_region_id: Optional[str] = None,
                         replication_source_vault_id: Optional[str] = None,
                         vault_name: Optional[str] = None,
                         description: Optional[str] = None,
                         encrypt_type: Optional[str] = None,
                         kms_key_id: Optional[str] = None,
                         vault_storage_class: Optional[str] = None)
    func NewReplicationVault(ctx *Context, name string, args ReplicationVaultArgs, opts ...ResourceOption) (*ReplicationVault, error)
    public ReplicationVault(string name, ReplicationVaultArgs args, CustomResourceOptions? opts = null)
    public ReplicationVault(String name, ReplicationVaultArgs args)
    public ReplicationVault(String name, ReplicationVaultArgs args, CustomResourceOptions options)
    
    type: alicloud:hbr:ReplicationVault
    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 ReplicationVaultArgs
    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 ReplicationVaultArgs
    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 ReplicationVaultArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ReplicationVaultArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ReplicationVaultArgs
    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 replicationVaultResource = new AliCloud.Hbr.ReplicationVault("replicationVaultResource", new()
    {
        ReplicationSourceRegionId = "string",
        ReplicationSourceVaultId = "string",
        VaultName = "string",
        Description = "string",
        EncryptType = "string",
        KmsKeyId = "string",
        VaultStorageClass = "string",
    });
    
    example, err := hbr.NewReplicationVault(ctx, "replicationVaultResource", &hbr.ReplicationVaultArgs{
    	ReplicationSourceRegionId: pulumi.String("string"),
    	ReplicationSourceVaultId:  pulumi.String("string"),
    	VaultName:                 pulumi.String("string"),
    	Description:               pulumi.String("string"),
    	EncryptType:               pulumi.String("string"),
    	KmsKeyId:                  pulumi.String("string"),
    	VaultStorageClass:         pulumi.String("string"),
    })
    
    var replicationVaultResource = new ReplicationVault("replicationVaultResource", ReplicationVaultArgs.builder()
        .replicationSourceRegionId("string")
        .replicationSourceVaultId("string")
        .vaultName("string")
        .description("string")
        .encryptType("string")
        .kmsKeyId("string")
        .vaultStorageClass("string")
        .build());
    
    replication_vault_resource = alicloud.hbr.ReplicationVault("replicationVaultResource",
        replication_source_region_id="string",
        replication_source_vault_id="string",
        vault_name="string",
        description="string",
        encrypt_type="string",
        kms_key_id="string",
        vault_storage_class="string")
    
    const replicationVaultResource = new alicloud.hbr.ReplicationVault("replicationVaultResource", {
        replicationSourceRegionId: "string",
        replicationSourceVaultId: "string",
        vaultName: "string",
        description: "string",
        encryptType: "string",
        kmsKeyId: "string",
        vaultStorageClass: "string",
    });
    
    type: alicloud:hbr:ReplicationVault
    properties:
        description: string
        encryptType: string
        kmsKeyId: string
        replicationSourceRegionId: string
        replicationSourceVaultId: string
        vaultName: string
        vaultStorageClass: string
    

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

    ReplicationSourceRegionId string
    The region ID of the source backup vault.
    ReplicationSourceVaultId string
    The vault ID of the source backup vault.
    VaultName string
    The name of the backup vault.
    Description string
    The description of the backup vault.
    EncryptType string
    The encryption type of the backup vault.
    KmsKeyId string
    Alibaba Cloud KMS custom Key or Alias. This parameter is required only when EncryptType = KMS.
    VaultStorageClass string
    Backup Vault Storage Class
    ReplicationSourceRegionId string
    The region ID of the source backup vault.
    ReplicationSourceVaultId string
    The vault ID of the source backup vault.
    VaultName string
    The name of the backup vault.
    Description string
    The description of the backup vault.
    EncryptType string
    The encryption type of the backup vault.
    KmsKeyId string
    Alibaba Cloud KMS custom Key or Alias. This parameter is required only when EncryptType = KMS.
    VaultStorageClass string
    Backup Vault Storage Class
    replicationSourceRegionId String
    The region ID of the source backup vault.
    replicationSourceVaultId String
    The vault ID of the source backup vault.
    vaultName String
    The name of the backup vault.
    description String
    The description of the backup vault.
    encryptType String
    The encryption type of the backup vault.
    kmsKeyId String
    Alibaba Cloud KMS custom Key or Alias. This parameter is required only when EncryptType = KMS.
    vaultStorageClass String
    Backup Vault Storage Class
    replicationSourceRegionId string
    The region ID of the source backup vault.
    replicationSourceVaultId string
    The vault ID of the source backup vault.
    vaultName string
    The name of the backup vault.
    description string
    The description of the backup vault.
    encryptType string
    The encryption type of the backup vault.
    kmsKeyId string
    Alibaba Cloud KMS custom Key or Alias. This parameter is required only when EncryptType = KMS.
    vaultStorageClass string
    Backup Vault Storage Class
    replication_source_region_id str
    The region ID of the source backup vault.
    replication_source_vault_id str
    The vault ID of the source backup vault.
    vault_name str
    The name of the backup vault.
    description str
    The description of the backup vault.
    encrypt_type str
    The encryption type of the backup vault.
    kms_key_id str
    Alibaba Cloud KMS custom Key or Alias. This parameter is required only when EncryptType = KMS.
    vault_storage_class str
    Backup Vault Storage Class
    replicationSourceRegionId String
    The region ID of the source backup vault.
    replicationSourceVaultId String
    The vault ID of the source backup vault.
    vaultName String
    The name of the backup vault.
    description String
    The description of the backup vault.
    encryptType String
    The encryption type of the backup vault.
    kmsKeyId String
    Alibaba Cloud KMS custom Key or Alias. This parameter is required only when EncryptType = KMS.
    vaultStorageClass String
    Backup Vault Storage Class

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    RegionId string
    RegionId
    Status string
    The status of the mirror backup vault.
    Id string
    The provider-assigned unique ID for this managed resource.
    RegionId string
    RegionId
    Status string
    The status of the mirror backup vault.
    id String
    The provider-assigned unique ID for this managed resource.
    regionId String
    RegionId
    status String
    The status of the mirror backup vault.
    id string
    The provider-assigned unique ID for this managed resource.
    regionId string
    RegionId
    status string
    The status of the mirror backup vault.
    id str
    The provider-assigned unique ID for this managed resource.
    region_id str
    RegionId
    status str
    The status of the mirror backup vault.
    id String
    The provider-assigned unique ID for this managed resource.
    regionId String
    RegionId
    status String
    The status of the mirror backup vault.

    Look up Existing ReplicationVault Resource

    Get an existing ReplicationVault 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?: ReplicationVaultState, opts?: CustomResourceOptions): ReplicationVault
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            encrypt_type: Optional[str] = None,
            kms_key_id: Optional[str] = None,
            region_id: Optional[str] = None,
            replication_source_region_id: Optional[str] = None,
            replication_source_vault_id: Optional[str] = None,
            status: Optional[str] = None,
            vault_name: Optional[str] = None,
            vault_storage_class: Optional[str] = None) -> ReplicationVault
    func GetReplicationVault(ctx *Context, name string, id IDInput, state *ReplicationVaultState, opts ...ResourceOption) (*ReplicationVault, error)
    public static ReplicationVault Get(string name, Input<string> id, ReplicationVaultState? state, CustomResourceOptions? opts = null)
    public static ReplicationVault get(String name, Output<String> id, ReplicationVaultState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:hbr:ReplicationVault    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Description string
    The description of the backup vault.
    EncryptType string
    The encryption type of the backup vault.
    KmsKeyId string
    Alibaba Cloud KMS custom Key or Alias. This parameter is required only when EncryptType = KMS.
    RegionId string
    RegionId
    ReplicationSourceRegionId string
    The region ID of the source backup vault.
    ReplicationSourceVaultId string
    The vault ID of the source backup vault.
    Status string
    The status of the mirror backup vault.
    VaultName string
    The name of the backup vault.
    VaultStorageClass string
    Backup Vault Storage Class
    Description string
    The description of the backup vault.
    EncryptType string
    The encryption type of the backup vault.
    KmsKeyId string
    Alibaba Cloud KMS custom Key or Alias. This parameter is required only when EncryptType = KMS.
    RegionId string
    RegionId
    ReplicationSourceRegionId string
    The region ID of the source backup vault.
    ReplicationSourceVaultId string
    The vault ID of the source backup vault.
    Status string
    The status of the mirror backup vault.
    VaultName string
    The name of the backup vault.
    VaultStorageClass string
    Backup Vault Storage Class
    description String
    The description of the backup vault.
    encryptType String
    The encryption type of the backup vault.
    kmsKeyId String
    Alibaba Cloud KMS custom Key or Alias. This parameter is required only when EncryptType = KMS.
    regionId String
    RegionId
    replicationSourceRegionId String
    The region ID of the source backup vault.
    replicationSourceVaultId String
    The vault ID of the source backup vault.
    status String
    The status of the mirror backup vault.
    vaultName String
    The name of the backup vault.
    vaultStorageClass String
    Backup Vault Storage Class
    description string
    The description of the backup vault.
    encryptType string
    The encryption type of the backup vault.
    kmsKeyId string
    Alibaba Cloud KMS custom Key or Alias. This parameter is required only when EncryptType = KMS.
    regionId string
    RegionId
    replicationSourceRegionId string
    The region ID of the source backup vault.
    replicationSourceVaultId string
    The vault ID of the source backup vault.
    status string
    The status of the mirror backup vault.
    vaultName string
    The name of the backup vault.
    vaultStorageClass string
    Backup Vault Storage Class
    description str
    The description of the backup vault.
    encrypt_type str
    The encryption type of the backup vault.
    kms_key_id str
    Alibaba Cloud KMS custom Key or Alias. This parameter is required only when EncryptType = KMS.
    region_id str
    RegionId
    replication_source_region_id str
    The region ID of the source backup vault.
    replication_source_vault_id str
    The vault ID of the source backup vault.
    status str
    The status of the mirror backup vault.
    vault_name str
    The name of the backup vault.
    vault_storage_class str
    Backup Vault Storage Class
    description String
    The description of the backup vault.
    encryptType String
    The encryption type of the backup vault.
    kmsKeyId String
    Alibaba Cloud KMS custom Key or Alias. This parameter is required only when EncryptType = KMS.
    regionId String
    RegionId
    replicationSourceRegionId String
    The region ID of the source backup vault.
    replicationSourceVaultId String
    The vault ID of the source backup vault.
    status String
    The status of the mirror backup vault.
    vaultName String
    The name of the backup vault.
    vaultStorageClass String
    Backup Vault Storage Class

    Import

    Hybrid Backup Recovery (HBR) Replication Vault can be imported using the id, e.g.

    $ pulumi import alicloud:hbr/replicationVault:ReplicationVault example <id>
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.81.0 published on Monday, Jun 23, 2025 by Pulumi