Skip to content

list_flywheels async

list_flywheels(
    *,
    config_overrides: Optional[AsyncComprehendClientConfig] = None,
    filter: Optional[FlywheelFilter] = None,
    next_token: Optional[String] = None,
    max_results: Optional[MaxResultsInteger] = None,
) -> ListFlywheelsResponse

Gets a list of the flywheels that you have created.

Parameters:

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

    Filters the flywheels that are returned. You can filter flywheels on their status, or the date and time that they were submitted. 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 ) –

    Maximum number of results to return in a response. The default is 100.

Raises:

Source code in docs_src/capo_comprehend/_services/async_comprehend.py
async def list_flywheels(
    self,
    *,
    config_overrides: Optional[AsyncComprehendClientConfig] = None,
    filter: Optional["capo_comprehend.types.flywheel_filter.FlywheelFilter"] = 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_flywheels_response.ListFlywheelsResponse":
    """<p>Gets a list of the flywheels that you have created.</p>

    Args:
        filter: <p>Filters the flywheels that are returned. You can filter flywheels on their status, or the date and time that they were submitted. 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>Maximum number of results to return in a response. 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_filter_exception.InvalidFilterException: <p>The filter specified for the operation is invalid. Specify a different filter.</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_flywheels_request.ListFlywheelsRequest]",
    ) -> AsyncOperationResponse[
        "capo_comprehend.types.list_flywheels_response.ListFlywheelsResponse"
    ]:
        import capo_comprehend._operations.comprehend_20171127.list_flywheels

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListFlywheels")
    )
    input_: capo_comprehend.types.list_flywheels_request.ListFlywheelsRequest = {}
    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