Skip to content

list_inference_gateways

list_inference_gateways(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    identifier: Optional[GlobalInferenceGatewayIdentifier] = None,
    filters: Optional[GlobalInferenceGatewayMemberFilters] = None,
    next_token: Optional[GlobalInferenceGatewayNextToken] = None,
    max_results: Optional[GlobalInferenceGatewayMaxResults] = None,
) -> ListInferenceGatewaysResponse

Lists the in-cluster inference gateways in a global inference gateway, in the order that they were added. Each summary includes the status of the in-cluster inference gateway and, if the status is FAILED, the reason for the failure. DescribeGlobalInferenceGateway doesn't return the in-cluster inference gateways; use this operation to list them.

Parameters:

Raises:

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def list_inference_gateways(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    identifier: Optional[
        "capo_sagemaker.types.global_inference_gateway_identifier.GlobalInferenceGatewayIdentifier"
    ] = None,
    filters: Optional[
        "capo_sagemaker.types.global_inference_gateway_member_filters.GlobalInferenceGatewayMemberFilters"
    ] = None,
    next_token: Optional[
        "capo_sagemaker.types.global_inference_gateway_next_token.GlobalInferenceGatewayNextToken"
    ] = None,
    max_results: Optional[
        "capo_sagemaker.types.global_inference_gateway_max_results.GlobalInferenceGatewayMaxResults"
    ] = None,
) -> "capo_sagemaker.types.list_inference_gateways_response.ListInferenceGatewaysResponse":
    """Lists the in-cluster inference gateways in a global inference gateway, in the order that they were added. Each summary includes the status of the in-cluster inference gateway and, if the status is `FAILED`, the reason for the failure. `DescribeGlobalInferenceGateway` doesn't return the in-cluster inference gateways; use this operation to list them.

    Args:
        identifier: <p>The name, Amazon Resource Name (ARN), or ID of the global inference gateway.</p>
        filters: The filters to apply to the results. You can filter by `Status` and `ClusterArn`. Multiple filters are combined with a logical AND.
        next_token: <p>If the result of the previous <code>ListInferenceGateways</code> request was truncated, the response includes a <code>NextToken</code>. To retrieve the next set of in-cluster inference gateways, use the token in the next request.</p>
        max_results: <p>The maximum number of in-cluster inference gateways to return in the response.</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.
    """

    def _handler(
        req: "OperationRequest[capo_sagemaker.types.list_inference_gateways_request.ListInferenceGatewaysRequest]",
    ) -> OperationResponse[
        "capo_sagemaker.types.list_inference_gateways_response.ListInferenceGatewaysResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.list_inference_gateways

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListInferenceGateways")
    )
    input_: capo_sagemaker.types.list_inference_gateways_request.ListInferenceGatewaysRequest = {}
    if identifier is not None:
        input_["identifier"] = identifier
    if filters is not None:
        input_["filters"] = filters
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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