Skip to main content

source_servers

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

Overview

Namesource_servers
TypeResource
Idaws.mgn.source_servers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
application_idstringSource server application ID. (pattern: <code>app-[0-9a-zA-Z]{17}</code>)
arnstringSource server ARN.
connector_actionobjectSource Server connector action.
data_replication_infoobjectSource server data replication info.
fqdn_for_action_frameworkstringSource server fqdn for action framework.
is_archivedbooleanSource server archived status.
launched_instanceobjectSource server launched instance.
life_cycleobjectSource server lifecycle state.
replication_typestringSource server replication type. (AGENT_BASED, SNAPSHOT_SHIPPING)
source_propertiesobjectSource server properties.
source_server_idstringSource server ID. (pattern: <code>s-[0-9a-zA-Z]{17}</code>)
tagsobjectSource server Tags.
user_provided_idstringSource server user provided ID. (pattern: <code>[^\s\x00]( [^\s\x00])</code>)
vcenter_client_idstringSource server vCenter client id. (pattern: <code>vcc-[0-9a-zA-Z]{17}</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_source_serversselectregionRetrieves all SourceServers or multiple SourceServers by ID.
associate_source_serversupdateregion, applicationID, sourceServerIDsAssociate source servers to application.
update_source_server_replication_typeupdateregion, sourceServerID, replicationTypeAllows 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_serverupdateregion, sourceServerIDUpdate Source Server.
delete_source_serverdeleteregionDeletes a single source server by ID.
change_server_life_cycle_stateexecregion, sourceServerID, lifeCycleAllows 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_serversexecregion, applicationID, sourceServerIDsDisassociate source servers from application.
disconnect_from_serviceexecregion, sourceServerIDDisconnects 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_cutoverexecregion, sourceServerIDFinalizes 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_archivedexecregion, sourceServerIDArchives 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_replicationexecregion, sourceServerIDPause Replication.
resume_replicationexecregion, sourceServerIDResume Replication.
retry_data_replicationexecregion, sourceServerIDCauses 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_replicationexecregion, sourceServerIDStart replication for source server irrespective of its replication type.
stop_replicationexecregion, sourceServerIDStop 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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 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;

DELETE examples

Deletes a single source server by ID.

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

Lifecycle Methods

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 }}"
}'
;