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/sage_maker.py
| def delete_endpoint_config(
self,
*,
config_overrides: Optional[SageMakerClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_sagemaker.types.delete_endpoint_config_input.DeleteEndpointConfigInput]",
) -> OperationResponse[None]:
import capo_sagemaker._operations.sage_maker.delete_endpoint_config
output, http_response = (
capo_sagemaker._operations.sage_maker.delete_endpoint_config.delete_endpoint_config(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|