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 Application Migration 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.
Parameters:
-
source_server_id
(SourceServerID)
–
Request to disconnect Source Server from service by Server ID.
-
account_id
(Optional[AccountID], default:
None
)
–
Request to disconnect Source Server from service by Account ID.
Raises:
Source code in docs_src/capo_mgn/_services/async_mgn.py
| async def disconnect_from_service(
self,
source_server_id: "capo_mgn.types.source_server_id.SourceServerID",
*,
config_overrides: Optional[AsyncmgnClientConfig] = None,
account_id: Optional["capo_mgn.types.account_id.AccountID"] = None,
) -> "capo_mgn.types.source_server.SourceServer":
"""<p>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 Application Migration 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.</p>
Args:
source_server_id: <p>Request to disconnect Source Server from service by Server ID.</p>
account_id: <p>Request to disconnect Source Server from service by Account ID.</p>
Raises:
capo_mgn.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the target resource.</p>
capo_mgn.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource not found exception.</p>
capo_mgn.errors.uninitialized_account_exception.UninitializedAccountException: <p>Uninitialized account exception.</p>
capo_mgn.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_mgn.types.disconnect_from_service_request.DisconnectFromServiceRequest]",
) -> AsyncOperationResponse["capo_mgn.types.source_server.SourceServer"]:
import capo_mgn._operations.application_migration_service.disconnect_from_service
(
output,
http_response,
) = await capo_mgn._operations.application_migration_service.disconnect_from_service.async_disconnect_from_service(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_mgn.types.source_server.SourceServer",
) -> dict[str, Any]:
import capo_mgn.types.source_server
return capo_mgn.types.source_server.redact_sensitive(output)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("DisconnectFromService", redact_output=_redact_output),
)
input_: capo_mgn.types.disconnect_from_service_request.DisconnectFromServiceRequest = {
"source_server_id": source_server_id
}
if account_id is not None:
input_["account_id"] = account_id
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|