Skip to main content

recovery_plans

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

Overview

Namerecovery_plans
TypeResource
Idaws.drs.recovery_plans

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of a Recovery Plan. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9 _-]*</code>)
created_atstringThe 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>)
descriptionstringThe description of a Recovery Plan.
recovery_plan_arnstringStrict 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>)
statusstringThe status of the Recovery Plan. (ACTIVE, INVALID)
tagsobjectThe tags associated with the Recovery Plan.
updated_atstringThe 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:

NameAccessible byRequired ParamsOptional ParamsDescription
get_recovery_planselectregionGets a Recovery Plan by ARN.
list_recovery_plansselectregionLists all Recovery Plans in the account.
create_recovery_planinsertregion, nameCreates a Recovery Plan to orchestrate multi-server disaster recovery.
update_recovery_planupdateregion, recoveryPlanArnUpdates a Recovery Plan's name or description.
delete_recovery_plandeleteregionDeletes a Recovery Plan. Cannot delete a plan that has an execution in a non-terminal status (CREATED, IN_PROGRESS).
cancel_recovery_plan_executionexecregion, recoveryPlanExecutionArnCancels an in-progress Recovery Plan execution. Remaining steps are skipped.
start_recovery_plan_executionexecregion, recoveryPlanArn, modeStarts 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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

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 }}"
}'
;