Deletes an inference component.
Parameters:
Raises:
Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
| async def delete_inference_component(
self,
*,
config_overrides: Optional[AsyncSageMakerClientConfig] = None,
inference_component_name: Optional[
"capo_sagemaker.types.inference_component_name.InferenceComponentName"
] = None,
) -> None:
"""<p>Deletes an inference component.</p>
Args:
inference_component_name: <p>The name of the inference component 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_inference_component_input.DeleteInferenceComponentInput]",
) -> AsyncOperationResponse[None]:
import capo_sagemaker._operations.sage_maker.delete_inference_component
(
output,
http_response,
) = await capo_sagemaker._operations.sage_maker.delete_inference_component.async_delete_inference_component(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteInferenceComponent")
)
input_: capo_sagemaker.types.delete_inference_component_input.DeleteInferenceComponentInput = {}
if inference_component_name is not None:
input_["inference_component_name"] = inference_component_name
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|