Skip to content

stop_replication

stop_replication(
    replication_config_arn: String,
    *,
    config_overrides: Optional[DatabaseMigrationServiceClientConfig] = None,
) -> StopReplicationResponse

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/database_migration_service.py
def stop_replication(
    self,
    replication_config_arn: "capo_database_migration_service.types.string.String",
    *,
    config_overrides: Optional[DatabaseMigrationServiceClientConfig] = 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.
    """

    def _handler(
        req: "OperationRequest[capo_database_migration_service.types.stop_replication_message.StopReplicationMessage]",
    ) -> OperationResponse[
        "capo_database_migration_service.types.stop_replication_response.StopReplicationResponse"
    ]:
        import capo_database_migration_service._operations.amazon_dm_sv20160101.stop_replication

        output, http_response = (
            capo_database_migration_service._operations.amazon_dm_sv20160101.stop_replication.stop_replication(
                req.options, req.input
            )
        )
        return OperationResponse(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 = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output