Skip to content

list_endpoints async

list_endpoints(
    *,
    config_overrides: Optional[AsyncComprehendClientConfig] = None,
    filter: Optional[EndpointFilter] = None,
    next_token: Optional[String] = None,
    max_results: Optional[MaxResultsInteger] = None,
) -> ListEndpointsResponse

Gets a list of all existing endpoints that you've created. For information about endpoints, see Managing endpoints.

Parameters:

  • filter (Optional[EndpointFilter], default: None ) –

    Filters the endpoints that are returned. You can filter endpoints on their name, model, status, or the date and time that they were created. You can only set one filter at a time.

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

    Identifies the next page of results to return.

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

    The maximum number of results to return in each page. The default is 100.

Raises:

Source code in docs_src/capo_comprehend/_services/async_comprehend.py
async def list_endpoints(
    self,
    *,
    config_overrides: Optional[AsyncComprehendClientConfig] = None,
    filter: Optional["capo_comprehend.types.endpoint_filter.EndpointFilter"] = None,
    next_token: Optional["capo_comprehend.types.string.String"] = None,
    max_results: Optional[
        "capo_comprehend.types.max_results_integer.MaxResultsInteger"
    ] = None,
) -> "capo_comprehend.types.list_endpoints_response.ListEndpointsResponse":
    """<p>Gets a list of all existing endpoints that you've created. For information about endpoints, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html">Managing endpoints</a>.</p>

    Args:
        filter: <p>Filters the endpoints that are returned. You can filter endpoints on their name, model, status, or the date and time that they were created. You can only set one filter at a time. </p>
        next_token: <p>Identifies the next page of results to return.</p>
        max_results: <p>The maximum number of results to return in each page. The default is 100.</p>

    Raises:
        capo_comprehend.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
        capo_comprehend.errors.invalid_request_exception.InvalidRequestException: <p>The request is invalid.</p>
        capo_comprehend.errors.too_many_requests_exception.TooManyRequestsException: <p>The number of requests exceeds the limit. Resubmit your request later.</p>
        capo_comprehend.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_comprehend.types.list_endpoints_request.ListEndpointsRequest]",
    ) -> AsyncOperationResponse[
        "capo_comprehend.types.list_endpoints_response.ListEndpointsResponse"
    ]:
        import capo_comprehend._operations.comprehend_20171127.list_endpoints

        (
            output,
            http_response,
        ) = await capo_comprehend._operations.comprehend_20171127.list_endpoints.async_list_endpoints(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListEndpoints")
    )
    input_: capo_comprehend.types.list_endpoints_request.ListEndpointsRequest = {}
    if filter is not None:
        input_["filter"] = filter
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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