Skip to main content

restore_testing_plans

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

Overview

Namerestore_testing_plans
TypeResource
Idaws.backup.restore_testing_plans

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestring (date-time)The date and time that a restore testing plan 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, 2018 12: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.
last_execution_timestring (date-time)The last time a restore test was run with the specified restore testing plan. A date and time, in Unix format and Coordinated Universal Time (UTC). The value of LastExecutionDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
last_update_timestring (date-time)The date and time that the restore testing plan was updated. This update is in Unix format and Coordinated Universal Time (UTC). The value of LastUpdateTime is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
recovery_point_selectionobjectThe specified criteria to assign a set of resources, such as recovery point types or backup vaults.
restore_testing_plan_arnstringAn Amazon Resource Name (ARN) that uniquely identifies a restore testing plan.
restore_testing_plan_namestringThe restore testing plan name.
schedule_expressionstringA CRON expression in specified timezone when a restore testing plan is executed. When no CRON expression is provided, Backup will use the default expression cron(0 5 ? * * *).
schedule_expression_timezonestringOptional. This is the timezone in which the schedule expression is set. By default, ScheduleExpressions are in UTC. You can modify this to a specified timezone.
start_window_hoursintegerDefaults to 24 hours. A value in hours after a restore test is scheduled before a job will be canceled if it doesn't start successfully. This value is optional. If this value is included, this parameter has a maximum value of 168 hours (one week).

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_restore_testing_planselectrestore_testing_plan_name, regionReturns RestoreTestingPlan details for the specified RestoreTestingPlanName. The details are the body of a restore testing plan in JSON format, in addition to plan metadata.
list_restore_testing_plansselectregionMaxResults, NextTokenReturns a list of restore testing plans.
create_restore_testing_planinsertregion, RestoreTestingPlanCreates a restore testing plan. The first of two steps to create a restore testing plan. After this request is successful, finish the procedure using CreateRestoreTestingSelection.
update_restore_testing_planupdaterestore_testing_plan_name, region, RestoreTestingPlanThis request will send changes to your specified restore testing plan. RestoreTestingPlanName cannot be updated after it is created. RecoveryPointSelection can contain: Algorithm ExcludeVaults IncludeVaults RecoveryPointTypes SelectionWindowDays
delete_restore_testing_plandeleterestore_testing_plan_name, regionThis request deletes the specified restore testing plan. Deletion can only successfully occur if all associated restore testing selections are deleted first.

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 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 RestoreTestingPlan details for the specified RestoreTestingPlanName. The details are the body of a restore testing plan in JSON format, in addition to plan metadata.

SELECT
creation_time,
creator_request_id,
last_execution_time,
last_update_time,
recovery_point_selection,
restore_testing_plan_arn,
restore_testing_plan_name,
schedule_expression,
schedule_expression_timezone,
start_window_hours
FROM aws.backup.restore_testing_plans
WHERE restore_testing_plan_name = '{{ restore_testing_plan_name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a restore testing plan. The first of two steps to create a restore testing plan. After this request is successful, finish the procedure using CreateRestoreTestingSelection.

INSERT INTO aws.backup.restore_testing_plans (
CreatorRequestId,
RestoreTestingPlan,
Tags,
region
)
SELECT
'{{ CreatorRequestId }}',
'{{ RestoreTestingPlan }}' /* required */,
'{{ Tags }}',
'{{ region }}'
RETURNING
creation_time,
restore_testing_plan_arn,
restore_testing_plan_name
;

UPDATE examples

This request will send changes to your specified restore testing plan. RestoreTestingPlanName cannot be updated after it is created. RecoveryPointSelection can contain: Algorithm ExcludeVaults IncludeVaults RecoveryPointTypes SelectionWindowDays

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

DELETE examples

This request deletes the specified restore testing plan. Deletion can only successfully occur if all associated restore testing selections are deleted first.

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