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/sage_maker.py
| def list_inference_routers(
self,
*,
config_overrides: Optional[SageMakerClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_sagemaker.types.list_inference_routers_input.ListInferenceRoutersInput]",
) -> OperationResponse[
"capo_sagemaker.types.list_inference_routers_output.ListInferenceRoutersOutput"
]:
import capo_sagemaker._operations.sage_maker.list_inference_routers
output, http_response = (
capo_sagemaker._operations.sage_maker.list_inference_routers.list_inference_routers(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|