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 = '{{ region }}' 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 = '{{ region }}';
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.backup.restore_testing_plans
WHERE
Identifier = '{{ restore_testing_plan_name }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
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