Try AWS Native preview for resources not in the classic version.
aws.backup.Vault
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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)
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:
- 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 stringArn - The server-side encryption key that is used to protect your backups.
- Name string
- Name of the backup vault to create.
- 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.
- 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 stringArn - The server-side encryption key that is used to protect your backups.
- Name string
- Name of the backup vault to create.
- 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.
- force
Destroy Boolean - 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 StringArn - The server-side encryption key that is used to protect your backups.
- name String
- Name of the backup vault to create.
- 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.
- force
Destroy boolean - 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 stringArn - The server-side encryption key that is used to protect your backups.
- name string
- Name of the backup vault to create.
- {[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_ strarn - The server-side encryption key that is used to protect your backups.
- name str
- Name of the backup vault to create.
- 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.
- force
Destroy Boolean - 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 StringArn - The server-side encryption key that is used to protect your backups.
- name String
- Name of the backup vault to create.
- 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.
- Recovery
Points int - The number of recovery points that are stored in a backup vault.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- The ARN of the vault.
- Id string
- The provider-assigned unique ID for this managed resource.
- Recovery
Points int - The number of recovery points that are stored in a backup vault.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The ARN of the vault.
- id String
- The provider-assigned unique ID for this managed resource.
- recovery
Points Integer - The number of recovery points that are stored in a backup vault.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- The ARN of the vault.
- id string
- The provider-assigned unique ID for this managed resource.
- recovery
Points number - The number of recovery points that are stored in a backup vault.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- 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.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The ARN of the vault.
- id String
- The provider-assigned unique ID for this managed resource.
- recovery
Points Number - The number of recovery points that are stored in a backup vault.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
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.
- Arn string
- 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 stringArn - The server-side encryption key that is used to protect your backups.
- Name string
- Name of the backup vault to create.
- Recovery
Points int - The number of recovery points that are stored in a backup vault.
- 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. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- 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 stringArn - The server-side encryption key that is used to protect your backups.
- Name string
- Name of the backup vault to create.
- Recovery
Points int - The number of recovery points that are stored in a backup vault.
- 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. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The ARN of the vault.
- force
Destroy Boolean - 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 StringArn - The server-side encryption key that is used to protect your backups.
- name String
- Name of the backup vault to create.
- recovery
Points Integer - The number of recovery points that are stored in a backup vault.
- 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. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- The ARN of the vault.
- force
Destroy boolean - 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 stringArn - The server-side encryption key that is used to protect your backups.
- name string
- Name of the backup vault to create.
- recovery
Points number - The number of recovery points that are stored in a backup vault.
- {[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. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- 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_ strarn - 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.
- 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. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The ARN of the vault.
- force
Destroy Boolean - 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 StringArn - The server-side encryption key that is used to protect your backups.
- name String
- Name of the backup vault to create.
- recovery
Points Number - The number of recovery points that are stored in a backup vault.
- 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. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
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.
Try AWS Native preview for resources not in the classic version.