RestoreTestingSelectionArgs

data class RestoreTestingSelectionArgs(val iamRoleArn: Output<String>? = null, val name: Output<String>? = null, val protectedResourceArns: Output<List<String>>? = null, val protectedResourceConditions: Output<RestoreTestingSelectionProtectedResourceConditionsArgs>? = null, val protectedResourceType: Output<String>? = null, val restoreMetadataOverrides: Output<Map<String, String>>? = null, val restoreTestingPlanName: Output<String>? = null, val validationWindowHours: Output<Int>? = null) : ConvertibleToJava<RestoreTestingSelectionArgs>

Resource for managing an AWS Backup Restore Testing Selection.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.backup.RestoreTestingSelection("example", {
name: "ec2_selection",
restoreTestingPlanName: exampleAwsBackupRestoreTestingPlan.name,
protectedResourceType: "EC2",
iamRoleArn: exampleAwsIamRole.arn,
protectedResourceArns: ["*"],
});
import pulumi
import pulumi_aws as aws
example = aws.backup.RestoreTestingSelection("example",
name="ec2_selection",
restore_testing_plan_name=example_aws_backup_restore_testing_plan["name"],
protected_resource_type="EC2",
iam_role_arn=example_aws_iam_role["arn"],
protected_resource_arns=["*"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Backup.RestoreTestingSelection("example", new()
{
Name = "ec2_selection",
RestoreTestingPlanName = exampleAwsBackupRestoreTestingPlan.Name,
ProtectedResourceType = "EC2",
IamRoleArn = exampleAwsIamRole.Arn,
ProtectedResourceArns = new[]
{
"*",
},
});
});
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.NewRestoreTestingSelection(ctx, "example", &backup.RestoreTestingSelectionArgs{
Name: pulumi.String("ec2_selection"),
RestoreTestingPlanName: pulumi.Any(exampleAwsBackupRestoreTestingPlan.Name),
ProtectedResourceType: pulumi.String("EC2"),
IamRoleArn: pulumi.Any(exampleAwsIamRole.Arn),
ProtectedResourceArns: pulumi.StringArray{
pulumi.String("*"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.backup.RestoreTestingSelection;
import com.pulumi.aws.backup.RestoreTestingSelectionArgs;
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 RestoreTestingSelection("example", RestoreTestingSelectionArgs.builder()
.name("ec2_selection")
.restoreTestingPlanName(exampleAwsBackupRestoreTestingPlan.name())
.protectedResourceType("EC2")
.iamRoleArn(exampleAwsIamRole.arn())
.protectedResourceArns("*")
.build());
}
}
resources:
example:
type: aws:backup:RestoreTestingSelection
properties:
name: ec2_selection
restoreTestingPlanName: ${exampleAwsBackupRestoreTestingPlan.name}
protectedResourceType: EC2
iamRoleArn: ${exampleAwsIamRole.arn}
protectedResourceArns:
- '*'

Advanced Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.backup.RestoreTestingSelection("example", {
name: "ec2_selection",
restoreTestingPlanName: exampleAwsBackupRestoreTestingPlan.name,
protectedResourceType: "EC2",
iamRoleArn: exampleAwsIamRole.arn,
protectedResourceConditions: {
stringEquals: [{
key: "aws:ResourceTag/backup",
value: "true",
}],
},
});
import pulumi
import pulumi_aws as aws
example = aws.backup.RestoreTestingSelection("example",
name="ec2_selection",
restore_testing_plan_name=example_aws_backup_restore_testing_plan["name"],
protected_resource_type="EC2",
iam_role_arn=example_aws_iam_role["arn"],
protected_resource_conditions={
"string_equals": [{
"key": "aws:ResourceTag/backup",
"value": "true",
}],
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Backup.RestoreTestingSelection("example", new()
{
Name = "ec2_selection",
RestoreTestingPlanName = exampleAwsBackupRestoreTestingPlan.Name,
ProtectedResourceType = "EC2",
IamRoleArn = exampleAwsIamRole.Arn,
ProtectedResourceConditions = new Aws.Backup.Inputs.RestoreTestingSelectionProtectedResourceConditionsArgs
{
StringEquals = new[]
{
new Aws.Backup.Inputs.RestoreTestingSelectionProtectedResourceConditionsStringEqualArgs
{
Key = "aws:ResourceTag/backup",
Value = "true",
},
},
},
});
});
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.NewRestoreTestingSelection(ctx, "example", &backup.RestoreTestingSelectionArgs{
Name: pulumi.String("ec2_selection"),
RestoreTestingPlanName: pulumi.Any(exampleAwsBackupRestoreTestingPlan.Name),
ProtectedResourceType: pulumi.String("EC2"),
IamRoleArn: pulumi.Any(exampleAwsIamRole.Arn),
ProtectedResourceConditions: &backup.RestoreTestingSelectionProtectedResourceConditionsArgs{
StringEquals: backup.RestoreTestingSelectionProtectedResourceConditionsStringEqualArray{
&backup.RestoreTestingSelectionProtectedResourceConditionsStringEqualArgs{
Key: pulumi.String("aws:ResourceTag/backup"),
Value: pulumi.String("true"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.backup.RestoreTestingSelection;
import com.pulumi.aws.backup.RestoreTestingSelectionArgs;
import com.pulumi.aws.backup.inputs.RestoreTestingSelectionProtectedResourceConditionsArgs;
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 RestoreTestingSelection("example", RestoreTestingSelectionArgs.builder()
.name("ec2_selection")
.restoreTestingPlanName(exampleAwsBackupRestoreTestingPlan.name())
.protectedResourceType("EC2")
.iamRoleArn(exampleAwsIamRole.arn())
.protectedResourceConditions(RestoreTestingSelectionProtectedResourceConditionsArgs.builder()
.stringEquals(RestoreTestingSelectionProtectedResourceConditionsStringEqualArgs.builder()
.key("aws:ResourceTag/backup")
.value("true")
.build())
.build())
.build());
}
}
resources:
example:
type: aws:backup:RestoreTestingSelection
properties:
name: ec2_selection
restoreTestingPlanName: ${exampleAwsBackupRestoreTestingPlan.name}
protectedResourceType: EC2
iamRoleArn: ${exampleAwsIamRole.arn}
protectedResourceConditions:
stringEquals:
- key: aws:ResourceTag/backup
value: true

Import

Using pulumi import, import Backup Restore Testing Selection using name:restore_testing_plan_name. For example:

$ pulumi import aws:backup/restoreTestingSelection:RestoreTestingSelection example restore_testing_selection_12345678:restore_testing_plan_12345678

Constructors

Link copied to clipboard
constructor(iamRoleArn: Output<String>? = null, name: Output<String>? = null, protectedResourceArns: Output<List<String>>? = null, protectedResourceConditions: Output<RestoreTestingSelectionProtectedResourceConditionsArgs>? = null, protectedResourceType: Output<String>? = null, restoreMetadataOverrides: Output<Map<String, String>>? = null, restoreTestingPlanName: Output<String>? = null, validationWindowHours: Output<Int>? = null)

Properties

Link copied to clipboard
val iamRoleArn: Output<String>? = null

The ARN of the IAM role.

Link copied to clipboard
val name: Output<String>? = null

The name of the backup restore testing selection.

Link copied to clipboard
val protectedResourceArns: Output<List<String>>? = null

The ARNs for the protected resources.

Link copied to clipboard

The conditions for the protected resource.

Link copied to clipboard
val protectedResourceType: Output<String>? = null

The type of the protected resource.

Link copied to clipboard
val restoreMetadataOverrides: Output<Map<String, String>>? = null

Override certain restore metadata keys. See the complete list of restore testing inferred metadata .

Link copied to clipboard
val restoreTestingPlanName: Output<String>? = null

The name of the restore testing plan.

Link copied to clipboard
val validationWindowHours: Output<Int>? = null

The amount of hours available to run a validation script on the data. Valid range is 1 to 168.

Functions

Link copied to clipboard
open override fun toJava(): RestoreTestingSelectionArgs