

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::Backup::RestoreTestingSelection
<a name="aws-resource-backup-restoretestingselection"></a>

This request can be sent after CreateRestoreTestingPlan request returns successfully. This is the second part of creating a resource testing plan, and it must be completed sequentially.

This consists of `RestoreTestingSelectionName`, `ProtectedResourceType`, and one of the following:
+  `ProtectedResourceArns` 
+  `ProtectedResourceConditions` 

Each protected resource type can have one single value.

A restore testing selection can include a wildcard value ("\$1") for `ProtectedResourceArns` along with `ProtectedResourceConditions`. Alternatively, you can include up to 30 specific protected resource ARNs in `ProtectedResourceArns`.

Cannot select by both protected resource types AND specific ARNs. Request will fail if both are included.

## Syntax
<a name="aws-resource-backup-restoretestingselection-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-backup-restoretestingselection-syntax.json"></a>

```
{
  "Type" : "AWS::Backup::RestoreTestingSelection",
  "Properties" : {
      "[IamRoleArn](#cfn-backup-restoretestingselection-iamrolearn)" : String,
      "[ProtectedResourceArns](#cfn-backup-restoretestingselection-protectedresourcearns)" : [ String, ... ],
      "[ProtectedResourceConditions](#cfn-backup-restoretestingselection-protectedresourceconditions)" : ProtectedResourceConditions,
      "[ProtectedResourceType](#cfn-backup-restoretestingselection-protectedresourcetype)" : String,
      "[RestoreMetadataOverrides](#cfn-backup-restoretestingselection-restoremetadataoverrides)" : {Key: Value, ...},
      "[RestoreTestingPlanName](#cfn-backup-restoretestingselection-restoretestingplanname)" : String,
      "[RestoreTestingSelectionName](#cfn-backup-restoretestingselection-restoretestingselectionname)" : String,
      "[ValidationWindowHours](#cfn-backup-restoretestingselection-validationwindowhours)" : Integer
    }
}
```

### YAML
<a name="aws-resource-backup-restoretestingselection-syntax.yaml"></a>

```
Type: AWS::Backup::RestoreTestingSelection
Properties:
  [IamRoleArn](#cfn-backup-restoretestingselection-iamrolearn): String
  [ProtectedResourceArns](#cfn-backup-restoretestingselection-protectedresourcearns): 
    - String
  [ProtectedResourceConditions](#cfn-backup-restoretestingselection-protectedresourceconditions): 
    ProtectedResourceConditions
  [ProtectedResourceType](#cfn-backup-restoretestingselection-protectedresourcetype): String
  [RestoreMetadataOverrides](#cfn-backup-restoretestingselection-restoremetadataoverrides): 
    Key: Value
  [RestoreTestingPlanName](#cfn-backup-restoretestingselection-restoretestingplanname): String
  [RestoreTestingSelectionName](#cfn-backup-restoretestingselection-restoretestingselectionname): String
  [ValidationWindowHours](#cfn-backup-restoretestingselection-validationwindowhours): Integer
```

## Properties
<a name="aws-resource-backup-restoretestingselection-properties"></a>

