Skip to main content

recovery_instances

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

Overview

Namerecovery_instances
TypeResource
Idaws.drs.recovery_instances

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
agent_versionstringThe version of the DRS agent installed on the recovery instance (pattern: <code>[0-9]{1,5}.[0-9]{1,5}.[0-9]{1,5}(.[0-9]{4}.[0-9]{3}.[0-9]{4})?</code>)
arnstringThe ARN of the Recovery Instance. (pattern: <code>arn:.{16,2044}</code>)
data_replication_infoobjectThe Data Replication Info of the Recovery Instance.
ec_2_instance_idstringThe EC2 instance ID of the Recovery Instance. (pattern: <code>i-[0-9a-fA-F]{8,}</code>)
ec_2_instance_statestringThe state of the EC2 instance for this Recovery Instance. (PENDING, RUNNING, STOPPING, STOPPED, SHUTTING-DOWN, TERMINATED, NOT_FOUND)
failbackobjectAn object representing failback related information of the Recovery Instance.
is_drillbooleanWhether this Recovery Instance was created for a drill or for an actual Recovery event.
job_idstringThe ID of the Job that created the Recovery Instance. (pattern: <code>drsjob-[0-9a-zA-Z]{17}</code>)
origin_availability_zonestringAWS availability zone associated with the recovery instance. (pattern: <code>(us(-gov)?|ap|ca|cn|eu|eusc|sa|af|me|mx|il)-([a-z]{2}-)?(central|north|(north(?:east|west))|south|south(?:east|west)|east|west)-[0-9][a-z]</code>)
origin_environmentstringEnvironment (On Premises / AWS) of the instance that the recovery instance originated from. (ON_PREMISES, AWS)
point_in_time_snapshot_date_timestringThe date and time of the Point in Time (PIT) snapshot that this Recovery Instance was launched from. (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_instance_idstringThe ID of the Recovery Instance. (pattern: <code>i-[0-9a-fA-F]{8,}</code>)
recovery_instance_propertiesobjectProperties of the Recovery Instance machine.
source_outpost_arnstringThe ARN of the source Outpost (pattern: <code>arn:aws([a-z-]+)?:outposts:[a-z\d-]+:\d{12}:outpost/op-[a-f0-9]{17}</code>)
source_server_idstringThe Source Server ID that this Recovery Instance is associated with. (pattern: <code>s-[0-9a-zA-Z]{17}</code>)
tagsobjectAn array of tags that are associated with the Recovery Instance.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_recovery_instancesselectregionLists all Recovery Instances or multiple Recovery Instances by ID.
delete_recovery_instancedeleteregionDeletes a single Recovery Instance by ID. This deletes the Recovery Instance resource from Elastic Disaster Recovery. The Recovery Instance must be disconnected first in order to delete it.
terminate_recovery_instancesdeleteregionInitiates a Job for terminating the EC2 resources associated with the specified Recovery Instances, and then will delete the Recovery Instances from the Elastic Disaster Recovery service.
disconnect_recovery_instanceexecregion, recoveryInstanceIDDisconnect a Recovery Instance from Elastic Disaster Recovery. Data replication is stopped immediately. All AWS resources created by Elastic Disaster Recovery for enabling the replication of the Recovery Instance will be terminated / deleted within 90 minutes. If the agent on the Recovery Instance has not been prevented from communicating with the Elastic Disaster Recovery service, then it will receive a command to uninstall itself (within approximately 10 minutes). The following properties of the Recovery Instance will be changed immediately: dataReplicationInfo.dataReplicationState will be set to DISCONNECTED; The totalStorageBytes property for each of dataReplicationInfo.replicatedDisks will be set to zero; dataReplicationInfo.lagDuration and dataReplicationInfo.lagDuration will be nullified.
reverse_replicationexecregion, recoveryInstanceIDStart replication to origin / target region - applies only to protected instances that originated in EC2. For recovery instances on target region - starts replication back to origin region. For failback instances on origin region - starts replication to target region to re-protect them.
stop_failbackexecregion, recoveryInstanceIDStops the failback process for a specified Recovery Instance. This changes the Failback State of the Recovery Instance back to FAILBACK_NOT_STARTED.

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

Lists all Recovery Instances or multiple Recovery Instances by ID.

SELECT
agent_version,
arn,
data_replication_info,
ec_2_instance_id,
ec_2_instance_state,
failback,
is_drill,
job_id,
origin_availability_zone,
origin_environment,
point_in_time_snapshot_date_time,
recovery_instance_id,
recovery_instance_properties,
source_outpost_arn,
source_server_id,
tags
FROM aws.drs.recovery_instances
WHERE region = '{{ region }}' -- required
;

DELETE examples

Deletes a single Recovery Instance by ID. This deletes the Recovery Instance resource from Elastic Disaster Recovery. The Recovery Instance must be disconnected first in order to delete it.

DELETE FROM aws.drs.recovery_instances
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Disconnect a Recovery Instance from Elastic Disaster Recovery. Data replication is stopped immediately. All AWS resources created by Elastic Disaster Recovery for enabling the replication of the Recovery Instance will be terminated / deleted within 90 minutes. If the agent on the Recovery Instance has not been prevented from communicating with the Elastic Disaster Recovery service, then it will receive a command to uninstall itself (within approximately 10 minutes). The following properties of the Recovery Instance will be changed immediately: dataReplicationInfo.dataReplicationState will be set to DISCONNECTED; The totalStorageBytes property for each of dataReplicationInfo.replicatedDisks will be set to zero; dataReplicationInfo.lagDuration and dataReplicationInfo.lagDuration will be nullified.

EXEC aws.drs.recovery_instances.disconnect_recovery_instance
@region='{{ region }}' --required
@@json=
'{
"recoveryInstanceID": "{{ recoveryInstanceID }}"
}'
;