Skip to content

delete_inference_component

delete_inference_component(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    inference_component_name: Optional[InferenceComponentName] = None,
) -> None

Deletes an inference component.

Parameters:

Raises:

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def delete_inference_component(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = 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.
    """

    def _handler(
        req: "OperationRequest[capo_sagemaker.types.delete_inference_component_input.DeleteInferenceComponentInput]",
    ) -> OperationResponse[None]:
        import capo_sagemaker._operations.sage_maker.delete_inference_component

        output, http_response = (
            capo_sagemaker._operations.sage_maker.delete_inference_component.delete_inference_component(
                req.options, req.input
            )
        )
        return OperationResponse(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 = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output