Skip to content

list_route_calculators async

list_route_calculators(
    *,
    config_overrides: Optional[AsyncLocationClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional[Token] = None,
) -> ListRouteCalculatorsResponse

This operation is no longer current and may be deprecated in the future. We recommend you upgrade to the Routes API V2 unless you require Grab data.

  • ListRouteCalculators is part of a previous Amazon Location Service Routes API (version 1) which has been superseded by a more intuitive, powerful, and complete API (version 2).

  • The Routes API version 2 has a simplified interface that can be used without creating or managing route calculator resources.

  • If you are using an Amazon Web Services SDK or the Amazon Web Services CLI, note that the Routes API version 2 is found under geo-routes or geo_routes, not under location.

  • Since Grab is not yet fully supported in Routes API version 2, we recommend you continue using API version 1 when using Grab.

  • Start your version 2 API journey with the Routes V2 API Reference or the Developer Guide.

Lists route calculator resources in your Amazon Web Services account.

Parameters:

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

    An optional maximum number of results returned in a single call.

    Default Value: 100

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

    The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

    Default Value: null

Raises:

  • AccessDeniedException –

    The request was denied because of insufficient access or permissions. Check with an administrator to verify your permissions.

  • InternalServerException –

    The request has failed to process because of an unknown server error, exception, or failure.

  • ThrottlingException –

    The request was denied because of request throttling.

  • ValidationException –

    The input failed to meet the constraints specified by the AWS service.

  • UnknownServiceError –

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

Source code in docs_src/capo_location/_services/async_location.py
async def list_route_calculators(
    self,
    *,
    config_overrides: Optional[AsyncLocationClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional["capo_location.types.token.Token"] = None,
) -> "capo_location.types.list_route_calculators_response.ListRouteCalculatorsResponse":
    """<important> <p>This operation is no longer current and may be deprecated in the future. We recommend you upgrade to the Routes API V2 unless you require Grab data.</p> <ul> <li> <p> <code>ListRouteCalculators</code> is part of a previous Amazon Location Service Routes API (version 1) which has been superseded by a more intuitive, powerful, and complete API (version 2).</p> </li> <li> <p>The Routes API version 2 has a simplified interface that can be used without creating or managing route calculator resources.</p> </li> <li> <p>If you are using an Amazon Web Services SDK or the Amazon Web Services CLI, note that the Routes API version 2 is found under <code>geo-routes</code> or <code>geo_routes</code>, not under <code>location</code>.</p> </li> <li> <p>Since Grab is not yet fully supported in Routes API version 2, we recommend you continue using API version 1 when using Grab.</p> </li> <li> <p>Start your version 2 API journey with the Routes V2 <a href="/location/latest/APIReference/API_Operations_Amazon_Location_Service_Routes_V2.html">API Reference</a> or the <a href="/location/latest/developerguide/routes.html">Developer Guide</a>.</p> </li> </ul> </important> <p>Lists route calculator resources in your Amazon Web Services account.</p>

    Args:
        max_results: <p>An optional maximum number of results returned in a single call.</p> <p>Default Value: <code>100</code> </p>
        next_token: <p>The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.</p> <p>Default Value: <code>null</code> </p>

    Raises:
        capo_location.errors.access_denied_exception.AccessDeniedException: <p>The request was denied because of insufficient access or permissions. Check with an administrator to verify your permissions.</p>
        capo_location.errors.internal_server_exception.InternalServerException: <p>The request has failed to process because of an unknown server error, exception, or failure.</p>
        capo_location.errors.throttling_exception.ThrottlingException: <p>The request was denied because of request throttling.</p>
        capo_location.errors.validation_exception.ValidationException: <p>The input failed to meet the constraints specified by the AWS service. </p>
        capo_location.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_location.types.list_route_calculators_request.ListRouteCalculatorsRequest]",
    ) -> AsyncOperationResponse[
        "capo_location.types.list_route_calculators_response.ListRouteCalculatorsResponse"
    ]:
        import capo_location._operations.location_service.list_route_calculators

        (
            output,
            http_response,
        ) = await capo_location._operations.location_service.list_route_calculators.async_list_route_calculators(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_location.types.list_route_calculators_response.ListRouteCalculatorsResponse",
    ) -> dict[str, Any]:
        import capo_location.types.list_route_calculators_response

        return capo_location.types.list_route_calculators_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ListRouteCalculators", redact_output=_redact_output),
    )
    input_: capo_location.types.list_route_calculators_request.ListRouteCalculatorsRequest = {}
    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