Skip to content

delete_db_cluster_endpoint async

delete_db_cluster_endpoint(
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    db_cluster_endpoint_identifier: Optional[String] = None,
) -> DBClusterEndpoint

Deletes a custom endpoint and removes it from an Amazon Aurora DB cluster.

This action only applies to Aurora DB clusters.

Parameters:

  • db_cluster_endpoint_identifier (Optional[String], default: None ) –

    The identifier associated with the custom endpoint. This parameter is stored as a lowercase string.

Raises:

Examples:

To delete a custom DB cluster endpoint The following example deletes the specified custom DB cluster endpoint.

>>> await client.delete_db_cluster_endpoint(db_cluster_endpoint_identifier='mycustomendpoint')
Source code in docs_src/capo_rds/_services/async_rds.py
async def delete_db_cluster_endpoint(
    self,
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    db_cluster_endpoint_identifier: Optional["capo_rds.types.string.String"] = None,
) -> "capo_rds.types.db_cluster_endpoint.DBClusterEndpoint":
    """<p>Deletes a custom endpoint and removes it from an Amazon Aurora DB cluster.</p> <note> <p>This action only applies to Aurora DB clusters.</p> </note>

    Args:
        db_cluster_endpoint_identifier: <p>The identifier associated with the custom endpoint. This parameter is stored as a lowercase string.</p>

    Raises:
        capo_rds.errors.db_cluster_endpoint_not_found_fault.DBClusterEndpointNotFoundFault: <p>The specified custom endpoint doesn't exist.</p>
        capo_rds.errors.invalid_db_cluster_endpoint_state_fault.InvalidDBClusterEndpointStateFault: <p>The requested operation can't be performed on the endpoint while the endpoint is in this state.</p>
        capo_rds.errors.invalid_db_cluster_state_fault.InvalidDBClusterStateFault: <p>The requested operation can't be performed while the cluster is in this state.</p>
        capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To delete a custom DB cluster endpoint
        The following example deletes the specified custom DB cluster endpoint.

        >>> await client.delete_db_cluster_endpoint(db_cluster_endpoint_identifier='mycustomendpoint')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_rds.types.delete_db_cluster_endpoint_message.DeleteDBClusterEndpointMessage]",
    ) -> AsyncOperationResponse[
        "capo_rds.types.db_cluster_endpoint.DBClusterEndpoint"
    ]:
        import capo_rds._operations.amazon_rd_sv19.delete_db_cluster_endpoint

        (
            output,
            http_response,
        ) = await capo_rds._operations.amazon_rd_sv19.delete_db_cluster_endpoint.async_delete_db_cluster_endpoint(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteDBClusterEndpoint")
    )
    input_: capo_rds.types.delete_db_cluster_endpoint_message.DeleteDBClusterEndpointMessage = {}
    if db_cluster_endpoint_identifier is not None:
        input_["db_cluster_endpoint_identifier"] = db_cluster_endpoint_identifier

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