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);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<Plan
Rule Args> 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.
- Dictionary<string, string>
Metadata that you can assign to help organize the plans you create.
- Rules
[]Plan
Rule 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.
- map[string]string
Metadata that you can assign to help organize the plans you create.
- rules
Plan
Rule[] 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.
- {[key: string]: string}
Metadata that you can assign to help organize the plans you create.
- rules
List[Plan
Rule] 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.
- 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:
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): Planstatic get(resource_name, id, opts=None, arn=None, name=None, rules=None, tags=None, version=None, __props__=None);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<Plan
Rule Args> A rule object that specifies a scheduled task that is used to back up a selection of resources.
- 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
[]Plan
Rule A rule object that specifies a scheduled task that is used to back up a selection of resources.
- 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
Plan
Rule[] A rule object that specifies a scheduled task that is used to back up a selection of resources.
- {[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[Plan
Rule] A rule object that specifies a scheduled task that is used to back up a selection of resources.
- 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
- Rule
Name string An display name for a backup rule.
- Target
Vault stringName The name of a logical container where backups are stored.
- Completion
Window int The amount of time AWS Backup attempts a backup before canceling the job and returning an error.
- Copy
Actions List<PlanRule Copy Action Args> Configuration block(s) with copy operation settings. Detailed below.
- Lifecycle
Plan
Rule Lifecycle Args The lifecycle defines when a protected resource is copied over to a backup vault and when it expires. Fields documented above.
- 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.
- Start
Window int The amount of time in minutes before beginning a backup.
- Rule
Name string An display name for a backup rule.
- Target
Vault stringName The name of a logical container where backups are stored.
- Completion
Window int The amount of time AWS Backup attempts a backup before canceling the job and returning an error.
- Copy
Actions []PlanRule Copy Action Configuration block(s) with copy operation settings. Detailed below.
- Lifecycle
Plan
Rule Lifecycle The lifecycle defines when a protected resource is copied over to a backup vault and when it expires. Fields documented above.
- 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.
- Start
Window int The amount of time in minutes before beginning a backup.
- rule
Name string An display name for a backup rule.
- target
Vault stringName The name of a logical container where backups are stored.
- completion
Window number The amount of time AWS Backup attempts a backup before canceling the job and returning an error.
- copy
Actions PlanRule Copy Action[] Configuration block(s) with copy operation settings. Detailed below.
- lifecycle
Plan
Rule Lifecycle The lifecycle defines when a protected resource is copied over to a backup vault and when it expires. Fields documented above.
- {[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.
- start
Window number The amount of time in minutes before beginning a backup.
- rule_
name str An display name for a backup rule.
- target
Vault strName The name of a logical container where backups are stored.
- completion
Window float The amount of time AWS Backup attempts a backup before canceling the job and returning an error.
- copy
Actions List[PlanRule Copy Action] Configuration block(s) with copy operation settings. Detailed below.
- lifecycle
Dict[Plan
Rule Lifecycle] The lifecycle defines when a protected resource is copied over to a backup vault and when it expires. Fields documented above.
- 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.
- start
Window float The amount of time in minutes before beginning a backup.
PlanRuleCopyAction
- Destination
Vault stringArn An Amazon Resource Name (ARN) that uniquely identifies the destination backup vault for the copied backup.
- Lifecycle
Plan
Rule Copy Action Lifecycle Args The lifecycle defines when a protected resource is copied over to a backup vault and when it expires. Fields documented above.
- Destination
Vault stringArn An Amazon Resource Name (ARN) that uniquely identifies the destination backup vault for the copied backup.
- Lifecycle
Plan
Rule Copy Action Lifecycle The lifecycle defines when a protected resource is copied over to a backup vault and when it expires. Fields documented above.
- destination
Vault stringArn An Amazon Resource Name (ARN) that uniquely identifies the destination backup vault for the copied backup.
- lifecycle
Plan
Rule Copy Action Lifecycle The lifecycle defines when a protected resource is copied over to a backup vault and when it expires. Fields documented above.
- destination
Vault strArn An Amazon Resource Name (ARN) that uniquely identifies the destination backup vault for the copied backup.
- lifecycle
Dict[Plan
Rule Copy Action Lifecycle] The lifecycle defines when a protected resource is copied over to a backup vault and when it expires. Fields documented above.
PlanRuleCopyActionLifecycle
- Cold
Storage intAfter Specifies the number of days after creation that a recovery point is moved to cold storage.
- Delete
After int Specifies the number of days after creation that a recovery point is deleted. Must be 90 days greater than
cold_storage_after.
- Cold
Storage intAfter Specifies the number of days after creation that a recovery point is moved to cold storage.
- Delete
After int Specifies the number of days after creation that a recovery point is deleted. Must be 90 days greater than
cold_storage_after.
- cold
Storage numberAfter Specifies the number of days after creation that a recovery point is moved to cold storage.
- delete
After number Specifies the number of days after creation that a recovery point is deleted. Must be 90 days greater than
cold_storage_after.
- cold
Storage floatAfter Specifies the number of days after creation that a recovery point is moved to cold storage.
- delete
After float Specifies the number of days after creation that a recovery point is deleted. Must be 90 days greater than
cold_storage_after.
PlanRuleLifecycle
- Cold
Storage intAfter Specifies the number of days after creation that a recovery point is moved to cold storage.
- Delete
After int Specifies the number of days after creation that a recovery point is deleted. Must be 90 days greater than
cold_storage_after.
- Cold
Storage intAfter Specifies the number of days after creation that a recovery point is moved to cold storage.
- Delete
After int Specifies the number of days after creation that a recovery point is deleted. Must be 90 days greater than
cold_storage_after.
- cold
Storage numberAfter Specifies the number of days after creation that a recovery point is moved to cold storage.
- delete
After number Specifies the number of days after creation that a recovery point is deleted. Must be 90 days greater than
cold_storage_after.
- cold
Storage floatAfter Specifies the number of days after creation that a recovery point is moved to cold storage.
- delete
After 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
awsTerraform Provider.