`IamRoleArn`  <a name="cfn-backup-restoretestingselection-iamrolearn"></a>
The Amazon Resource Name (ARN) of the IAM role that AWS Backup uses to create the target resource; for example:`arn:aws:iam::123456789012:role/S3Access`.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ProtectedResourceArns`  <a name="cfn-backup-restoretestingselection-protectedresourcearns"></a>
You can include specific ARNs, such as `ProtectedResourceArns: ["arn:aws:...", "arn:aws:..."]` or you can include a wildcard: `ProtectedResourceArns: ["*"]`, but not both.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ProtectedResourceConditions`  <a name="cfn-backup-restoretestingselection-protectedresourceconditions"></a>
In a resource testing selection, this parameter filters by specific conditions such as `StringEquals` or `StringNotEquals`.  
*Required*: No  
*Type*: [ProtectedResourceConditions](aws-properties-backup-restoretestingselection-protectedresourceconditions.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ProtectedResourceType`  <a name="cfn-backup-restoretestingselection-protectedresourcetype"></a>
The type of AWS resource included in a resource testing selection; for example, an Amazon EBS volume or an Amazon RDS database.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RestoreMetadataOverrides`  <a name="cfn-backup-restoretestingselection-restoremetadataoverrides"></a>
You can override certain restore metadata keys by including the parameter `RestoreMetadataOverrides` in the body of `RestoreTestingSelection`. Key values are not case sensitive.  
See the complete list of [restore testing inferred metadata](https://docs.aws.amazon.com/aws-backup/latest/devguide/restore-testing-inferred-metadata.html).  
*Required*: No  
*Type*: Object of String  
*Pattern*: `.+`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RestoreTestingPlanName`  <a name="cfn-backup-restoretestingselection-restoretestingplanname"></a>
Unique string that is the name of the restore testing plan.  
The name cannot be changed after creation. The name must consist of only alphanumeric characters and underscores. Maximum length is 50.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RestoreTestingSelectionName`  <a name="cfn-backup-restoretestingselection-restoretestingselectionname"></a>
The unique name of the restore testing selection that belongs to the related restore testing plan.  
The name consists of only alphanumeric characters and underscores. Maximum length is 50.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ValidationWindowHours`  <a name="cfn-backup-restoretestingselection-validationwindowhours"></a>
This is amount of hours (1 to 168) available to run a validation script on the data. The data will be deleted upon the completion of the validation script or the end of the specified retention period, whichever comes first.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-backup-restoretestingselection-return-values"></a>

### Ref
<a name="aws-resource-backup-restoretestingselection-return-values-ref"></a>

# AWS::Backup::RestoreTestingSelection KeyValue
<a name="aws-properties-backup-restoretestingselection-keyvalue"></a>

Pair of two related strings. Allowed characters are letters, white space, and numbers that can be represented in UTF-8 and the following characters: ` + - = . _ : /`

## Syntax
<a name="aws-properties-backup-restoretestingselection-keyvalue-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-backup-restoretestingselection-keyvalue-syntax.json"></a>

```
{
  "[Key](#cfn-backup-restoretestingselection-keyvalue-key)" : String,
  "[Value](#cfn-backup-restoretestingselection-keyvalue-value)" : String
}
```

### YAML
<a name="aws-properties-backup-restoretestingselection-keyvalue-syntax.yaml"></a>

```
  [Key](#cfn-backup-restoretestingselection-keyvalue-key): String
  [Value](#cfn-backup-restoretestingselection-keyvalue-value): String
```

## Properties
<a name="aws-properties-backup-restoretestingselection-keyvalue-properties"></a>

`Key`  <a name="cfn-backup-restoretestingselection-keyvalue-key"></a>
The tag key.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-backup-restoretestingselection-keyvalue-value"></a>
The tag value.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Backup::RestoreTestingSelection ProtectedResourceConditions
<a name="aws-properties-backup-restoretestingselection-protectedresourceconditions"></a>

The conditions that you define for resources in your restore testing plan using tags.

## Syntax
<a name="aws-properties-backup-restoretestingselection-protectedresourceconditions-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-backup-restoretestingselection-protectedresourceconditions-syntax.json"></a>

```
{
  "[StringEquals](#cfn-backup-restoretestingselection-protectedresourceconditions-stringequals)" : [ KeyValue, ... ],
  "[StringNotEquals](#cfn-backup-restoretestingselection-protectedresourceconditions-stringnotequals)" : [ KeyValue, ... ]
}
```

### YAML
<a name="aws-properties-backup-restoretestingselection-protectedresourceconditions-syntax.yaml"></a>

```
  [StringEquals](#cfn-backup-restoretestingselection-protectedresourceconditions-stringequals): 
    - KeyValue
  [StringNotEquals](#cfn-backup-restoretestingselection-protectedresourceconditions-stringnotequals): 
    - KeyValue
```

## Properties
<a name="aws-properties-backup-restoretestingselection-protectedresourceconditions-properties"></a>

`StringEquals`  <a name="cfn-backup-restoretestingselection-protectedresourceconditions-stringequals"></a>
Filters the values of your tagged resources for only those resources that you tagged with the same value. Also called "exact matching."  
*Required*: No  
*Type*: Array of [KeyValue](aws-properties-backup-restoretestingselection-keyvalue.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StringNotEquals`  <a name="cfn-backup-restoretestingselection-protectedresourceconditions-stringnotequals"></a>
Filters the values of your tagged resources for only those resources that you tagged that do not have the same value. Also called "negated matching."  
*Required*: No  
*Type*: Array of [KeyValue](aws-properties-backup-restoretestingselection-keyvalue.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)