Skip to main content

source_servers

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

Overview

Namesource_servers
TypeResource
Idaws.drs.source_servers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
agent_versionstringThe version of the DRS agent installed on the source server (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 Source Server. (pattern: <code>arn:.{16,2044}</code>)
data_replication_infoobjectThe Data Replication Info of the Source Server.
last_launch_resultstringThe status of the last recovery launch of this Source Server. (NOT_STARTED, PENDING, SUCCEEDED, FAILED)
life_cycleobjectThe lifecycle information of this Source Server.
recovery_instance_idstringThe ID of the Recovery Instance associated with this Source Server. (pattern: <code>i-[0-9a-fA-F]{8,}</code>)
replication_directionstringReplication direction of the Source Server. (FAILOVER, FAILBACK)
reversed_direction_source_server_arnstringFor EC2-originated Source Servers which have been failed over and then failed back, this value will mean the ARN of the Source Server on the opposite replication direction. (pattern: <code>arn:(?:[0-9a-zA-Z_-]+:){3}([0-9]{12,}):source-server/(s-[0-9a-zA-Z]{17})</code>)
source_cloud_propertiesobjectSource cloud properties of the Source Server.
source_network_idstringID of the Source Network which is protecting this Source Server's network. (pattern: <code>sn-[0-9a-zA-Z]{17}</code>)
source_propertiesobjectThe source properties of the Source Server.
source_server_idstringThe ID of the Source Server. (pattern: <code>s-[0-9a-zA-Z]{17}</code>)
staging_areaobjectThe staging area of the source server.
tagsobjectThe tags associated with the Source Server.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_source_serversselectregionLists all Source Servers or multiple Source Servers filtered by ID.
create_extended_source_serverinsertregion, sourceServerArnCreate an extended source server in the target Account based on the source server in staging account.
delete_source_serverdeleteregionDeletes a single Source Server by ID. The Source Server must be disconnected first.
disconnect_source_serverexecregion, sourceServerIDDisconnects a specific Source Server from Elastic Disaster Recovery. Data replication is stopped immediately. All AWS resources created by Elastic Disaster Recovery for enabling the replication of the Source Server will be terminated / deleted within 90 minutes. You cannot disconnect a Source Server if it has a Recovery Instance. If the agent on the Source Server 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 SourceServer 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.
retry_data_replicationexecregion, sourceServerIDWARNING: RetryDataReplication is deprecated. Causes the data replication initiation sequence to begin immediately upon next Handshake for the specified Source Server ID, regardless of when the previous initiation started. This command will work only if the Source Server is stalled or is in a DISCONNECTED or STOPPED state.
start_replicationexecregion, sourceServerIDStarts replication for a stopped Source Server. This action would make the Source Server protected again and restart billing for it.
stop_replicationexecregion, sourceServerIDStops replication for a Source Server. This action would make the Source Server unprotected, delete its existing snapshots and stop billing for it.

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 Source Servers or multiple Source Servers filtered by ID.

SELECT
agent_version,
arn,
data_replication_info,
last_launch_result,
life_cycle,
recovery_instance_id,
replication_direction,
reversed_direction_source_server_arn,
source_cloud_properties,
source_network_id,
source_properties,
source_server_id,
staging_area,
tags
FROM aws.drs.source_servers
WHERE region = '{{ region }}' -- required
;

INSERT examples

Create an extended source server in the target Account based on the source server in staging account.

INSERT INTO aws.drs.source_servers (
sourceServerArn,
tags,
region
)
SELECT
'{{ sourceServerArn }}' /* required */,
'{{ tags }}',
'{{ region }}'
RETURNING
source_server
;

DELETE examples

Deletes a single Source Server by ID. The Source Server must be disconnected first.

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

Lifecycle Methods

Disconnects a specific Source Server from Elastic Disaster Recovery. Data replication is stopped immediately. All AWS resources created by Elastic Disaster Recovery for enabling the replication of the Source Server will be terminated / deleted within 90 minutes. You cannot disconnect a Source Server if it has a Recovery Instance. If the agent on the Source Server 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 SourceServer 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.source_servers.disconnect_source_server
@region='{{ region }}' --required
@@json=
'{
"sourceServerID": "{{ sourceServerID }}"
}'
;