Skip to content

list_applications async

list_applications(
    *,
    config_overrides: Optional[AsyncEMRServerlessClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[int] = None,
    states: Optional[ApplicationStateSet] = None,
) -> ListApplicationsResponse

Lists applications based on a set of parameters.

Parameters:

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

    The token for the next set of application results.

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

    The maximum number of applications that can be listed.

  • states (Optional[ApplicationStateSet], default: None ) –

    An optional filter for application states. Note that if this filter contains multiple states, the resulting list will be grouped by the state.

Raises:

Source code in docs_src/capo_emr_serverless/_services/async_emr_serverless.py
async def list_applications(
    self,
    *,
    config_overrides: Optional[AsyncEMRServerlessClientConfig] = None,
    next_token: Optional["capo_emr_serverless.types.next_token.NextToken"] = None,
    max_results: Optional[int] = None,
    states: Optional[
        "capo_emr_serverless.types.application_state_set.ApplicationStateSet"
    ] = None,
) -> (
    "capo_emr_serverless.types.list_applications_response.ListApplicationsResponse"
):
    """<p>Lists applications based on a set of parameters.</p>

    Args:
        next_token: <p>The token for the next set of application results.</p>
        max_results: <p>The maximum number of applications that can be listed.</p>
        states: <p>An optional filter for application states. Note that if this filter contains multiple states, the resulting list will be grouped by the state.</p>

    Raises:
        capo_emr_serverless.errors.internal_server_exception.InternalServerException: <p>Request processing failed because of an error or failure with the service.</p>
        capo_emr_serverless.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_emr_serverless.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_emr_serverless.types.list_applications_request.ListApplicationsRequest]",
    ) -> AsyncOperationResponse[
        "capo_emr_serverless.types.list_applications_response.ListApplicationsResponse"
    ]:
        import capo_emr_serverless._operations.aws_toledo_web_service.list_applications

        (
            output,
            http_response,
        ) = await capo_emr_serverless._operations.aws_toledo_web_service.list_applications.async_list_applications(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListApplications")
    )
    input_: capo_emr_serverless.types.list_applications_request.ListApplicationsRequest = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if states is not None:
        input_["states"] = states

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