1. Packages
  2. AWS
  3. API Docs
  4. backup
  5. Vault
AWS v6.78.0 published on Thursday, Apr 24, 2025 by Pulumi

aws.backup.Vault

Explore with Pulumi AI

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,
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.backup.Vault("example",
    name="example_backup_vault",
    kms_key_arn=example_aws_kms_key["arn"])
Copy
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
	})
}
Copy
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,
    });

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

    }
}
Copy
resources:
  example:
    type: aws:backup:Vault
    properties:
      name: example_backup_vault
      kmsKeyArn: ${exampleAwsKmsKey.arn}
Copy

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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. String
The unique name of the resource.
args This property is required. 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" },
    },
});
Copy
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"),
	},
})
Copy
var vaultResource = new com.pulumi.aws.backup.Vault("vaultResource", com.pulumi.aws.backup.VaultArgs.builder()
    .forceDestroy(false)
    .kmsKeyArn("string")
    .name("string")
    .tags(Map.of("string", "string"))
    .build());
Copy
vault_resource = aws.backup.Vault("vaultResource",
    force_destroy=False,
    kms_key_arn="string",
    name="string",
    tags={
        "string": "string",
    })
Copy
const vaultResource = new aws.backup.Vault("vaultResource", {
    forceDestroy: false,
    kmsKeyArn: "string",
    name: "string",
    tags: {
        string: "string",
    },
});
Copy
type: aws:backup:Vault
properties:
    forceDestroy: false
    kmsKeyArn: string
    name: string
    tags:
        string: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

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 Changes to this property will trigger replacement. string
The server-side encryption key that is used to protect your backups.
Name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The server-side encryption key that is used to protect your backups.
Name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The server-side encryption key that is used to protect your backups.
name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The server-side encryption key that is used to protect your backups.
name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. str
The server-side encryption key that is used to protect your backups.
name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The server-side encryption key that is used to protect your backups.
name Changes to this property will trigger replacement. 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)
resources:  _:    type: aws:backup:Vault    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:
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 Changes to this property will trigger replacement. string
The server-side encryption key that is used to protect your backups.
Name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The server-side encryption key that is used to protect your backups.
Name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The server-side encryption key that is used to protect your backups.
name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The server-side encryption key that is used to protect your backups.
name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. str
The server-side encryption key that is used to protect your backups.
name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The server-side encryption key that is used to protect your backups.
name Changes to this property will trigger replacement. 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
Copy

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.