Skip to content

delete_inference_router

delete_inference_router(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    inference_router_name: Optional[InferenceRouterName] = None,
) -> None

Deletes an inference router. The endpoints and inference components that the router sends requests to aren't deleted.

If the router is being created, updated, or deleted, you get a ConflictException.

Parameters:

Raises:

  • ConflictException –

    There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact.

  • ResourceNotFound –

    Resource being access is not found.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def delete_inference_router(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    inference_router_name: Optional[
        "capo_sagemaker.types.inference_router_name.InferenceRouterName"
    ] = None,
) -> None:
    """<p>Deletes an inference router. The endpoints and inference components that the router sends requests to aren't deleted.</p> <p>If the router is being created, updated, or deleted, you get a <code>ConflictException</code>.</p>

    Args:
        inference_router_name: <p>The name of the inference router to delete.</p>

    Raises:
        capo_sagemaker.errors.conflict_exception.ConflictException: <p>There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> or <code>Artifact</code>.</p>
        capo_sagemaker.errors.resource_not_found.ResourceNotFound: <p>Resource being access is not found.</p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sagemaker.types.delete_inference_router_input.DeleteInferenceRouterInput]",
    ) -> OperationResponse[None]:
        import capo_sagemaker._operations.sage_maker.delete_inference_router

        output, http_response = (
            capo_sagemaker._operations.sage_maker.delete_inference_router.delete_inference_router(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteInferenceRouter")
    )
    input_: capo_sagemaker.types.delete_inference_router_input.DeleteInferenceRouterInput = {}
    if inference_router_name is not None:
        input_["inference_router_name"] = inference_router_name

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output