listApps method

Future<ListAppsResponse> listApps({
  1. String? appArn,
  2. String? awsApplicationArn,
  3. DateTime? fromLastAssessmentTime,
  4. int? maxResults,
  5. String? name,
  6. String? nextToken,
  7. bool? reverseOrder,
  8. DateTime? toLastAssessmentTime,
})

Lists your Resilience Hub applications.

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

May throw AccessDeniedException. May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter appArn : 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.

Parameter awsApplicationArn : 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.

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

Parameter maxResults : 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.

Parameter name : The name for the one of the listed applications.

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

Parameter reverseOrder : 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.

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

Implementation

Future<ListAppsResponse> listApps({
  String? appArn,
  String? awsApplicationArn,
  DateTime? fromLastAssessmentTime,
  int? maxResults,
  String? name,
  String? nextToken,
  bool? reverseOrder,
  DateTime? toLastAssessmentTime,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    if (appArn != null) 'appArn': [appArn],
    if (awsApplicationArn != null) 'awsApplicationArn': [awsApplicationArn],
    if (fromLastAssessmentTime != null)
      'fromLastAssessmentTime': [
        _s.iso8601ToJson(fromLastAssessmentTime).toString()
      ],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (name != null) 'name': [name],
    if (nextToken != null) 'nextToken': [nextToken],
    if (reverseOrder != null) 'reverseOrder': [reverseOrder.toString()],
    if (toLastAssessmentTime != null)
      'toLastAssessmentTime': [
        _s.iso8601ToJson(toLastAssessmentTime).toString()
      ],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/list-apps',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListAppsResponse.fromJson(response);
}