Skip to content

list_apps async

list_apps(
    *,
    config_overrides: Optional[AsyncresiliencehubClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
    name: Optional[EntityName] = None,
    app_arn: Optional[Arn] = None,
    from_last_assessment_time: Optional[TimeStamp] = None,
    to_last_assessment_time: Optional[TimeStamp] = None,
    reverse_order: Optional[BooleanOptional] = None,
    aws_application_arn: Optional[Arn] = None,
) -> ListAppsResponse

Lists your Resilience Hub applications.

You can filter applications using only one filter at a time or without using any filter. If you try to filter applications using multiple filters, you will get the following error:

An error occurred (ValidationException) when calling the ListApps operation: Only one filter is supported for this operation.

Parameters:

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

    Null, or the token from a previous call to get the next set of results.

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

    Maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

  • name (Optional[EntityName], default: None ) –

    The name for the one of the listed applications.

  • app_arn (Optional[Arn], default: None ) –

    Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide.

  • from_last_assessment_time (Optional[TimeStamp], default: None ) –

    Lower limit of the range that is used to filter applications based on their last assessment times.

  • to_last_assessment_time (Optional[TimeStamp], default: None ) –

    Upper limit of the range that is used to filter the applications based on their last assessment times.

  • reverse_order (Optional[BooleanOptional], default: None ) –

    The application list is sorted based on the values of lastAppComplianceEvaluationTime field. By default, application list is sorted in ascending order. To sort the application list in descending order, set this field to True.

  • aws_application_arn (Optional[Arn], default: None ) –

    Amazon Resource Name (ARN) of Resource Groups group that is integrated with an AppRegistry application. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide.

Raises:

  • AccessDeniedException –

    You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions.

  • InternalServerException –

    This exception occurs when there is an internal failure in the Resilience Hub service.

  • ThrottlingException –

    This exception occurs when you have exceeded the limit on the number of requests per second.

  • ValidationException –

    This exception occurs when a request is not valid.

  • UnknownServiceError –

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

Source code in docs_src/capo_resiliencehub/_services/async_resiliencehub.py
async def list_apps(
    self,
    *,
    config_overrides: Optional[AsyncresiliencehubClientConfig] = None,
    next_token: Optional["capo_resiliencehub.types.next_token.NextToken"] = None,
    max_results: Optional["capo_resiliencehub.types.max_results.MaxResults"] = None,
    name: Optional["capo_resiliencehub.types.entity_name.EntityName"] = None,
    app_arn: Optional["capo_resiliencehub.types.arn.Arn"] = None,
    from_last_assessment_time: Optional[
        "capo_resiliencehub.types.time_stamp.TimeStamp"
    ] = None,
    to_last_assessment_time: Optional[
        "capo_resiliencehub.types.time_stamp.TimeStamp"
    ] = None,
    reverse_order: Optional[
        "capo_resiliencehub.types.boolean_optional.BooleanOptional"
    ] = None,
    aws_application_arn: Optional["capo_resiliencehub.types.arn.Arn"] = None,
) -> "capo_resiliencehub.types.list_apps_response.ListAppsResponse":
    """<p>Lists your Resilience Hub applications.</p> <note> <p>You can filter applications using only one filter at a time or without using any filter. If you try to filter applications using multiple filters, you will get the following error:</p> <p> <code>An error occurred (ValidationException) when calling the ListApps operation: Only one filter is supported for this operation.</code> </p> </note>

    Args:
        next_token: <p>Null, or the token from a previous call to get the next set of results.</p>
        max_results: <p>Maximum number of results to include in the response. If more results exist than the specified <code>MaxResults</code> value, a token is included in the response so that the remaining results can be retrieved.</p>
        name: <p>The name for the one of the listed applications.</p>
        app_arn: <p>Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:<code>partition</code>:resiliencehub:<code>region</code>:<code>account</code>:app/<code>app-id</code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i> guide.</p>
        from_last_assessment_time: <p>Lower limit of the range that is used to filter applications based on their last assessment times.</p>
        to_last_assessment_time: <p>Upper limit of the range that is used to filter the applications based on their last assessment times.</p>
        reverse_order: <p>The application list is sorted based on the values of <code>lastAppComplianceEvaluationTime</code> field. By default, application list is sorted in ascending order. To sort the application list in descending order, set this field to <code>True</code>.</p>
        aws_application_arn: <p>Amazon Resource Name (ARN) of Resource Groups group that is integrated with an AppRegistry application. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i> guide.</p>

    Raises:
        capo_resiliencehub.errors.access_denied_exception.AccessDeniedException: <p>You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions.</p>
        capo_resiliencehub.errors.internal_server_exception.InternalServerException: <p>This exception occurs when there is an internal failure in the Resilience Hub service.</p>
        capo_resiliencehub.errors.throttling_exception.ThrottlingException: <p>This exception occurs when you have exceeded the limit on the number of requests per second.</p>
        capo_resiliencehub.errors.validation_exception.ValidationException: <p>This exception occurs when a request is not valid.</p>
        capo_resiliencehub.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_resiliencehub.types.list_apps_request.ListAppsRequest]",
    ) -> AsyncOperationResponse[
        "capo_resiliencehub.types.list_apps_response.ListAppsResponse"
    ]:
        import capo_resiliencehub._operations.aws_resilience_hub.list_apps

        (
            output,
            http_response,
        ) = await capo_resiliencehub._operations.aws_resilience_hub.list_apps.async_list_apps(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListApps")
    )
    input_: capo_resiliencehub.types.list_apps_request.ListAppsRequest = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if name is not None:
        input_["name"] = name
    if app_arn is not None:
        input_["app_arn"] = app_arn
    if from_last_assessment_time is not None:
        input_["from_last_assessment_time"] = from_last_assessment_time
    if to_last_assessment_time is not None:
        input_["to_last_assessment_time"] = to_last_assessment_time
    if reverse_order is not None:
        input_["reverse_order"] = reverse_order
    if aws_application_arn is not None:
        input_["aws_application_arn"] = aws_application_arn

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