restore_testing_plans
Creates, updates, deletes, gets or lists a restore_testing_plans resource.
Overview
| Name | restore_testing_plans |
| Type | Resource |
| Id | aws.backup.restore_testing_plans |
Fields
The following fields are returned by SELECT queries:
- get_restore_testing_plan
- list_restore_testing_plans
| Name | Datatype | Description |
|---|---|---|
creation_time | string (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_id | string | This 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_time | string (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_time | string (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_selection | object | The specified criteria to assign a set of resources, such as recovery point types or backup vaults. |
restore_testing_plan_arn | string | An Amazon Resource Name (ARN) that uniquely identifies a restore testing plan. |
restore_testing_plan_name | string | The restore testing plan name. |
schedule_expression | string | A 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_timezone | string | Optional. 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_hours | integer | Defaults 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). |
| Name | Datatype | Description |
|---|---|---|
creation_time | string (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. |
last_execution_time | string (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_time | string (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. |
restore_testing_plan_arn | string | An Amazon Resource Name (ARN) that uniquely identifiesa restore testing plan. |
restore_testing_plan_name | string | The restore testing plan name. |
schedule_expression | string | A 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_timezone | string | Optional. 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_hours | integer | Defaults 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_restore_testing_plan | select | restore_testing_plan_name, region | 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. | |
list_restore_testing_plans | select | region | MaxResults, NextToken | Returns a list of restore testing plans. |
create_restore_testing_plan | insert | region, RestoreTestingPlan | 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. | |
update_restore_testing_plan | update | restore_testing_plan_name, region, RestoreTestingPlan | 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 | |
delete_restore_testing_plan | delete | restore_testing_plan_name, region | This 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
restore_testing_plan_name | string | Required unique name of the restore testing plan you wish to delete. |
MaxResults | integer | The maximum number of items to be returned. |
NextToken | string | The 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
- get_restore_testing_plan
- list_restore_testing_plans
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
;
Returns a list of restore testing plans.
SELECT
creation_time,
last_execution_time,
last_update_time,
restore_testing_plan_arn,
restore_testing_plan_name,
schedule_expression,
schedule_expression_timezone,
start_window_hours
FROM aws.backup.restore_testing_plans
WHERE region = '{{ region }}' -- required
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
;
INSERT examples
- create_restore_testing_plan
- Manifest
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
;
# Description fields are for documentation purposes
- name: restore_testing_plans
props:
- name: region
value: "{{ region }}"
description: Required parameter for the restore_testing_plans resource.
- name: CreatorRequestId
value: "{{ CreatorRequestId }}"
- name: RestoreTestingPlan
description: |
This contains metadata about a restore testing plan.
value:
RecoveryPointSelection:
Algorithm: "{{ Algorithm }}"
ExcludeVaults:
- "{{ ExcludeVaults }}"
IncludeVaults:
- "{{ IncludeVaults }}"
RecoveryPointTypes:
- "{{ RecoveryPointTypes }}"
SelectionWindowDays: {{ SelectionWindowDays }}
RestoreTestingPlanName: "{{ RestoreTestingPlanName }}"
ScheduleExpression: "{{ ScheduleExpression }}"
ScheduleExpressionTimezone: "{{ ScheduleExpressionTimezone }}"
StartWindowHours: {{ StartWindowHours }}
- name: Tags
value: "{{ Tags }}"
UPDATE examples
- update_restore_testing_plan
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
- delete_restore_testing_plan
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
;