restore_testing_selections
Creates, updates, deletes or gets a restore_testing_selection
resource or lists restore_testing_selections
in a region
Overview
Name | restore_testing_selections |
Type | Resource |
Description | Resource Type definition for AWS::Backup::RestoreTestingSelection |
Id | aws.backup.restore_testing_selections |
Fields
Name | Datatype | Description |
---|---|---|
iam_role_arn | string | |
protected_resource_arns | array | |
protected_resource_conditions | object | |
protected_resource_type | string | |
restore_metadata_overrides | object | |
restore_testing_plan_name | string | |
restore_testing_selection_name | string | |
validation_window_hours | integer | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | IamRoleArn, ProtectedResourceType, RestoreTestingPlanName, RestoreTestingSelectionName, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all restore_testing_selections
in a region.
SELECT
region,
iam_role_arn,
protected_resource_arns,
protected_resource_conditions,
protected_resource_type,
restore_metadata_overrides,
restore_testing_plan_name,
restore_testing_selection_name,
validation_window_hours
FROM aws.backup.restore_testing_selections
WHERE region = 'us-east-1';
Gets all properties from an individual restore_testing_selection
.
SELECT
region,
iam_role_arn,
protected_resource_arns,
protected_resource_conditions,
protected_resource_type,
restore_metadata_overrides,
restore_testing_plan_name,
restore_testing_selection_name,
validation_window_hours
FROM aws.backup.restore_testing_selections
WHERE region = 'us-east-1' AND data__Identifier = '<RestoreTestingPlanName>|<RestoreTestingSelectionName>';
INSERT
example
Use the following StackQL query and manifest file to create a new restore_testing_selection
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.backup.restore_testing_selections (
IamRoleArn,
ProtectedResourceType,
RestoreTestingPlanName,
RestoreTestingSelectionName,
region
)
SELECT
'{{ IamRoleArn }}',
'{{ ProtectedResourceType }}',
'{{ RestoreTestingPlanName }}',
'{{ RestoreTestingSelectionName }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.backup.restore_testing_selections (
IamRoleArn,
ProtectedResourceArns,
ProtectedResourceConditions,
ProtectedResourceType,
RestoreMetadataOverrides,
RestoreTestingPlanName,
RestoreTestingSelectionName,
ValidationWindowHours,
region
)
SELECT
'{{ IamRoleArn }}',
'{{ ProtectedResourceArns }}',
'{{ ProtectedResourceConditions }}',
'{{ ProtectedResourceType }}',
'{{ RestoreMetadataOverrides }}',
'{{ RestoreTestingPlanName }}',
'{{ RestoreTestingSelectionName }}',
'{{ ValidationWindowHours }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: restore_testing_selection
props:
- name: IamRoleArn
value: '{{ IamRoleArn }}'
- name: ProtectedResourceArns
value:
- '{{ ProtectedResourceArns[0] }}'
- name: ProtectedResourceConditions
value:
StringEquals:
- Key: '{{ Key }}'
Value: '{{ Value }}'
StringNotEquals:
- null
- name: ProtectedResourceType
value: '{{ ProtectedResourceType }}'
- name: RestoreMetadataOverrides
value: {}
- name: RestoreTestingPlanName
value: '{{ RestoreTestingPlanName }}'
- name: RestoreTestingSelectionName
value: '{{ RestoreTestingSelectionName }}'
- name: ValidationWindowHours
value: '{{ ValidationWindowHours }}'
DELETE
example
/*+ delete */
DELETE FROM aws.backup.restore_testing_selections
WHERE data__Identifier = '<RestoreTestingPlanName|RestoreTestingSelectionName>'
AND region = 'us-east-1';
Permissions
To operate on the restore_testing_selections
resource, the following permissions are required:
Create
backup:CreateRestoreTestingSelection,
backup:GetRestoreTestingSelection,
iam:PassRole
Read
backup:GetRestoreTestingSelection
Update
backup:UpdateRestoreTestingSelection,
backup:GetRestoreTestingSelection,
iam:PassRole
Delete
backup:DeleteRestoreTestingSelection,
backup:GetRestoreTestingSelection
List
backup:ListRestoreTestingSelections