Skip to content

delete_replication_config async

delete_replication_config(
    replication_config_arn: String,
    *,
    config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
) -> DeleteReplicationConfigResponse

Deletes an DMS Serverless replication configuration. This effectively deprovisions any and all replications that use this configuration. You can't delete the configuration for an DMS Serverless replication that is ongoing. You can delete the configuration when the replication is in a non-RUNNING and non-STARTING state.

Parameters:

  • replication_config_arn (String) –

    The replication config to delete.

Raises:

Source code in docs_src/capo_database_migration_service/_services/async_database_migration_service.py
async def delete_replication_config(
    self,
    replication_config_arn: "capo_database_migration_service.types.string.String",
    *,
    config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
) -> "capo_database_migration_service.types.delete_replication_config_response.DeleteReplicationConfigResponse":
    """<p>Deletes an DMS Serverless replication configuration. This effectively deprovisions any and all replications that use this configuration. You can't delete the configuration for an DMS Serverless replication that is ongoing. You can delete the configuration when the replication is in a non-RUNNING and non-STARTING state.</p>

    Args:
        replication_config_arn: <p>The replication config to delete.</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.delete_replication_config_message.DeleteReplicationConfigMessage]",
    ) -> AsyncOperationResponse[
        "capo_database_migration_service.types.delete_replication_config_response.DeleteReplicationConfigResponse"
    ]:
        import capo_database_migration_service._operations.amazon_dm_sv20160101.delete_replication_config

        (
            output,
            http_response,
        ) = await capo_database_migration_service._operations.amazon_dm_sv20160101.delete_replication_config.async_delete_replication_config(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteReplicationConfig")
    )
    input_: capo_database_migration_service.types.delete_replication_config_message.DeleteReplicationConfigMessage = {
        "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