source_servers
Creates, updates, deletes, gets or lists a source_servers resource.
Overview
| Name | source_servers |
| Type | Resource |
| Id | aws.mgn.source_servers |
Fields
The following fields are returned by SELECT queries:
- describe_source_servers
| Name | Datatype | Description |
|---|---|---|
application_id | string | Source server application ID. (pattern: <code>app-[0-9a-zA-Z]{17}</code>) |
arn | string | Source server ARN. |
connector_action | object | Source Server connector action. |
data_replication_info | object | Source server data replication info. |
fqdn_for_action_framework | string | Source server fqdn for action framework. |
is_archived | boolean | Source server archived status. |
launched_instance | object | Source server launched instance. |
life_cycle | object | Source server lifecycle state. |
replication_type | string | Source server replication type. (AGENT_BASED, SNAPSHOT_SHIPPING) |
source_properties | object | Source server properties. |
source_server_id | string | Source server ID. (pattern: <code>s-[0-9a-zA-Z]{17}</code>) |
tags | object | Source server Tags. |
user_provided_id | string | Source server user provided ID. (pattern: <code>[^\s\x00]( [^\s\x00])</code>) |
vcenter_client_id | string | Source server vCenter client id. (pattern: <code>vcc-[0-9a-zA-Z]{17}</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_source_servers | select | region | Retrieves all SourceServers or multiple SourceServers by ID. | |
associate_source_servers | update | region, applicationID, sourceServerIDs | Associate source servers to application. | |
update_source_server_replication_type | update | region, sourceServerID, replicationType | Allows you to change between the AGENT_BASED replication type and the SNAPSHOT_SHIPPING replication type. SNAPSHOT_SHIPPING should be used for agentless replication. | |
update_source_server | update | region, sourceServerID | Update Source Server. | |
delete_source_server | delete | region | Deletes a single source server by ID. | |
change_server_life_cycle_state | exec | region, sourceServerID, lifeCycle | Allows the user to set the SourceServer.LifeCycle.state property for specific Source Server IDs to one of the following: READY_FOR_TEST or READY_FOR_CUTOVER. This command only works if the Source Server is already launchable (dataReplicationInfo.lagDuration is not null.) | |
disassociate_source_servers | exec | region, applicationID, sourceServerIDs | Disassociate source servers from application. | |
disconnect_from_service | exec | region, sourceServerID | Disconnects specific Source Servers from Application Migration Service. Data replication is stopped immediately. All AWS resources created by Application Migration Service for enabling the replication of these source servers will be terminated / deleted within 90 minutes. Launched Test or Cutover instances will NOT be terminated. If the agent on the source server has not been prevented from communicating with the Application Migration Service 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. | |
finalize_cutover | exec | region, sourceServerID | Finalizes the cutover immediately for specific Source Servers. All AWS resources created by Application Migration Service for enabling the replication of these source servers will be terminated / deleted within 90 minutes. Launched Test or Cutover instances will NOT be terminated. The AWS Replication Agent will receive a command to uninstall itself (within 10 minutes). The following properties of the SourceServer will be changed immediately: dataReplicationInfo.dataReplicationState will be changed to DISCONNECTED; The SourceServer.lifeCycle.state will be changed to CUTOVER; The totalStorageBytes property fo each of dataReplicationInfo.replicatedDisks will be set to zero; dataReplicationInfo.lagDuration and dataReplicationInfo.lagDuration will be nullified. | |
mark_as_archived | exec | region, sourceServerID | Archives specific Source Servers by setting the SourceServer.isArchived property to true for specified SourceServers by ID. This command only works for SourceServers with a lifecycle. state which equals DISCONNECTED or CUTOVER. | |
pause_replication | exec | region, sourceServerID | Pause Replication. | |
resume_replication | exec | region, sourceServerID | Resume Replication. | |
retry_data_replication | exec | region, sourceServerID | Causes the data replication initiation sequence to begin immediately upon next Handshake for specified SourceServer IDs, regardless of when the previous initiation started. This command will not work if the SourceServer is not stalled or is in a DISCONNECTED or STOPPED state. | |
start_replication | exec | region, sourceServerID | Start replication for source server irrespective of its replication type. | |
stop_replication | exec | region, sourceServerID | Stop Replication. |
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
Retrieves all SourceServers or multiple SourceServers by ID.
SELECT
application_id,
arn,
connector_action,
data_replication_info,
fqdn_for_action_framework,
is_archived,
launched_instance,
life_cycle,
replication_type,
source_properties,
source_server_id,
tags,
user_provided_id,
vcenter_client_id
FROM aws.mgn.source_servers
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- associate_source_servers
- update_source_server_replication_type
- update_source_server
Associate source servers to application.
UPDATE aws.mgn.source_servers
SET
applicationID = '{{ applicationID }}',
sourceServerIDs = '{{ sourceServerIDs }}',
accountID = '{{ accountID }}'
WHERE
region = '{{ region }}' --required
AND applicationID = '{{ applicationID }}' --required
AND sourceServerIDs = '{{ sourceServerIDs }}' --required;
Allows you to change between the AGENT_BASED replication type and the SNAPSHOT_SHIPPING replication type. SNAPSHOT_SHIPPING should be used for agentless replication.
UPDATE aws.mgn.source_servers
SET
sourceServerID = '{{ sourceServerID }}',
replicationType = '{{ replicationType }}',
accountID = '{{ accountID }}'
WHERE
region = '{{ region }}' --required
AND sourceServerID = '{{ sourceServerID }}' --required
AND replicationType = '{{ replicationType }}' --required
RETURNING
application_id,
arn,
connector_action,
data_replication_info,
fqdn_for_action_framework,
is_archived,
launched_instance,
life_cycle,
replication_type,
source_properties,
source_server_id,
tags,
user_provided_id,
vcenter_client_id;
Update Source Server.
UPDATE aws.mgn.source_servers
SET
accountID = '{{ accountID }}',
sourceServerID = '{{ sourceServerID }}',
connectorAction = '{{ connectorAction }}',
userProvidedID = '{{ userProvidedID }}',
fqdnForActionFramework = '{{ fqdnForActionFramework }}',
platform = '{{ platform }}'
WHERE
region = '{{ region }}' --required
AND sourceServerID = '{{ sourceServerID }}' --required
RETURNING
application_id,
arn,
connector_action,
data_replication_info,
fqdn_for_action_framework,
is_archived,
launched_instance,
life_cycle,
replication_type,
source_properties,
source_server_id,
tags,
user_provided_id,
vcenter_client_id;
DELETE examples
- delete_source_server
Deletes a single source server by ID.
DELETE FROM aws.mgn.source_servers
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- change_server_life_cycle_state
- disassociate_source_servers
- disconnect_from_service
- finalize_cutover
- mark_as_archived
- pause_replication
- resume_replication
- retry_data_replication
- start_replication
- stop_replication
Allows the user to set the SourceServer.LifeCycle.state property for specific Source Server IDs to one of the following: READY_FOR_TEST or READY_FOR_CUTOVER. This command only works if the Source Server is already launchable (dataReplicationInfo.lagDuration is not null.)
EXEC aws.mgn.source_servers.change_server_life_cycle_state
@region='{{ region }}' --required
@@json=
'{
"sourceServerID": "{{ sourceServerID }}",
"lifeCycle": "{{ lifeCycle }}",
"accountID": "{{ accountID }}"
}'
;
Disassociate source servers from application.
EXEC aws.mgn.source_servers.disassociate_source_servers
@region='{{ region }}' --required
@@json=
'{
"applicationID": "{{ applicationID }}",
"sourceServerIDs": "{{ sourceServerIDs }}",
"accountID": "{{ accountID }}"
}'
;
Disconnects specific Source Servers from Application Migration Service. Data replication is stopped immediately. All AWS resources created by Application Migration Service for enabling the replication of these source servers will be terminated / deleted within 90 minutes. Launched Test or Cutover instances will NOT be terminated. If the agent on the source server has not been prevented from communicating with the Application Migration Service 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.mgn.source_servers.disconnect_from_service
@region='{{ region }}' --required
@@json=
'{
"sourceServerID": "{{ sourceServerID }}",
"accountID": "{{ accountID }}"
}'
;
Finalizes the cutover immediately for specific Source Servers. All AWS resources created by Application Migration Service for enabling the replication of these source servers will be terminated / deleted within 90 minutes. Launched Test or Cutover instances will NOT be terminated. The AWS Replication Agent will receive a command to uninstall itself (within 10 minutes). The following properties of the SourceServer will be changed immediately: dataReplicationInfo.dataReplicationState will be changed to DISCONNECTED; The SourceServer.lifeCycle.state will be changed to CUTOVER; The totalStorageBytes property fo each of dataReplicationInfo.replicatedDisks will be set to zero; dataReplicationInfo.lagDuration and dataReplicationInfo.lagDuration will be nullified.
EXEC aws.mgn.source_servers.finalize_cutover
@region='{{ region }}' --required
@@json=
'{
"sourceServerID": "{{ sourceServerID }}",
"accountID": "{{ accountID }}"
}'
;
Archives specific Source Servers by setting the SourceServer.isArchived property to true for specified SourceServers by ID. This command only works for SourceServers with a lifecycle. state which equals DISCONNECTED or CUTOVER.
EXEC aws.mgn.source_servers.mark_as_archived
@region='{{ region }}' --required
@@json=
'{
"sourceServerID": "{{ sourceServerID }}",
"accountID": "{{ accountID }}"
}'
;
Pause Replication.
EXEC aws.mgn.source_servers.pause_replication
@region='{{ region }}' --required
@@json=
'{
"sourceServerID": "{{ sourceServerID }}",
"accountID": "{{ accountID }}"
}'
;
Resume Replication.
EXEC aws.mgn.source_servers.resume_replication
@region='{{ region }}' --required
@@json=
'{
"sourceServerID": "{{ sourceServerID }}",
"accountID": "{{ accountID }}"
}'
;
Causes the data replication initiation sequence to begin immediately upon next Handshake for specified SourceServer IDs, regardless of when the previous initiation started. This command will not work if the SourceServer is not stalled or is in a DISCONNECTED or STOPPED state.
EXEC aws.mgn.source_servers.retry_data_replication
@region='{{ region }}' --required
@@json=
'{
"sourceServerID": "{{ sourceServerID }}",
"accountID": "{{ accountID }}"
}'
;
Start replication for source server irrespective of its replication type.
EXEC aws.mgn.source_servers.start_replication
@region='{{ region }}' --required
@@json=
'{
"sourceServerID": "{{ sourceServerID }}",
"accountID": "{{ accountID }}"
}'
;
Stop Replication.
EXEC aws.mgn.source_servers.stop_replication
@region='{{ region }}' --required
@@json=
'{
"sourceServerID": "{{ sourceServerID }}",
"accountID": "{{ accountID }}"
}'
;