recovery_plans
Creates, updates, deletes, gets or lists a recovery_plans resource.
Overview
| Name | recovery_plans |
| Type | Resource |
| Id | aws.drs.recovery_plans |
Fields
The following fields are returned by SELECT queries:
- get_recovery_plan
- list_recovery_plans
| Name | Datatype | Description |
|---|---|---|
name | string | The name of a Recovery Plan. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9 _-]*</code>) |
created_at | string | The timestamp when the Recovery Plan was created. (pattern: <code>[1-9][0-9]*-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([0-1][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](.[0-9]+)?Z</code>) |
description | string | The description of a Recovery Plan. |
recovery_plan_arn | string | Strict ARN type for Recovery Plan resources. Only allows safe characters in the resource portion — rejects HTML/script injection characters (<, >, ", ', etc.) per AWS API input validation standards. Resource portion allows: [A-Za-z0-9_/.-] which covers all DRS recovery plan resource identifiers (plan-xxx, st-xxx, exec-xxx, step-xxx). (pattern: <code>arn:aws(-[a-z0-9]+)*:drs:[a-z0-9-]+:[0-9]{12}:[a-zA-Z0-9_/.-]+</code>) |
status | string | The status of the Recovery Plan. (ACTIVE, INVALID) |
tags | object | The tags associated with the Recovery Plan. |
updated_at | string | The timestamp when the Recovery Plan was last updated. (pattern: <code>[1-9][0-9]*-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([0-1][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](.[0-9]+)?Z</code>) |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of a Recovery Plan. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9 _-]*</code>) |
created_at | string | The timestamp when the Recovery Plan was created. (pattern: <code>[1-9][0-9]*-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([0-1][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](.[0-9]+)?Z</code>) |
recovery_plan_arn | string | Strict ARN type for Recovery Plan resources. Only allows safe characters in the resource portion — rejects HTML/script injection characters (<, >, ", ', etc.) per AWS API input validation standards. Resource portion allows: [A-Za-z0-9_/.-] which covers all DRS recovery plan resource identifiers (plan-xxx, st-xxx, exec-xxx, step-xxx). (pattern: <code>arn:aws(-[a-z0-9]+)*:drs:[a-z0-9-]+:[0-9]{12}:[a-zA-Z0-9_/.-]+</code>) |
status | string | The status of the Recovery Plan. (ACTIVE, INVALID) |
updated_at | string | The timestamp when the Recovery Plan was last updated. (pattern: <code>[1-9][0-9]*-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([0-1][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](.[0-9]+)?Z</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_recovery_plan | select | region | Gets a Recovery Plan by ARN. | |
list_recovery_plans | select | region | Lists all Recovery Plans in the account. | |
create_recovery_plan | insert | region, name | Creates a Recovery Plan to orchestrate multi-server disaster recovery. | |
update_recovery_plan | update | region, recoveryPlanArn | Updates a Recovery Plan's name or description. | |
delete_recovery_plan | delete | region | Deletes a Recovery Plan. Cannot delete a plan that has an execution in a non-terminal status (CREATED, IN_PROGRESS). | |
cancel_recovery_plan_execution | exec | region, recoveryPlanExecutionArn | Cancels an in-progress Recovery Plan execution. Remaining steps are skipped. | |
start_recovery_plan_execution | exec | region, recoveryPlanArn, mode | Starts executing a Recovery Plan in DRILL or RECOVERY mode. A plan cannot have more than one execution in a non-terminal status at a time. |
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) |
SELECT examples
- get_recovery_plan
- list_recovery_plans
Gets a Recovery Plan by ARN.
SELECT
name,
created_at,
description,
recovery_plan_arn,
status,
tags,
updated_at
FROM aws.drs.recovery_plans
WHERE region = '{{ region }}' -- required
;
Lists all Recovery Plans in the account.
SELECT
name,
created_at,
recovery_plan_arn,
status,
updated_at
FROM aws.drs.recovery_plans
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_recovery_plan
- Manifest
Creates a Recovery Plan to orchestrate multi-server disaster recovery.
INSERT INTO aws.drs.recovery_plans (
name,
description,
clientToken,
tags,
region
)
SELECT
'{{ name }}' /* required */,
'{{ description }}',
'{{ clientToken }}',
'{{ tags }}',
'{{ region }}'
RETURNING
recovery_plan
;
# Description fields are for documentation purposes
- name: recovery_plans
props:
- name: region
value: "{{ region }}"
description: Required parameter for the recovery_plans resource.
- name: name
value: "{{ name }}"
description: |
The name of a Recovery Plan.
- name: description
value: "{{ description }}"
description: |
The description of a Recovery Plan.
- name: clientToken
value: "{{ clientToken }}"
- name: tags
value: "{{ tags }}"
UPDATE examples
- update_recovery_plan
Updates a Recovery Plan's name or description.
UPDATE aws.drs.recovery_plans
SET
recoveryPlanArn = '{{ recoveryPlanArn }}',
name = '{{ name }}',
description = '{{ description }}'
WHERE
region = '{{ region }}' --required
AND recoveryPlanArn = '{{ recoveryPlanArn }}' --required
RETURNING
recovery_plan;
DELETE examples
- delete_recovery_plan
Deletes a Recovery Plan. Cannot delete a plan that has an execution in a non-terminal status (CREATED, IN_PROGRESS).
DELETE FROM aws.drs.recovery_plans
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- cancel_recovery_plan_execution
- start_recovery_plan_execution
Cancels an in-progress Recovery Plan execution. Remaining steps are skipped.
EXEC aws.drs.recovery_plans.cancel_recovery_plan_execution
@region='{{ region }}' --required
@@json=
'{
"recoveryPlanExecutionArn": "{{ recoveryPlanExecutionArn }}"
}'
;
Starts executing a Recovery Plan in DRILL or RECOVERY mode. A plan cannot have more than one execution in a non-terminal status at a time.
EXEC aws.drs.recovery_plans.start_recovery_plan_execution
@region='{{ region }}' --required
@@json=
'{
"recoveryPlanArn": "{{ recoveryPlanArn }}",
"mode": "{{ mode }}",
"clientToken": "{{ clientToken }}",
"sourceServers": "{{ sourceServers }}",
"tags": "{{ tags }}"
}'
;