Module backup
This page documents the language specification for the aws package. If you're looking for help working with the inputs, outputs, or functions of aws resources in a Pulumi program, please see the resource documentation for examples and API reference.
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the
pulumi/pulumi-awsrepo; however, if that doesn’t turn up anything, please consult the sourceterraform-providers/terraform-provider-awsrepo.
Resources
Functions
Others
- GetPlanArgs
- GetPlanResult
- GetSelectionArgs
- GetSelectionResult
- GetVaultArgs
- GetVaultResult
- PlanArgs
- PlanState
- SelectionArgs
- SelectionState
- VaultArgs
- VaultState
Resources
Resource Plan
class Plan extends CustomResourceProvides an AWS Backup plan resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.backup.Plan("example", {
rules: [{
ruleName: "tf_example_backup_rule",
schedule: "cron(0 12 * * ? *)",
targetVaultName: aws_backup_vault_test.name,
}],
});constructor
new Plan(name: string, args: PlanArgs, opts?: pulumi.CustomResourceOptions)Create a Plan resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: PlanState, opts?: pulumi.CustomResourceOptions): PlanGet an existing Plan resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is PlanReturns true if the given object is an instance of Plan. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property arn
public arn: pulumi.Output<string>;The ARN of the backup plan.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property name
public name: pulumi.Output<string>;The display name of a backup plan.
property rules
public rules: pulumi.Output<PlanRule[]>;A rule object that specifies a scheduled task that is used to back up a selection of resources.
property tags
public tags: pulumi.Output<{[key: string]: any} | undefined>;Metadata that you can assign to help organize the plans you create.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property version
public version: pulumi.Output<string>;Unique, randomly generated, Unicode, UTF-8 encoded string that serves as the version ID of the backup plan.
Resource Selection
class Selection extends CustomResourceManages selection conditions for AWS Backup plan resources.
Example Usage
IAM Role
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleRole = new aws.iam.Role("example", {
assumeRolePolicy: `{
"Version": "2012-10-17",
"Statement": [
{
"Action": ["sts:AssumeRole"],
"Effect": "allow",
"Principal": {
"Service": ["backup.amazonaws.com"]
}
}
]
}
`,
});
const exampleRolePolicyAttachment = new aws.iam.RolePolicyAttachment("example", {
policyArn: "arn:aws:iam::aws:policy/service-role/AWSBackupServiceRolePolicyForBackup",
role: exampleRole.name,
});
const exampleSelection = new aws.backup.Selection("example", {
iamRoleArn: exampleRole.arn,
});Selecting Backups By Tag
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.backup.Selection("example", {
iamRoleArn: aws_iam_role_example.arn,
planId: aws_backup_plan_example.id,
selectionTags: [{
key: "foo",
type: "STRINGEQUALS",
value: "bar",
}],
});Selecting Backups By Resource
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.backup.Selection("example", {
iamRoleArn: aws_iam_role_example.arn,
planId: aws_backup_plan_example.id,
resources: [
aws_db_instance_example.arn,
aws_ebs_volume_example.arn,
aws_efs_file_system_example.arn,
],
});constructor
new Selection(name: string, args: SelectionArgs, opts?: pulumi.CustomResourceOptions)Create a Selection resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SelectionState, opts?: pulumi.CustomResourceOptions): SelectionGet an existing Selection resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is SelectionReturns true if the given object is an instance of Selection. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property iamRoleArn
public iamRoleArn: pulumi.Output<string>;The ARN of the IAM role that AWS Backup uses to authenticate when restoring and backing up the target resource. See the AWS Backup Developer Guide for additional information about using AWS managed policies or creating custom policies attached to the IAM role.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property name
public name: pulumi.Output<string>;The display name of a resource selection document.
property planId
public planId: pulumi.Output<string>;The backup plan ID to be associated with the selection of resources.
property resources
public resources: pulumi.Output<string[] | undefined>;An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to assign to a backup plan..
property selectionTags
public selectionTags: pulumi.Output<SelectionSelectionTag[] | undefined>;Tag-based conditions used to specify a set of resources to assign to a backup plan.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Vault
class Vault extends CustomResourceProvides 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", {
kmsKeyArn: aws_kms_key_example.arn,
});constructor
new Vault(name: string, args?: VaultArgs, opts?: pulumi.CustomResourceOptions)Create a Vault resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: VaultState, opts?: pulumi.CustomResourceOptions): VaultGet an existing Vault resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is VaultReturns true if the given object is an instance of Vault. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property arn
public arn: pulumi.Output<string>;The ARN of the vault.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property kmsKeyArn
public kmsKeyArn: pulumi.Output<string>;The server-side encryption key that is used to protect your backups.
property name
public name: pulumi.Output<string>;Name of the backup vault to create.
property recoveryPoints
public recoveryPoints: pulumi.Output<number>;The number of recovery points that are stored in a backup vault.
property tags
public tags: pulumi.Output<{[key: string]: any} | undefined>;Metadata that you can assign to help organize the resources that you create.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Functions
Function getPlan
getPlan(args: GetPlanArgs, opts?: pulumi.InvokeOptions): Promise<GetPlanResult>Use this data source to get information on an existing backup plan.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = pulumi.output(aws.backup.getPlan({
planId: "tf_example_backup_plan_id",
}, { async: true }));Function getSelection
getSelection(args: GetSelectionArgs, opts?: pulumi.InvokeOptions): Promise<GetSelectionResult>Use this data source to get information on an existing backup selection.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws_backup_plan_example.id.apply(id => aws.backup.getSelection({
planId: id,
selectionId: "selection-id-example",
}, { async: true }));Function getVault
getVault(args: GetVaultArgs, opts?: pulumi.InvokeOptions): Promise<GetVaultResult>Use this data source to get information on an existing backup vault.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = pulumi.output(aws.backup.getVault({
name: "example_backup_vault",
}, { async: true }));Others
interface GetPlanArgs
interface GetPlanArgsA collection of arguments for invoking getPlan.
property planId
planId: string;The backup plan ID.
property tags
tags?: undefined | {[key: string]: any};Metadata that you can assign to help organize the plans you create.
interface GetPlanResult
interface GetPlanResultA collection of values returned by getPlan.
property arn
arn: string;The ARN of the backup plan.
property id
id: string;The provider-assigned unique ID for this managed resource.
property name
name: string;The display name of a backup plan.
property planId
planId: string;property tags
tags: {[key: string]: any};Metadata that you can assign to help organize the plans you create.
property version
version: string;Unique, randomly generated, Unicode, UTF-8 encoded string that serves as the version ID of the backup plan.
interface GetSelectionArgs
interface GetSelectionArgsA collection of arguments for invoking getSelection.
property planId
planId: string;The backup plan ID associated with the selection of resources.
property selectionId
selectionId: string;The backup selection ID.
interface GetSelectionResult
interface GetSelectionResultA collection of values returned by getSelection.
property iamRoleArn
iamRoleArn: string;The ARN of the IAM role that AWS Backup uses to authenticate when restoring and backing up the target resource. See the AWS Backup Developer Guide for additional information about using AWS managed policies or creating custom policies attached to the IAM role.
property id
id: string;The provider-assigned unique ID for this managed resource.
property name
name: string;The display name of a resource selection document.
property planId
planId: string;property resources
resources: string[];An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to assign to a backup plan..
property selectionId
selectionId: string;interface GetVaultArgs
interface GetVaultArgsA collection of arguments for invoking getVault.
property name
name: string;The name of the backup vault.
property tags
tags?: undefined | {[key: string]: any};Metadata that you can assign to help organize the resources that you create.
interface GetVaultResult
interface GetVaultResultA collection of values returned by getVault.
property arn
arn: string;The ARN of the vault.
property id
id: string;The provider-assigned unique ID for this managed resource.
property kmsKeyArn
kmsKeyArn: string;The server-side encryption key that is used to protect your backups.
property name
name: string;property recoveryPoints
recoveryPoints: number;The number of recovery points that are stored in a backup vault.
property tags
tags: {[key: string]: any};Metadata that you can assign to help organize the resources that you create.
interface PlanArgs
interface PlanArgsThe set of arguments for constructing a Plan resource.
property name
name?: pulumi.Input<string>;The display name of a backup plan.
property rules
rules: pulumi.Input<pulumi.Input<PlanRule>[]>;A rule object that specifies a scheduled task that is used to back up a selection of resources.
property tags
tags?: pulumi.Input<{[key: string]: any}>;Metadata that you can assign to help organize the plans you create.
interface PlanState
interface PlanStateInput properties used for looking up and filtering Plan resources.
property arn
arn?: pulumi.Input<string>;The ARN of the backup plan.
property name
name?: pulumi.Input<string>;The display name of a backup plan.
property rules
rules?: pulumi.Input<pulumi.Input<PlanRule>[]>;A rule object that specifies a scheduled task that is used to back up a selection of resources.
property tags
tags?: pulumi.Input<{[key: string]: any}>;Metadata that you can assign to help organize the plans you create.
property version
version?: pulumi.Input<string>;Unique, randomly generated, Unicode, UTF-8 encoded string that serves as the version ID of the backup plan.
interface SelectionArgs
interface SelectionArgsThe set of arguments for constructing a Selection resource.
property iamRoleArn
iamRoleArn: pulumi.Input<string>;The ARN of the IAM role that AWS Backup uses to authenticate when restoring and backing up the target resource. See the AWS Backup Developer Guide for additional information about using AWS managed policies or creating custom policies attached to the IAM role.
property name
name?: pulumi.Input<string>;The display name of a resource selection document.
property planId
planId: pulumi.Input<string>;The backup plan ID to be associated with the selection of resources.
property resources
resources?: pulumi.Input<pulumi.Input<string>[]>;An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to assign to a backup plan..
property selectionTags
selectionTags?: pulumi.Input<pulumi.Input<SelectionSelectionTag>[]>;Tag-based conditions used to specify a set of resources to assign to a backup plan.
interface SelectionState
interface SelectionStateInput properties used for looking up and filtering Selection resources.
property iamRoleArn
iamRoleArn?: pulumi.Input<string>;The ARN of the IAM role that AWS Backup uses to authenticate when restoring and backing up the target resource. See the AWS Backup Developer Guide for additional information about using AWS managed policies or creating custom policies attached to the IAM role.
property name
name?: pulumi.Input<string>;The display name of a resource selection document.
property planId
planId?: pulumi.Input<string>;The backup plan ID to be associated with the selection of resources.
property resources
resources?: pulumi.Input<pulumi.Input<string>[]>;An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to assign to a backup plan..
property selectionTags
selectionTags?: pulumi.Input<pulumi.Input<SelectionSelectionTag>[]>;Tag-based conditions used to specify a set of resources to assign to a backup plan.
interface VaultArgs
interface VaultArgsThe set of arguments for constructing a Vault resource.
property kmsKeyArn
kmsKeyArn?: pulumi.Input<string>;The server-side encryption key that is used to protect your backups.
property name
name?: pulumi.Input<string>;Name of the backup vault to create.
property tags
tags?: pulumi.Input<{[key: string]: any}>;Metadata that you can assign to help organize the resources that you create.
interface VaultState
interface VaultStateInput properties used for looking up and filtering Vault resources.
property arn
arn?: pulumi.Input<string>;The ARN of the vault.
property kmsKeyArn
kmsKeyArn?: pulumi.Input<string>;The server-side encryption key that is used to protect your backups.
property name
name?: pulumi.Input<string>;Name of the backup vault to create.
property recoveryPoints
recoveryPoints?: pulumi.Input<number>;The number of recovery points that are stored in a backup vault.
property tags
tags?: pulumi.Input<{[key: string]: any}>;Metadata that you can assign to help organize the resources that you create.