For a given DMS Serverless replication configuration, DMS stops any and all ongoing DMS Serverless replications. This command doesn't deprovision the stopped replications.
Parameters:
-
replication_config_arn
(String)
–
The Amazon Resource Name of the replication to stop.
Raises:
Source code in docs_src/capo_database_migration_service/_services/async_database_migration_service.py
| async def stop_replication(
self,
replication_config_arn: "capo_database_migration_service.types.string.String",
*,
config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
) -> "capo_database_migration_service.types.stop_replication_response.StopReplicationResponse":
"""<p>For a given DMS Serverless replication configuration, DMS stops any and all ongoing DMS Serverless replications. This command doesn't deprovision the stopped replications.</p>
Args:
replication_config_arn: <p>The Amazon Resource Name of the replication to stop.</p>
Raises:
capo_database_migration_service.errors.access_denied_fault.AccessDeniedFault: <p>DMS was denied access to the endpoint. Check that the role is correctly configured.</p>
capo_database_migration_service.errors.invalid_resource_state_fault.InvalidResourceStateFault: <p>The resource is in a state that prevents it from being used for database migration.</p>
capo_database_migration_service.errors.resource_not_found_fault.ResourceNotFoundFault: <p>The resource could not be found.</p>
capo_database_migration_service.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_database_migration_service.types.stop_replication_message.StopReplicationMessage]",
) -> AsyncOperationResponse[
"capo_database_migration_service.types.stop_replication_response.StopReplicationResponse"
]:
import capo_database_migration_service._operations.amazon_dm_sv20160101.stop_replication
(
output,
http_response,
) = await capo_database_migration_service._operations.amazon_dm_sv20160101.stop_replication.async_stop_replication(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StopReplication")
)
input_: capo_database_migration_service.types.stop_replication_message.StopReplicationMessage = {
"replication_config_arn": replication_config_arn
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|