Skip to main content

restore_testing_selections

Creates, updates, deletes, gets or lists a restore_testing_selections resource.

Overview

Namerestore_testing_selections
TypeResource
Idaws.backup.restore_testing_selections

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestring (date-time)The date and time that a restore testing selection was created, in Unix format and Coordinated Universal Time (UTC). The value of CreationTime is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 201812:11:30.087 AM.
creator_request_idstringThis identifies the request and allows failed requests to be retried without the risk of running the operation twice. If the request includes a CreatorRequestId that matches an existing backup plan, that plan is returned. This parameter is optional. If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters.
iam_role_arnstringThe Amazon Resource Name (ARN) of the IAM role that Backup uses to create the target resource; for example:arn:aws:iam::123456789012:role/S3Access.
protected_resource_arnsarrayYou can include specific ARNs, such as ProtectedResourceArns: ["arn:aws:...", "arn:aws:..."] or you can include a wildcard: ProtectedResourceArns: ["*"], but not both.
protected_resource_conditionsobjectIn a resource testing selection, this parameter filters by specific conditions such as StringEquals or StringNotEquals.
protected_resource_typestringThe type of Amazon Web Services resource included in a resource testing selection; for example, an Amazon EBS volume or an Amazon RDS database.
restore_metadata_overridesobjectYou 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.
restore_testing_plan_namestringThe RestoreTestingPlanName is a unique string that is the name of the restore testing plan.
restore_testing_selection_namestringThe 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.
validation_window_hoursintegerThis 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.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_restore_testing_selectionselectrestore_testing_plan_name, restore_testing_selection_name, regionReturns RestoreTestingSelection, which displays resources and elements of the restore testing plan.
list_restore_testing_selectionsselectrestore_testing_plan_name, regionMaxResults, NextTokenReturns a list of restore testing selections. Can be filtered by MaxResults and RestoreTestingPlanName.
create_restore_testing_selectioninsertrestore_testing_plan_name, region, RestoreTestingSelectionThis 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 ("*") 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.
update_restore_testing_selectionupdaterestore_testing_plan_name, restore_testing_selection_name, region, RestoreTestingSelectionUpdates the specified restore testing selection. Most elements except the RestoreTestingSelectionName can be updated with this request. You can use either protected resource ARNs or conditions, but not both.
delete_restore_testing_selectiondeleterestore_testing_plan_name, restore_testing_selection_name, regionInput the Restore Testing Plan name and Restore Testing Selection name. All testing selections associated with a restore testing plan must be deleted before the restore testing plan can be deleted.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
restore_testing_plan_namestringRequired unique name of the restore testing plan that contains the restore testing selection you wish to delete.
restore_testing_selection_namestringRequired unique name of the restore testing selection you wish to delete.
MaxResultsintegerThe maximum number of items to be returned.
NextTokenstringThe next item following a partial list of returned items. For example, if a request is made to return MaxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the nexttoken.

SELECT examples

Returns RestoreTestingSelection, which displays resources and elements of the restore testing plan.

SELECT
creation_time,
creator_request_id,
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 restore_testing_plan_name = '{{ restore_testing_plan_name }}' -- required
AND restore_testing_selection_name = '{{ restore_testing_selection_name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

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 ("*") 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.

INSERT INTO aws.backup.restore_testing_selections (
CreatorRequestId,
RestoreTestingSelection,
restore_testing_plan_name,
region
)
SELECT
'{{ CreatorRequestId }}',
'{{ RestoreTestingSelection }}' /* required */,
'{{ restore_testing_plan_name }}',
'{{ region }}'
RETURNING
creation_time,
restore_testing_plan_arn,
restore_testing_plan_name,
restore_testing_selection_name
;

UPDATE examples

Updates the specified restore testing selection. Most elements except the RestoreTestingSelectionName can be updated with this request. You can use either protected resource ARNs or conditions, but not both.

UPDATE aws.backup.restore_testing_selections
SET
RestoreTestingSelection = '{{ RestoreTestingSelection }}'
WHERE
restore_testing_plan_name = '{{ restore_testing_plan_name }}' --required
AND restore_testing_selection_name = '{{ restore_testing_selection_name }}' --required
AND region = '{{ region }}' --required
AND RestoreTestingSelection = '{{ RestoreTestingSelection }}' --required
RETURNING
creation_time,
restore_testing_plan_arn,
restore_testing_plan_name,
restore_testing_selection_name,
update_time;

DELETE examples

Input the Restore Testing Plan name and Restore Testing Selection name. All testing selections associated with a restore testing plan must be deleted before the restore testing plan can be deleted.

DELETE FROM aws.backup.restore_testing_selections
WHERE restore_testing_plan_name = '{{ restore_testing_plan_name }}' --required
AND restore_testing_selection_name = '{{ restore_testing_selection_name }}' --required
AND region = '{{ region }}' --required
;