aws.backup.RestoreTestingPlan
Explore with Pulumi AI
Resource for managing an AWS Backup Restore Testing Plan.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.backup.RestoreTestingPlan("example", {
recoveryPointSelection: {
algorithm: "LATEST_WITHIN_WINDOW",
includeVaults: ["*"],
recoveryPointTypes: ["CONTINUOUS"],
},
scheduleExpression: "cron(0 12 ? * * *)",
});
import pulumi
import pulumi_aws as aws
example = aws.backup.RestoreTestingPlan("example",
recovery_point_selection={
"algorithm": "LATEST_WITHIN_WINDOW",
"include_vaults": ["*"],
"recovery_point_types": ["CONTINUOUS"],
},
schedule_expression="cron(0 12 ? * * *)")
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.NewRestoreTestingPlan(ctx, "example", &backup.RestoreTestingPlanArgs{
RecoveryPointSelection: &backup.RestoreTestingPlanRecoveryPointSelectionArgs{
Algorithm: pulumi.String("LATEST_WITHIN_WINDOW"),
IncludeVaults: pulumi.StringArray{
pulumi.String("*"),
},
RecoveryPointTypes: pulumi.StringArray{
pulumi.String("CONTINUOUS"),
},
},
ScheduleExpression: pulumi.String("cron(0 12 ? * * *)"),
})
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.RestoreTestingPlan("example", new()
{
RecoveryPointSelection = new Aws.Backup.Inputs.RestoreTestingPlanRecoveryPointSelectionArgs
{
Algorithm = "LATEST_WITHIN_WINDOW",
IncludeVaults = new[]
{
"*",
},
RecoveryPointTypes = new[]
{
"CONTINUOUS",
},
},
ScheduleExpression = "cron(0 12 ? * * *)",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.backup.RestoreTestingPlan;
import com.pulumi.aws.backup.RestoreTestingPlanArgs;
import com.pulumi.aws.backup.inputs.RestoreTestingPlanRecoveryPointSelectionArgs;
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 RestoreTestingPlan("example", RestoreTestingPlanArgs.builder()
.recoveryPointSelection(RestoreTestingPlanRecoveryPointSelectionArgs.builder()
.algorithm("LATEST_WITHIN_WINDOW")
.includeVaults("*")
.recoveryPointTypes("CONTINUOUS")
.build())
.scheduleExpression("cron(0 12 ? * * *)")
.build());
}
}
resources:
example:
type: aws:backup:RestoreTestingPlan
properties:
recoveryPointSelection:
algorithm: LATEST_WITHIN_WINDOW
includeVaults:
- '*'
recoveryPointTypes:
- CONTINUOUS
scheduleExpression: cron(0 12 ? * * *)
Create RestoreTestingPlan Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RestoreTestingPlan(name: string, args: RestoreTestingPlanArgs, opts?: CustomResourceOptions);
@overload
def RestoreTestingPlan(resource_name: str,
args: RestoreTestingPlanArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RestoreTestingPlan(resource_name: str,
opts: Optional[ResourceOptions] = None,
schedule_expression: Optional[str] = None,
name: Optional[str] = None,
recovery_point_selection: Optional[RestoreTestingPlanRecoveryPointSelectionArgs] = None,
schedule_expression_timezone: Optional[str] = None,
start_window_hours: Optional[int] = None,
tags: Optional[Mapping[str, str]] = None)
func NewRestoreTestingPlan(ctx *Context, name string, args RestoreTestingPlanArgs, opts ...ResourceOption) (*RestoreTestingPlan, error)
public RestoreTestingPlan(string name, RestoreTestingPlanArgs args, CustomResourceOptions? opts = null)
public RestoreTestingPlan(String name, RestoreTestingPlanArgs args)
public RestoreTestingPlan(String name, RestoreTestingPlanArgs args, CustomResourceOptions options)
type: aws:backup:RestoreTestingPlan
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 RestoreTestingPlanArgs
- 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 RestoreTestingPlanArgs
- 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 RestoreTestingPlanArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RestoreTestingPlanArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RestoreTestingPlanArgs
- 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 restoreTestingPlanResource = new Aws.Backup.RestoreTestingPlan("restoreTestingPlanResource", new()
{
ScheduleExpression = "string",
Name = "string",
RecoveryPointSelection = new Aws.Backup.Inputs.RestoreTestingPlanRecoveryPointSelectionArgs
{
Algorithm = "string",
IncludeVaults = new[]
{
"string",
},
RecoveryPointTypes = new[]
{
"string",
},
ExcludeVaults = new[]
{
"string",
},
SelectionWindowDays = 0,
},
ScheduleExpressionTimezone = "string",
StartWindowHours = 0,
Tags =
{
{ "string", "string" },
},
});
example, err := backup.NewRestoreTestingPlan(ctx, "restoreTestingPlanResource", &backup.RestoreTestingPlanArgs{
ScheduleExpression: pulumi.String("string"),
Name: pulumi.String("string"),
RecoveryPointSelection: &backup.RestoreTestingPlanRecoveryPointSelectionArgs{
Algorithm: pulumi.String("string"),
IncludeVaults: pulumi.StringArray{
pulumi.String("string"),
},
RecoveryPointTypes: pulumi.StringArray{
pulumi.String("string"),
},
ExcludeVaults: pulumi.StringArray{
pulumi.String("string"),
},
SelectionWindowDays: pulumi.Int(0),
},
ScheduleExpressionTimezone: pulumi.String("string"),
StartWindowHours: pulumi.Int(0),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var restoreTestingPlanResource = new RestoreTestingPlan("restoreTestingPlanResource", RestoreTestingPlanArgs.builder()
.scheduleExpression("string")
.name("string")
.recoveryPointSelection(RestoreTestingPlanRecoveryPointSelectionArgs.builder()
.algorithm("string")
.includeVaults("string")
.recoveryPointTypes("string")
.excludeVaults("string")
.selectionWindowDays(0)
.build())
.scheduleExpressionTimezone("string")
.startWindowHours(0)
.tags(Map.of("string", "string"))
.build());
restore_testing_plan_resource = aws.backup.RestoreTestingPlan("restoreTestingPlanResource",
schedule_expression="string",
name="string",
recovery_point_selection={
"algorithm": "string",
"include_vaults": ["string"],
"recovery_point_types": ["string"],
"exclude_vaults": ["string"],
"selection_window_days": 0,
},
schedule_expression_timezone="string",
start_window_hours=0,
tags={
"string": "string",
})
const restoreTestingPlanResource = new aws.backup.RestoreTestingPlan("restoreTestingPlanResource", {
scheduleExpression: "string",
name: "string",
recoveryPointSelection: {
algorithm: "string",
includeVaults: ["string"],
recoveryPointTypes: ["string"],
excludeVaults: ["string"],
selectionWindowDays: 0,
},
scheduleExpressionTimezone: "string",
startWindowHours: 0,
tags: {
string: "string",
},
});
type: aws:backup:RestoreTestingPlan
properties:
name: string
recoveryPointSelection:
algorithm: string
excludeVaults:
- string
includeVaults:
- string
recoveryPointTypes:
- string
selectionWindowDays: 0
scheduleExpression: string
scheduleExpressionTimezone: string
startWindowHours: 0
tags:
string: string
RestoreTestingPlan 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 RestoreTestingPlan resource accepts the following input properties:
- Schedule
Expression string - The schedule expression for the restore testing plan.
- Name string
- The name of the restore testing plan. Must be between 1 and 50 characters long and contain only alphanumeric characters and underscores.
- Recovery
Point RestoreSelection Testing Plan Recovery Point Selection - Specifies the recovery point selection configuration. See RecoveryPointSelection section for more details.
- Schedule
Expression stringTimezone - The timezone for the schedule expression. If not provided, the state value will be used.
- Start
Window intHours - The number of hours in the start window for the restore testing plan. Must be between 1 and 168.
- Dictionary<string, string>
- Schedule
Expression string - The schedule expression for the restore testing plan.
- Name string
- The name of the restore testing plan. Must be between 1 and 50 characters long and contain only alphanumeric characters and underscores.
- Recovery
Point RestoreSelection Testing Plan Recovery Point Selection Args - Specifies the recovery point selection configuration. See RecoveryPointSelection section for more details.
- Schedule
Expression stringTimezone - The timezone for the schedule expression. If not provided, the state value will be used.
- Start
Window intHours - The number of hours in the start window for the restore testing plan. Must be between 1 and 168.
- map[string]string
- schedule
Expression String - The schedule expression for the restore testing plan.
- name String
- The name of the restore testing plan. Must be between 1 and 50 characters long and contain only alphanumeric characters and underscores.
- recovery
Point RestoreSelection Testing Plan Recovery Point Selection - Specifies the recovery point selection configuration. See RecoveryPointSelection section for more details.
- schedule
Expression StringTimezone - The timezone for the schedule expression. If not provided, the state value will be used.
- start
Window IntegerHours - The number of hours in the start window for the restore testing plan. Must be between 1 and 168.
- Map<String,String>
- schedule
Expression string - The schedule expression for the restore testing plan.
- name string
- The name of the restore testing plan. Must be between 1 and 50 characters long and contain only alphanumeric characters and underscores.
- recovery
Point RestoreSelection Testing Plan Recovery Point Selection - Specifies the recovery point selection configuration. See RecoveryPointSelection section for more details.
- schedule
Expression stringTimezone - The timezone for the schedule expression. If not provided, the state value will be used.
- start
Window numberHours - The number of hours in the start window for the restore testing plan. Must be between 1 and 168.
- {[key: string]: string}
- schedule_
expression str - The schedule expression for the restore testing plan.
- name str
- The name of the restore testing plan. Must be between 1 and 50 characters long and contain only alphanumeric characters and underscores.
- recovery_
point_ Restoreselection Testing Plan Recovery Point Selection Args - Specifies the recovery point selection configuration. See RecoveryPointSelection section for more details.
- schedule_
expression_ strtimezone - The timezone for the schedule expression. If not provided, the state value will be used.
- start_
window_ inthours - The number of hours in the start window for the restore testing plan. Must be between 1 and 168.
- Mapping[str, str]
- schedule
Expression String - The schedule expression for the restore testing plan.
- name String
- The name of the restore testing plan. Must be between 1 and 50 characters long and contain only alphanumeric characters and underscores.
- recovery
Point Property MapSelection - Specifies the recovery point selection configuration. See RecoveryPointSelection section for more details.
- schedule
Expression StringTimezone - The timezone for the schedule expression. If not provided, the state value will be used.
- start
Window NumberHours - The number of hours in the start window for the restore testing plan. Must be between 1 and 168.
- Map<String>
Outputs
All input properties are implicitly available as output properties. Additionally, the RestoreTestingPlan resource produces the following output properties:
Look up Existing RestoreTestingPlan Resource
Get an existing RestoreTestingPlan 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?: RestoreTestingPlanState, opts?: CustomResourceOptions): RestoreTestingPlan
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
name: Optional[str] = None,
recovery_point_selection: Optional[RestoreTestingPlanRecoveryPointSelectionArgs] = None,
schedule_expression: Optional[str] = None,
schedule_expression_timezone: Optional[str] = None,
start_window_hours: Optional[int] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None) -> RestoreTestingPlan
func GetRestoreTestingPlan(ctx *Context, name string, id IDInput, state *RestoreTestingPlanState, opts ...ResourceOption) (*RestoreTestingPlan, error)
public static RestoreTestingPlan Get(string name, Input<string> id, RestoreTestingPlanState? state, CustomResourceOptions? opts = null)
public static RestoreTestingPlan get(String name, Output<String> id, RestoreTestingPlanState 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
- ARN of the Restore Testing Plan.
- Name string
- The name of the restore testing plan. Must be between 1 and 50 characters long and contain only alphanumeric characters and underscores.
- Recovery
Point RestoreSelection Testing Plan Recovery Point Selection - Specifies the recovery point selection configuration. See RecoveryPointSelection section for more details.
- Schedule
Expression string - The schedule expression for the restore testing plan.
- Schedule
Expression stringTimezone - The timezone for the schedule expression. If not provided, the state value will be used.
- Start
Window intHours - The number of hours in the start window for the restore testing plan. Must be between 1 and 168.
- Dictionary<string, string>
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- ARN of the Restore Testing Plan.
- Name string
- The name of the restore testing plan. Must be between 1 and 50 characters long and contain only alphanumeric characters and underscores.
- Recovery
Point RestoreSelection Testing Plan Recovery Point Selection Args - Specifies the recovery point selection configuration. See RecoveryPointSelection section for more details.
- Schedule
Expression string - The schedule expression for the restore testing plan.
- Schedule
Expression stringTimezone - The timezone for the schedule expression. If not provided, the state value will be used.
- Start
Window intHours - The number of hours in the start window for the restore testing plan. Must be between 1 and 168.
- map[string]string
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- ARN of the Restore Testing Plan.
- name String
- The name of the restore testing plan. Must be between 1 and 50 characters long and contain only alphanumeric characters and underscores.
- recovery
Point RestoreSelection Testing Plan Recovery Point Selection - Specifies the recovery point selection configuration. See RecoveryPointSelection section for more details.
- schedule
Expression String - The schedule expression for the restore testing plan.
- schedule
Expression StringTimezone - The timezone for the schedule expression. If not provided, the state value will be used.
- start
Window IntegerHours - The number of hours in the start window for the restore testing plan. Must be between 1 and 168.
- Map<String,String>
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- ARN of the Restore Testing Plan.
- name string
- The name of the restore testing plan. Must be between 1 and 50 characters long and contain only alphanumeric characters and underscores.
- recovery
Point RestoreSelection Testing Plan Recovery Point Selection - Specifies the recovery point selection configuration. See RecoveryPointSelection section for more details.
- schedule
Expression string - The schedule expression for the restore testing plan.
- schedule
Expression stringTimezone - The timezone for the schedule expression. If not provided, the state value will be used.
- start
Window numberHours - The number of hours in the start window for the restore testing plan. Must be between 1 and 168.
- {[key: string]: string}
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn str
- ARN of the Restore Testing Plan.
- name str
- The name of the restore testing plan. Must be between 1 and 50 characters long and contain only alphanumeric characters and underscores.
- recovery_
point_ Restoreselection Testing Plan Recovery Point Selection Args - Specifies the recovery point selection configuration. See RecoveryPointSelection section for more details.
- schedule_
expression str - The schedule expression for the restore testing plan.
- schedule_
expression_ strtimezone - The timezone for the schedule expression. If not provided, the state value will be used.
- start_
window_ inthours - The number of hours in the start window for the restore testing plan. Must be between 1 and 168.
- Mapping[str, str]
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- ARN of the Restore Testing Plan.
- name String
- The name of the restore testing plan. Must be between 1 and 50 characters long and contain only alphanumeric characters and underscores.
- recovery
Point Property MapSelection - Specifies the recovery point selection configuration. See RecoveryPointSelection section for more details.
- schedule
Expression String - The schedule expression for the restore testing plan.
- schedule
Expression StringTimezone - The timezone for the schedule expression. If not provided, the state value will be used.
- start
Window NumberHours - The number of hours in the start window for the restore testing plan. Must be between 1 and 168.
- Map<String>
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
Supporting Types
RestoreTestingPlanRecoveryPointSelection, RestoreTestingPlanRecoveryPointSelectionArgs
- Algorithm string
- Specifies the algorithm used for selecting recovery points. Valid values are "RANDOM_WITHIN_WINDOW" and "LATEST_WITHIN_WINDOW".
- Include
Vaults List<string> - Specifies the backup vaults to include in the recovery point selection. Each value must be a valid AWS ARN for a backup vault or "*" to include all backup vaults.
- Recovery
Point List<string>Types - Specifies the types of recovery points to include in the selection. Valid values are "CONTINUOUS" and "SNAPSHOT".
- Exclude
Vaults List<string> - Specifies the backup vaults to exclude from the recovery point selection. Each value must be a valid AWS ARN for a backup vault or "*" to exclude all backup vaults.
- Selection
Window intDays - Specifies the number of days within which the recovery points should be selected. Must be a value between 1 and 365.
- Algorithm string
- Specifies the algorithm used for selecting recovery points. Valid values are "RANDOM_WITHIN_WINDOW" and "LATEST_WITHIN_WINDOW".
- Include
Vaults []string - Specifies the backup vaults to include in the recovery point selection. Each value must be a valid AWS ARN for a backup vault or "*" to include all backup vaults.
- Recovery
Point []stringTypes - Specifies the types of recovery points to include in the selection. Valid values are "CONTINUOUS" and "SNAPSHOT".
- Exclude
Vaults []string - Specifies the backup vaults to exclude from the recovery point selection. Each value must be a valid AWS ARN for a backup vault or "*" to exclude all backup vaults.
- Selection
Window intDays - Specifies the number of days within which the recovery points should be selected. Must be a value between 1 and 365.
- algorithm String
- Specifies the algorithm used for selecting recovery points. Valid values are "RANDOM_WITHIN_WINDOW" and "LATEST_WITHIN_WINDOW".
- include
Vaults List<String> - Specifies the backup vaults to include in the recovery point selection. Each value must be a valid AWS ARN for a backup vault or "*" to include all backup vaults.
- recovery
Point List<String>Types - Specifies the types of recovery points to include in the selection. Valid values are "CONTINUOUS" and "SNAPSHOT".
- exclude
Vaults List<String> - Specifies the backup vaults to exclude from the recovery point selection. Each value must be a valid AWS ARN for a backup vault or "*" to exclude all backup vaults.
- selection
Window IntegerDays - Specifies the number of days within which the recovery points should be selected. Must be a value between 1 and 365.
- algorithm string
- Specifies the algorithm used for selecting recovery points. Valid values are "RANDOM_WITHIN_WINDOW" and "LATEST_WITHIN_WINDOW".
- include
Vaults string[] - Specifies the backup vaults to include in the recovery point selection. Each value must be a valid AWS ARN for a backup vault or "*" to include all backup vaults.
- recovery
Point string[]Types - Specifies the types of recovery points to include in the selection. Valid values are "CONTINUOUS" and "SNAPSHOT".
- exclude
Vaults string[] - Specifies the backup vaults to exclude from the recovery point selection. Each value must be a valid AWS ARN for a backup vault or "*" to exclude all backup vaults.
- selection
Window numberDays - Specifies the number of days within which the recovery points should be selected. Must be a value between 1 and 365.
- algorithm str
- Specifies the algorithm used for selecting recovery points. Valid values are "RANDOM_WITHIN_WINDOW" and "LATEST_WITHIN_WINDOW".
- include_
vaults Sequence[str] - Specifies the backup vaults to include in the recovery point selection. Each value must be a valid AWS ARN for a backup vault or "*" to include all backup vaults.
- recovery_
point_ Sequence[str]types - Specifies the types of recovery points to include in the selection. Valid values are "CONTINUOUS" and "SNAPSHOT".
- exclude_
vaults Sequence[str] - Specifies the backup vaults to exclude from the recovery point selection. Each value must be a valid AWS ARN for a backup vault or "*" to exclude all backup vaults.
- selection_
window_ intdays - Specifies the number of days within which the recovery points should be selected. Must be a value between 1 and 365.
- algorithm String
- Specifies the algorithm used for selecting recovery points. Valid values are "RANDOM_WITHIN_WINDOW" and "LATEST_WITHIN_WINDOW".
- include
Vaults List<String> - Specifies the backup vaults to include in the recovery point selection. Each value must be a valid AWS ARN for a backup vault or "*" to include all backup vaults.
- recovery
Point List<String>Types - Specifies the types of recovery points to include in the selection. Valid values are "CONTINUOUS" and "SNAPSHOT".
- exclude
Vaults List<String> - Specifies the backup vaults to exclude from the recovery point selection. Each value must be a valid AWS ARN for a backup vault or "*" to exclude all backup vaults.
- selection
Window NumberDays - Specifies the number of days within which the recovery points should be selected. Must be a value between 1 and 365.
Import
Using pulumi import
, import Backup Restore Testing Plan using the name
. For example:
$ pulumi import aws:backup/restoreTestingPlan:RestoreTestingPlan example my_testing_plan
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.