1. Packages
  2. AWS Classic
  3. API Docs
  4. backup
  5. Vault

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws.backup.Vault

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Provides an AWS Backup vault resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.backup.Vault("example", {
        name: "example_backup_vault",
        kmsKeyArn: exampleAwsKmsKey.arn,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.backup.Vault("example",
        name="example_backup_vault",
        kms_key_arn=example_aws_kms_key["arn"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/backup"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := backup.NewVault(ctx, "example", &backup.VaultArgs{
    			Name:      pulumi.String("example_backup_vault"),
    			KmsKeyArn: pulumi.Any(exampleAwsKmsKey.Arn),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Backup.Vault("example", new()
        {
            Name = "example_backup_vault",
            KmsKeyArn = exampleAwsKmsKey.Arn,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.backup.Vault;
    import com.pulumi.aws.backup.VaultArgs;
    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) {
            var example = new Vault("example", VaultArgs.builder()
                .name("example_backup_vault")
                .kmsKeyArn(exampleAwsKmsKey.arn())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:backup:Vault
        properties:
          name: example_backup_vault
          kmsKeyArn: ${exampleAwsKmsKey.arn}
    

    Create Vault Resource

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

    Constructor syntax

    new Vault(name: string, args?: VaultArgs, opts?: CustomResourceOptions);
    @overload
    def Vault(resource_name: str,
              args: Optional[VaultArgs] = None,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Vault(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              force_destroy: Optional[bool] = None,
              kms_key_arn: Optional[str] = None,
              name: Optional[str] = None,
              tags: Optional[Mapping[str, str]] = None)
    func NewVault(ctx *Context, name string, args *VaultArgs, opts ...ResourceOption) (*Vault, error)
    public Vault(string name, VaultArgs? args = null, CustomResourceOptions? opts = null)
    public Vault(String name, VaultArgs args)
    public Vault(String name, VaultArgs args, CustomResourceOptions options)
    
    type: aws:backup:Vault
    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 VaultArgs
    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 VaultArgs
    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 VaultArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VaultArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VaultArgs
    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 vaultResource = new Aws.Backup.Vault("vaultResource", new()
    {
        ForceDestroy = false,
        KmsKeyArn = "string",
        Name = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := backup.NewVault(ctx, "vaultResource", &backup.VaultArgs{
    	ForceDestroy: pulumi.Bool(false),
    	KmsKeyArn:    pulumi.String("string"),
    	Name:         pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var vaultResource = new Vault("vaultResource", VaultArgs.builder()
        .forceDestroy(false)
        .kmsKeyArn("string")
        .name("string")
        .tags(Map.of("string", "string"))
        .build());
    
    vault_resource = aws.backup.Vault("vaultResource",
        force_destroy=False,
        kms_key_arn="string",
        name="string",
        tags={
            "string": "string",
        })
    
    const vaultResource = new aws.backup.Vault("vaultResource", {
        forceDestroy: false,
        kmsKeyArn: "string",
        name: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:backup:Vault
    properties:
        forceDestroy: false
        kmsKeyArn: string
        name: string
        tags:
            string: string
    

    Vault Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Vault resource accepts the following input properties:

    ForceDestroy bool
    A boolean that indicates that all recovery points stored in the vault are deleted so that the vault can be destroyed without error.
    KmsKeyArn string
    The server-side encryption key that is used to protect your backups.
    Name string
    Name of the backup vault to create.
    Tags Dictionary<string, string>
    Metadata that you can assign to help organize the resources that you create. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    ForceDestroy bool
    A boolean that indicates that all recovery points stored in the vault are deleted so that the vault can be destroyed without error.
    KmsKeyArn string
    The server-side encryption key that is used to protect your backups.
    Name string
    Name of the backup vault to create.
    Tags map[string]string
    Metadata that you can assign to help organize the resources that you create. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    forceDestroy Boolean
    A boolean that indicates that all recovery points stored in the vault are deleted so that the vault can be destroyed without error.
    kmsKeyArn String
    The server-side encryption key that is used to protect your backups.
    name String
    Name of the backup vault to create.
    tags Map<String,String>
    Metadata that you can assign to help organize the resources that you create. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    forceDestroy boolean
    A boolean that indicates that all recovery points stored in the vault are deleted so that the vault can be destroyed without error.
    kmsKeyArn string
    The server-side encryption key that is used to protect your backups.
    name string
    Name of the backup vault to create.
    tags {[key: string]: string}
    Metadata that you can assign to help organize the resources that you create. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    force_destroy bool
    A boolean that indicates that all recovery points stored in the vault are deleted so that the vault can be destroyed without error.
    kms_key_arn str
    The server-side encryption key that is used to protect your backups.
    name str
    Name of the backup vault to create.
    tags Mapping[str, str]
    Metadata that you can assign to help organize the resources that you create. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    forceDestroy Boolean
    A boolean that indicates that all recovery points stored in the vault are deleted so that the vault can be destroyed without error.
    kmsKeyArn String
    The server-side encryption key that is used to protect your backups.
    name String
    Name of the backup vault to create.
    tags Map<String>
    Metadata that you can assign to help organize the resources that you create. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

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

    Arn string
    The ARN of the vault.
    Id string
    The provider-assigned unique ID for this managed resource.
    RecoveryPoints int
    The number of recovery points that are stored in a backup vault.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    The ARN of the vault.
    Id string
    The provider-assigned unique ID for this managed resource.
    RecoveryPoints int
    The number of recovery points that are stored in a backup vault.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The ARN of the vault.
    id String
    The provider-assigned unique ID for this managed resource.
    recoveryPoints Integer
    The number of recovery points that are stored in a backup vault.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    The ARN of the vault.
    id string
    The provider-assigned unique ID for this managed resource.
    recoveryPoints number
    The number of recovery points that are stored in a backup vault.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    The ARN of the vault.
    id str
    The provider-assigned unique ID for this managed resource.
    recovery_points int
    The number of recovery points that are stored in a backup vault.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The ARN of the vault.
    id String
    The provider-assigned unique ID for this managed resource.
    recoveryPoints Number
    The number of recovery points that are stored in a backup vault.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up Existing Vault Resource

    Get an existing Vault 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?: VaultState, opts?: CustomResourceOptions): Vault
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            force_destroy: Optional[bool] = None,
            kms_key_arn: Optional[str] = None,
            name: Optional[str] = None,
            recovery_points: Optional[int] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None) -> Vault
    func GetVault(ctx *Context, name string, id IDInput, state *VaultState, opts ...ResourceOption) (*Vault, error)
    public static Vault Get(string name, Input<string> id, VaultState? state, CustomResourceOptions? opts = null)
    public static Vault get(String name, Output<String> id, VaultState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Arn string
    The ARN of the vault.
    ForceDestroy bool
    A boolean that indicates that all recovery points stored in the vault are deleted so that the vault can be destroyed without error.
    KmsKeyArn string
    The server-side encryption key that is used to protect your backups.
    Name string
    Name of the backup vault to create.
    RecoveryPoints int
    The number of recovery points that are stored in a backup vault.
    Tags Dictionary<string, string>
    Metadata that you can assign to help organize the resources that you create. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    The ARN of the vault.
    ForceDestroy bool
    A boolean that indicates that all recovery points stored in the vault are deleted so that the vault can be destroyed without error.
    KmsKeyArn string
    The server-side encryption key that is used to protect your backups.
    Name string
    Name of the backup vault to create.
    RecoveryPoints int
    The number of recovery points that are stored in a backup vault.
    Tags map[string]string
    Metadata that you can assign to help organize the resources that you create. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The ARN of the vault.
    forceDestroy Boolean
    A boolean that indicates that all recovery points stored in the vault are deleted so that the vault can be destroyed without error.
    kmsKeyArn String
    The server-side encryption key that is used to protect your backups.
    name String
    Name of the backup vault to create.
    recoveryPoints Integer
    The number of recovery points that are stored in a backup vault.
    tags Map<String,String>
    Metadata that you can assign to help organize the resources that you create. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    The ARN of the vault.
    forceDestroy boolean
    A boolean that indicates that all recovery points stored in the vault are deleted so that the vault can be destroyed without error.
    kmsKeyArn string
    The server-side encryption key that is used to protect your backups.
    name string
    Name of the backup vault to create.
    recoveryPoints number
    The number of recovery points that are stored in a backup vault.
    tags {[key: string]: string}
    Metadata that you can assign to help organize the resources that you create. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    The ARN of the vault.
    force_destroy bool
    A boolean that indicates that all recovery points stored in the vault are deleted so that the vault can be destroyed without error.
    kms_key_arn str
    The server-side encryption key that is used to protect your backups.
    name str
    Name of the backup vault to create.
    recovery_points int
    The number of recovery points that are stored in a backup vault.
    tags Mapping[str, str]
    Metadata that you can assign to help organize the resources that you create. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The ARN of the vault.
    forceDestroy Boolean
    A boolean that indicates that all recovery points stored in the vault are deleted so that the vault can be destroyed without error.
    kmsKeyArn String
    The server-side encryption key that is used to protect your backups.
    name String
    Name of the backup vault to create.
    recoveryPoints Number
    The number of recovery points that are stored in a backup vault.
    tags Map<String>
    Metadata that you can assign to help organize the resources that you create. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Import

    Using pulumi import, import Backup vault using the name. For example:

    $ pulumi import aws:backup/vault:Vault test-vault TestVault
    

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

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi