Skip to content

delete_endpoint async

delete_endpoint(
    endpoint_arn: String,
    *,
    config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
) -> DeleteEndpointResponse

Deletes the specified endpoint.

All tasks associated with the endpoint must be deleted before you can delete the endpoint.

Parameters:

  • endpoint_arn (String) –

    The Amazon Resource Name (ARN) string that uniquely identifies the endpoint.

Raises:

Examples:

Delete Endpoint Deletes the specified endpoint. All tasks associated with the endpoint must be deleted before you can delete the endpoint.

>>> await client.delete_endpoint(endpoint_arn='arn:aws:dms:us-east-1:123456789012:endpoint:RAAR3R22XSH46S3PWLC3NJAWKM')
Source code in docs_src/capo_database_migration_service/_services/async_database_migration_service.py
async def delete_endpoint(
    self,
    endpoint_arn: "capo_database_migration_service.types.string.String",
    *,
    config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
) -> "capo_database_migration_service.types.delete_endpoint_response.DeleteEndpointResponse":
    """<p>Deletes the specified endpoint.</p> <note> <p>All tasks associated with the endpoint must be deleted before you can delete the endpoint.</p> </note> <p></p>

    Args:
        endpoint_arn: <p>The Amazon Resource Name (ARN) string that uniquely identifies the endpoint.</p>

    Raises:
        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.

    Examples:
        Delete Endpoint
        Deletes the specified endpoint. All tasks associated with the endpoint must be deleted before you can delete the endpoint.


        >>> await client.delete_endpoint(endpoint_arn='arn:aws:dms:us-east-1:123456789012:endpoint:RAAR3R22XSH46S3PWLC3NJAWKM')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_database_migration_service.types.delete_endpoint_message.DeleteEndpointMessage]",
    ) -> AsyncOperationResponse[
        "capo_database_migration_service.types.delete_endpoint_response.DeleteEndpointResponse"
    ]:
        import capo_database_migration_service._operations.amazon_dm_sv20160101.delete_endpoint

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

    def _redact_output(
        output: "capo_database_migration_service.types.delete_endpoint_response.DeleteEndpointResponse",
    ) -> dict[str, Any]:
        import capo_database_migration_service.types.delete_endpoint_response

        return capo_database_migration_service.types.delete_endpoint_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("DeleteEndpoint", redact_output=_redact_output),
    )
    input_: capo_database_migration_service.types.delete_endpoint_message.DeleteEndpointMessage = {
        "endpoint_arn": endpoint_arn
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output