source_servers
Creates, updates, deletes, gets or lists a source_servers resource.
Overview
| Name | source_servers |
| Type | Resource |
| Id | aws.drs.source_servers |
Fields
The following fields are returned by SELECT queries:
- describe_source_servers
| Name | Datatype | Description |
|---|---|---|
agent_version | string | The 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>) |
arn | string | The ARN of the Source Server. (pattern: <code>arn:.{16,2044}</code>) |
data_replication_info | object | The Data Replication Info of the Source Server. |
last_launch_result | string | The status of the last recovery launch of this Source Server. (NOT_STARTED, PENDING, SUCCEEDED, FAILED) |
life_cycle | object | The lifecycle information of this Source Server. |
recovery_instance_id | string | The ID of the Recovery Instance associated with this Source Server. (pattern: <code>i-[0-9a-fA-F]{8,}</code>) |
replication_direction | string | Replication direction of the Source Server. (FAILOVER, FAILBACK) |
reversed_direction_source_server_arn | string | For 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_properties | object | Source cloud properties of the Source Server. |
source_network_id | string | ID of the Source Network which is protecting this Source Server's network. (pattern: <code>sn-[0-9a-zA-Z]{17}</code>) |
source_properties | object | The source properties of the Source Server. |
source_server_id | string | The ID of the Source Server. (pattern: <code>s-[0-9a-zA-Z]{17}</code>) |
staging_area | object | The staging area of the source server. |
tags | object | The tags associated with the Source Server. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_source_servers | select | region | Lists all Source Servers or multiple Source Servers filtered by ID. | |
create_extended_source_server | insert | region, sourceServerArn | Create an extended source server in the target Account based on the source server in staging account. | |
delete_source_server | delete | region | Deletes a single Source Server by ID. The Source Server must be disconnected first. | |
disconnect_source_server | exec | region, sourceServerID | 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. | |
retry_data_replication | exec | region, sourceServerID | WARNING: 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_replication | exec | region, sourceServerID | Starts replication for a stopped Source Server. This action would make the Source Server protected again and restart billing for it. | |
stop_replication | exec | region, sourceServerID | Stops 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_source_servers
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_extended_source_server
- Manifest
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
;
# Description fields are for documentation purposes
- name: source_servers
props:
- name: region
value: "{{ region }}"
description: Required parameter for the source_servers resource.
- name: sourceServerArn
value: "{{ sourceServerArn }}"
- name: tags
value: "{{ tags }}"
DELETE examples
- delete_source_server
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
- disconnect_source_server
- retry_data_replication
- start_replication
- stop_replication
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 }}"
}'
;
WARNING: 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.
EXEC aws.drs.source_servers.retry_data_replication
@region='{{ region }}' --required
@@json=
'{
"sourceServerID": "{{ sourceServerID }}"
}'
;
Starts replication for a stopped Source Server. This action would make the Source Server protected again and restart billing for it.
EXEC aws.drs.source_servers.start_replication
@region='{{ region }}' --required
@@json=
'{
"sourceServerID": "{{ sourceServerID }}"
}'
;
Stops replication for a Source Server. This action would make the Source Server unprotected, delete its existing snapshots and stop billing for it.
EXEC aws.drs.source_servers.stop_replication
@region='{{ region }}' --required
@@json=
'{
"sourceServerID": "{{ sourceServerID }}"
}'
;