recovery_instances
Creates, updates, deletes, gets or lists a recovery_instances resource.
Overview
| Name | recovery_instances |
| Type | Resource |
| Id | aws.drs.recovery_instances |
Fields
The following fields are returned by SELECT queries:
- describe_recovery_instances
| Name | Datatype | Description |
|---|---|---|
agent_version | string | The 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>) |
arn | string | The ARN of the Recovery Instance. (pattern: <code>arn:.{16,2044}</code>) |
data_replication_info | object | The Data Replication Info of the Recovery Instance. |
ec_2_instance_id | string | The EC2 instance ID of the Recovery Instance. (pattern: <code>i-[0-9a-fA-F]{8,}</code>) |
ec_2_instance_state | string | The state of the EC2 instance for this Recovery Instance. (PENDING, RUNNING, STOPPING, STOPPED, SHUTTING-DOWN, TERMINATED, NOT_FOUND) |
failback | object | An object representing failback related information of the Recovery Instance. |
is_drill | boolean | Whether this Recovery Instance was created for a drill or for an actual Recovery event. |
job_id | string | The ID of the Job that created the Recovery Instance. (pattern: <code>drsjob-[0-9a-zA-Z]{17}</code>) |
origin_availability_zone | string | AWS 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_environment | string | Environment (On Premises / AWS) of the instance that the recovery instance originated from. (ON_PREMISES, AWS) |
point_in_time_snapshot_date_time | string | The 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_id | string | The ID of the Recovery Instance. (pattern: <code>i-[0-9a-fA-F]{8,}</code>) |
recovery_instance_properties | object | Properties of the Recovery Instance machine. |
source_outpost_arn | string | The 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_id | string | The Source Server ID that this Recovery Instance is associated with. (pattern: <code>s-[0-9a-zA-Z]{17}</code>) |
tags | object | An array of tags that are associated with the Recovery Instance. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_recovery_instances | select | region | Lists all Recovery Instances or multiple Recovery Instances by ID. | |
delete_recovery_instance | delete | region | 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. | |
terminate_recovery_instances | delete | region | Initiates 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_instance | exec | region, recoveryInstanceID | 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. | |
reverse_replication | exec | region, recoveryInstanceID | Start 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_failback | exec | region, recoveryInstanceID | Stops 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_recovery_instances
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
- delete_recovery_instance
- terminate_recovery_instances
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
;
Initiates 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.
DELETE FROM aws.drs.recovery_instances
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- disconnect_recovery_instance
- reverse_replication
- stop_failback
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 }}"
}'
;
Start 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.
EXEC aws.drs.recovery_instances.reverse_replication
@region='{{ region }}' --required
@@json=
'{
"recoveryInstanceID": "{{ recoveryInstanceID }}"
}'
;
Stops the failback process for a specified Recovery Instance. This changes the Failback State of the Recovery Instance back to FAILBACK_NOT_STARTED.
EXEC aws.drs.recovery_instances.stop_failback
@region='{{ region }}' --required
@@json=
'{
"recoveryInstanceID": "{{ recoveryInstanceID }}"
}'
;