Skip to content

delete_endpoint async

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

Deletes a model-specific endpoint for a previously-trained custom model. All endpoints must be deleted in order for the model to be deleted. For information about endpoints, see Managing endpoints.

Parameters:

  • endpoint_arn (ComprehendEndpointArn) –

    The Amazon Resource Number (ARN) of the endpoint being deleted.

Raises:

Source code in docs_src/capo_comprehend/_services/async_comprehend.py
async def delete_endpoint(
    self,
    endpoint_arn: "capo_comprehend.types.comprehend_endpoint_arn.ComprehendEndpointArn",
    *,
    config_overrides: Optional[AsyncComprehendClientConfig] = None,
) -> "capo_comprehend.types.delete_endpoint_response.DeleteEndpointResponse":
    """<p>Deletes a model-specific endpoint for a previously-trained custom model. All endpoints must be deleted in order for the model to be deleted. For information about endpoints, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html">Managing endpoints</a>.</p>

    Args:
        endpoint_arn: <p>The Amazon Resource Number (ARN) of the endpoint being deleted.</p>

    Raises:
        capo_comprehend.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
        capo_comprehend.errors.invalid_request_exception.InvalidRequestException: <p>The request is invalid.</p>
        capo_comprehend.errors.resource_in_use_exception.ResourceInUseException: <p>The specified resource name is already in use. Use a different name and try your request again.</p>
        capo_comprehend.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
        capo_comprehend.errors.too_many_requests_exception.TooManyRequestsException: <p>The number of requests exceeds the limit. Resubmit your request later.</p>
        capo_comprehend.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_comprehend.types.delete_endpoint_request.DeleteEndpointRequest]",
    ) -> AsyncOperationResponse[
        "capo_comprehend.types.delete_endpoint_response.DeleteEndpointResponse"
    ]:
        import capo_comprehend._operations.comprehend_20171127.delete_endpoint

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteEndpoint")
    )
    input_: capo_comprehend.types.delete_endpoint_request.DeleteEndpointRequest = {
        "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