Skip to content

list_inference_routers async

list_inference_routers(
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListInferenceRoutersOutput

Lists the inference routers in your account in the current Amazon Web Services Region. A router that you just created might not appear in the list right away.

Parameters:

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of inference routers to return in the response.

  • next_token (Optional[NextToken], default: None ) –

    If the previous response was truncated, you receive this token. To get the next set of inference routers, use it in your next request.

Raises:

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def list_inference_routers(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    max_results: Optional["capo_sagemaker.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_sagemaker.types.next_token.NextToken"] = None,
) -> (
    "capo_sagemaker.types.list_inference_routers_output.ListInferenceRoutersOutput"
):
    """<p>Lists the inference routers in your account in the current Amazon Web Services Region. A router that you just created might not appear in the list right away.</p>

    Args:
        max_results: <p>The maximum number of inference routers to return in the response.</p>
        next_token: <p>If the previous response was truncated, you receive this token. To get the next set of inference routers, use it in your next request.</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.list_inference_routers_input.ListInferenceRoutersInput]",
    ) -> AsyncOperationResponse[
        "capo_sagemaker.types.list_inference_routers_output.ListInferenceRoutersOutput"
    ]:
        import capo_sagemaker._operations.sage_maker.list_inference_routers

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListInferenceRouters")
    )
    input_: capo_sagemaker.types.list_inference_routers_input.ListInferenceRoutersInput = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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