Skip to content

describe_inference_router async

describe_inference_router(
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    inference_router_name: Optional[InferenceRouterName] = None,
) -> DescribeInferenceRouterOutput

Returns information about an inference router, including the routing status of each destination.

SageMaker AI checks each destination with your permissions when you call this operation, so callers with different permissions can see a different RoutingStatus. To get the router's tags, use ListTags.

Parameters:

Raises:

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def describe_inference_router(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    inference_router_name: Optional[
        "capo_sagemaker.types.inference_router_name.InferenceRouterName"
    ] = None,
) -> "capo_sagemaker.types.describe_inference_router_output.DescribeInferenceRouterOutput":
    """<p>Returns information about an inference router, including the routing status of each destination.</p> <p>SageMaker AI checks each destination with your permissions when you call this operation, so callers with different permissions can see a different <code>RoutingStatus</code>. To get the router's tags, use <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ListTags.html">ListTags</a>.</p>

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

    Raises:
        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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sagemaker.types.describe_inference_router_input.DescribeInferenceRouterInput]",
    ) -> AsyncOperationResponse[
        "capo_sagemaker.types.describe_inference_router_output.DescribeInferenceRouterOutput"
    ]:
        import capo_sagemaker._operations.sage_maker.describe_inference_router

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

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

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