Skip to content

delete_endpoint_config async

delete_endpoint_config(
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    endpoint_config_name: Optional[EndpointConfigName] = None,
) -> None

Deletes an endpoint configuration. The DeleteEndpointConfig API deletes only the specified configuration. It does not delete endpoints created using the configuration.

You must not delete an EndpointConfig in use by an endpoint that is live or while the UpdateEndpoint or CreateEndpoint operations are being performed on the endpoint. If you delete the EndpointConfig of an endpoint that is active or being created or updated you may lose visibility into the instance type the endpoint is using. The endpoint must be deleted in order to stop incurring charges.

Parameters:

  • endpoint_config_name (Optional[EndpointConfigName], default: None ) –

    The name of the endpoint configuration that you want to delete.

Raises:

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def delete_endpoint_config(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    endpoint_config_name: Optional[
        "capo_sagemaker.types.endpoint_config_name.EndpointConfigName"
    ] = None,
) -> None:
    """<p>Deletes an endpoint configuration. The <code>DeleteEndpointConfig</code> API deletes only the specified configuration. It does not delete endpoints created using the configuration. </p> <p>You must not delete an <code>EndpointConfig</code> in use by an endpoint that is live or while the <code>UpdateEndpoint</code> or <code>CreateEndpoint</code> operations are being performed on the endpoint. If you delete the <code>EndpointConfig</code> of an endpoint that is active or being created or updated you may lose visibility into the instance type the endpoint is using. The endpoint must be deleted in order to stop incurring charges.</p>

    Args:
        endpoint_config_name: <p>The name of the endpoint configuration that you want to delete.</p>

    Raises:
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sagemaker.types.delete_endpoint_config_input.DeleteEndpointConfigInput]",
    ) -> AsyncOperationResponse[None]:
        import capo_sagemaker._operations.sage_maker.delete_endpoint_config

        (
            output,
            http_response,
        ) = await capo_sagemaker._operations.sage_maker.delete_endpoint_config.async_delete_endpoint_config(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteEndpointConfig")
    )
    input_: capo_sagemaker.types.delete_endpoint_config_input.DeleteEndpointConfigInput = {}
    if endpoint_config_name is not None:
        input_["endpoint_config_name"] = endpoint_config_name

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