Plan

Provides an AWS Backup plan resource.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Backup.Plan("example", new Aws.Backup.PlanArgs
        {
            Rules = 
            {
                new Aws.Backup.Inputs.PlanRuleArgs
                {
                    RuleName = "tf_example_backup_rule",
                    Schedule = "cron(0 12 * * ? *)",
                    TargetVaultName = aws_backup_vault.Test.Name,
                },
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/backup"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := backup.NewPlan(ctx, "example", &backup.PlanArgs{
            Rules: backup.PlanRuleArray{
                &backup.PlanRuleArgs{
                    RuleName:        pulumi.String("tf_example_backup_rule"),
                    Schedule:        pulumi.String("cron(0 12 * * ? *)"),
                    TargetVaultName: pulumi.String(aws_backup_vault.Test.Name),
                },
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.backup.Plan("example", rules=[{
    "rule_name": "tf_example_backup_rule",
    "schedule": "cron(0 12 * * ? *)",
    "targetVaultName": aws_backup_vault["test"]["name"],
}])
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,
    }],
});

Create a Plan Resource

new Plan(name: string, args: PlanArgs, opts?: CustomResourceOptions);
def Plan(resource_name, opts=None, name=None, rules=None, tags=None, __props__=None);
func NewPlan(ctx *Context, name string, args PlanArgs, opts ...ResourceOption) (*Plan, error)
public Plan(string name, PlanArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args PlanArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args PlanArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args PlanArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Plan Resource Properties

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

Inputs

The Plan resource accepts the following input properties:

Rules List<PlanRuleArgs>

A rule object that specifies a scheduled task that is used to back up a selection of resources.

Name string

The display name of a backup plan.

Tags Dictionary<string, string>

Metadata that you can assign to help organize the plans you create.

Rules []PlanRule

A rule object that specifies a scheduled task that is used to back up a selection of resources.

Name string

The display name of a backup plan.

Tags map[string]string

Metadata that you can assign to help organize the plans you create.

rules PlanRule[]

A rule object that specifies a scheduled task that is used to back up a selection of resources.

name string

The display name of a backup plan.

tags {[key: string]: string}

Metadata that you can assign to help organize the plans you create.

rules List[PlanRule]

A rule object that specifies a scheduled task that is used to back up a selection of resources.

name str

The display name of a backup plan.

tags Dict[str, str]

Metadata that you can assign to help organize the plans you create.

Outputs

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

Arn string

The ARN of the backup plan.

Id string
The provider-assigned unique ID for this managed resource.
Version string

Unique, randomly generated, Unicode, UTF-8 encoded string that serves as the version ID of the backup plan.

Arn string

The ARN of the backup plan.

Id string
The provider-assigned unique ID for this managed resource.
Version string

Unique, randomly generated, Unicode, UTF-8 encoded string that serves as the version ID of the backup plan.

arn string

The ARN of the backup plan.

id string
The provider-assigned unique ID for this managed resource.
version string

Unique, randomly generated, Unicode, UTF-8 encoded string that serves as the version ID of the backup plan.

arn str

The ARN of the backup plan.

id str
The provider-assigned unique ID for this managed resource.
version str

Unique, randomly generated, Unicode, UTF-8 encoded string that serves as the version ID of the backup plan.

Look up an Existing Plan Resource

Get an existing Plan 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?: PlanState, opts?: CustomResourceOptions): Plan
static get(resource_name, id, opts=None, arn=None, name=None, rules=None, tags=None, version=None, __props__=None);
func GetPlan(ctx *Context, name string, id IDInput, state *PlanState, opts ...ResourceOption) (*Plan, error)
public static Plan Get(string name, Input<string> id, PlanState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Arn string

The ARN of the backup plan.

Name string

The display name of a backup plan.

Rules List<PlanRuleArgs>

A rule object that specifies a scheduled task that is used to back up a selection of resources.

Tags Dictionary<string, string>

Metadata that you can assign to help organize the plans you create.

Version string

Unique, randomly generated, Unicode, UTF-8 encoded string that serves as the version ID of the backup plan.

Arn string

The ARN of the backup plan.

Name string

The display name of a backup plan.

Rules []PlanRule

A rule object that specifies a scheduled task that is used to back up a selection of resources.

Tags map[string]string

Metadata that you can assign to help organize the plans you create.

Version string

Unique, randomly generated, Unicode, UTF-8 encoded string that serves as the version ID of the backup plan.

arn string

The ARN of the backup plan.

name string

The display name of a backup plan.

rules PlanRule[]

A rule object that specifies a scheduled task that is used to back up a selection of resources.

tags {[key: string]: string}

Metadata that you can assign to help organize the plans you create.

version string

Unique, randomly generated, Unicode, UTF-8 encoded string that serves as the version ID of the backup plan.

arn str

The ARN of the backup plan.

name str

The display name of a backup plan.

rules List[PlanRule]

A rule object that specifies a scheduled task that is used to back up a selection of resources.

tags Dict[str, str]

Metadata that you can assign to help organize the plans you create.

version str

Unique, randomly generated, Unicode, UTF-8 encoded string that serves as the version ID of the backup plan.

Supporting Types

PlanRule

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

RuleName string

An display name for a backup rule.

TargetVaultName string

The name of a logical container where backups are stored.

CompletionWindow int

The amount of time AWS Backup attempts a backup before canceling the job and returning an error.

CopyActions List<PlanRuleCopyActionArgs>

Configuration block(s) with copy operation settings. Detailed below.

Lifecycle PlanRuleLifecycleArgs

The lifecycle defines when a protected resource is copied over to a backup vault and when it expires. Fields documented above.

RecoveryPointTags Dictionary<string, string>

Metadata that you can assign to help organize the resources that you create.

Schedule string

A CRON expression specifying when AWS Backup initiates a backup job.

StartWindow int

The amount of time in minutes before beginning a backup.

RuleName string

An display name for a backup rule.

TargetVaultName string

The name of a logical container where backups are stored.

CompletionWindow int

The amount of time AWS Backup attempts a backup before canceling the job and returning an error.

CopyActions []PlanRuleCopyAction

Configuration block(s) with copy operation settings. Detailed below.

Lifecycle PlanRuleLifecycle

The lifecycle defines when a protected resource is copied over to a backup vault and when it expires. Fields documented above.

RecoveryPointTags map[string]string

Metadata that you can assign to help organize the resources that you create.

Schedule string

A CRON expression specifying when AWS Backup initiates a backup job.

StartWindow int

The amount of time in minutes before beginning a backup.

ruleName string

An display name for a backup rule.

targetVaultName string

The name of a logical container where backups are stored.

completionWindow number

The amount of time AWS Backup attempts a backup before canceling the job and returning an error.

copyActions PlanRuleCopyAction[]

Configuration block(s) with copy operation settings. Detailed below.

lifecycle PlanRuleLifecycle

The lifecycle defines when a protected resource is copied over to a backup vault and when it expires. Fields documented above.

recoveryPointTags {[key: string]: string}

Metadata that you can assign to help organize the resources that you create.

schedule string

A CRON expression specifying when AWS Backup initiates a backup job.

startWindow number

The amount of time in minutes before beginning a backup.

rule_name str

An display name for a backup rule.

targetVaultName str

The name of a logical container where backups are stored.

completionWindow float

The amount of time AWS Backup attempts a backup before canceling the job and returning an error.

copyActions List[PlanRuleCopyAction]

Configuration block(s) with copy operation settings. Detailed below.

lifecycle Dict[PlanRuleLifecycle]

The lifecycle defines when a protected resource is copied over to a backup vault and when it expires. Fields documented above.

recoveryPointTags Dict[str, str]

Metadata that you can assign to help organize the resources that you create.

schedule str

A CRON expression specifying when AWS Backup initiates a backup job.

startWindow float

The amount of time in minutes before beginning a backup.

PlanRuleCopyAction

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

DestinationVaultArn string

An Amazon Resource Name (ARN) that uniquely identifies the destination backup vault for the copied backup.

Lifecycle PlanRuleCopyActionLifecycleArgs

The lifecycle defines when a protected resource is copied over to a backup vault and when it expires. Fields documented above.

DestinationVaultArn string

An Amazon Resource Name (ARN) that uniquely identifies the destination backup vault for the copied backup.

Lifecycle PlanRuleCopyActionLifecycle

The lifecycle defines when a protected resource is copied over to a backup vault and when it expires. Fields documented above.

destinationVaultArn string

An Amazon Resource Name (ARN) that uniquely identifies the destination backup vault for the copied backup.

lifecycle PlanRuleCopyActionLifecycle

The lifecycle defines when a protected resource is copied over to a backup vault and when it expires. Fields documented above.

destinationVaultArn str

An Amazon Resource Name (ARN) that uniquely identifies the destination backup vault for the copied backup.

lifecycle Dict[PlanRuleCopyActionLifecycle]

The lifecycle defines when a protected resource is copied over to a backup vault and when it expires. Fields documented above.

PlanRuleCopyActionLifecycle

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

ColdStorageAfter int

Specifies the number of days after creation that a recovery point is moved to cold storage.

DeleteAfter int

Specifies the number of days after creation that a recovery point is deleted. Must be 90 days greater than cold_storage_after.

ColdStorageAfter int

Specifies the number of days after creation that a recovery point is moved to cold storage.

DeleteAfter int

Specifies the number of days after creation that a recovery point is deleted. Must be 90 days greater than cold_storage_after.

coldStorageAfter number

Specifies the number of days after creation that a recovery point is moved to cold storage.

deleteAfter number

Specifies the number of days after creation that a recovery point is deleted. Must be 90 days greater than cold_storage_after.

coldStorageAfter float

Specifies the number of days after creation that a recovery point is moved to cold storage.

deleteAfter float

Specifies the number of days after creation that a recovery point is deleted. Must be 90 days greater than cold_storage_after.

PlanRuleLifecycle

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

ColdStorageAfter int

Specifies the number of days after creation that a recovery point is moved to cold storage.

DeleteAfter int

Specifies the number of days after creation that a recovery point is deleted. Must be 90 days greater than cold_storage_after.

ColdStorageAfter int

Specifies the number of days after creation that a recovery point is moved to cold storage.

DeleteAfter int

Specifies the number of days after creation that a recovery point is deleted. Must be 90 days greater than cold_storage_after.

coldStorageAfter number

Specifies the number of days after creation that a recovery point is moved to cold storage.

deleteAfter number

Specifies the number of days after creation that a recovery point is deleted. Must be 90 days greater than cold_storage_after.

coldStorageAfter float

Specifies the number of days after creation that a recovery point is moved to cold storage.

deleteAfter float

Specifies the number of days after creation that a recovery point is deleted. Must be 90 days greater than cold_storage_after.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.