restore_testing_plans
Creates, updates, deletes or gets a restore_testing_plan resource or lists restore_testing_plans in a region
Overview
| Name | restore_testing_plans |
| Type | Resource |
| Description | Definition of AWS::Backup::RestoreTestingPlan Resource Type |
| Id | awscc.backup.restore_testing_plans |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
schedule_expression | string | |
start_window_hours | integer | |
recovery_point_selection | object | |
restore_testing_plan_arn | string | |
restore_testing_plan_name | string | |
schedule_expression_timezone | string | |
tags | array | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
restore_testing_plan_name | string | |
region | string | AWS region. |
For more information, see AWS::Backup::RestoreTestingPlan.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | restore_testing_plans | INSERT | RecoveryPointSelection, ScheduleExpression, RestoreTestingPlanName, region |
delete_resource | restore_testing_plans | DELETE | Identifier, region |
update_resource | restore_testing_plans | UPDATE | Identifier, PatchDocument, region |
list_resources | restore_testing_plans_list_only | SELECT | region |
get_resource | restore_testing_plans | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual restore_testing_plan.
SELECT
region,
schedule_expression,
start_window_hours,
recovery_point_selection,
restore_testing_plan_arn,
restore_testing_plan_name,
schedule_expression_timezone,
tags
FROM awscc.backup.restore_testing_plans
WHERE
region = 'us-east-1' AND
Identifier = '{{ restore_testing_plan_name }}';
Lists all restore_testing_plans in a region.
SELECT
region,
restore_testing_plan_name
FROM awscc.backup.restore_testing_plans_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new restore_testing_plan resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.backup.restore_testing_plans (
ScheduleExpression,
RecoveryPointSelection,
RestoreTestingPlanName,
region
)
SELECT
'{{ schedule_expression }}',
'{{ recovery_point_selection }}',
'{{ restore_testing_plan_name }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.backup.restore_testing_plans (
ScheduleExpression,
StartWindowHours,
RecoveryPointSelection,
RestoreTestingPlanName,
ScheduleExpressionTimezone,
Tags,
region
)
SELECT
'{{ schedule_expression }}',
'{{ start_window_hours }}',
'{{ recovery_point_selection }}',
'{{ restore_testing_plan_name }}',
'{{ schedule_expression_timezone }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: restore_testing_plan
props:
- name: schedule_expression
value: '{{ schedule_expression }}'
- name: start_window_hours
value: '{{ start_window_hours }}'
- name: recovery_point_selection
value:
selection_window_days: '{{ selection_window_days }}'
recovery_point_types:
- '{{ recovery_point_types[0] }}'
include_vaults:
- '{{ include_vaults[0] }}'
exclude_vaults:
- '{{ exclude_vaults[0] }}'
algorithm: '{{ algorithm }}'
- name: restore_testing_plan_name
value: '{{ restore_testing_plan_name }}'
- name: schedule_expression_timezone
value: '{{ schedule_expression_timezone }}'
- name: tags
value:
- value: '{{ value }}'
key: '{{ key }}'
UPDATE example
Use the following StackQL query and manifest file to update a restore_testing_plan resource, using stack-deploy.
/*+ update */
UPDATE awscc.backup.restore_testing_plans
SET PatchDocument = string('{{ {
"ScheduleExpression": schedule_expression,
"StartWindowHours": start_window_hours,
"RecoveryPointSelection": recovery_point_selection,
"ScheduleExpressionTimezone": schedule_expression_timezone,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ restore_testing_plan_name }}';
DELETE example
/*+ delete */
DELETE FROM awscc.backup.restore_testing_plans
WHERE
Identifier = '{{ restore_testing_plan_name }}' AND
region = 'us-east-1';
Permissions
To operate on the restore_testing_plans resource, the following permissions are required:
- Read
- Create
- Update
- List
- Delete
backup:GetRestoreTestingPlan,
backup:ListTags
backup:CreateRestoreTestingPlan,
backup:TagResource,
backup:GetRestoreTestingPlan,
backup:ListTags
backup:UpdateRestoreTestingPlan,
backup:TagResource,
backup:UntagResource,
backup:GetRestoreTestingPlan,
backup:ListTags
backup:ListRestoreTestingPlans
backup:DeleteRestoreTestingPlan,
backup:GetRestoreTestingPlan