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 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 finalize Cutover by Source Server ID.
-
account_id
(Optional[AccountID], default:
None
)
–
Request to finalize Cutover by Source Account ID.
Raises:
Source code in docs_src/capo_mgn/_services/mgn.py
| def finalize_cutover(
self,
source_server_id: "capo_mgn.types.source_server_id.SourceServerID",
*,
config_overrides: Optional[mgnClientConfig] = None,
account_id: Optional["capo_mgn.types.account_id.AccountID"] = None,
) -> "capo_mgn.types.source_server.SourceServer":
"""<p>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 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 finalize Cutover by Source Server ID.</p>
account_id: <p>Request to finalize Cutover by Source 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.validation_exception.ValidationException: <p>Validate exception.</p>
capo_mgn.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_mgn.types.finalize_cutover_request.FinalizeCutoverRequest]",
) -> OperationResponse["capo_mgn.types.source_server.SourceServer"]:
import capo_mgn._operations.application_migration_service.finalize_cutover
output, http_response = (
capo_mgn._operations.application_migration_service.finalize_cutover.finalize_cutover(
req.options, req.input
)
)
return OperationResponse(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("FinalizeCutover", redact_output=_redact_output),
)
input_: capo_mgn.types.finalize_cutover_request.FinalizeCutoverRequest = {
"source_server_id": source_server_id
}
if account_id is not None:
input_["account_id"] = account_id
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|