listApplications method

Future<ListApplicationsResponse> listApplications({
  1. int? maxResults,
  2. String? nextToken,
  3. List<ApplicationStatus>? statuses,
})

Lists all OpenSearch applications under your account.

May throw AccessDeniedException. May throw BaseException. May throw DisabledOperationException. May throw InternalException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter statuses : Filters the list of OpenSearch applications by status. Possible values: CREATING, UPDATING, DELETING, FAILED, ACTIVE, and DELETED.

Implementation

Future<ListApplicationsResponse> listApplications({
  int? maxResults,
  String? nextToken,
  List<ApplicationStatus>? statuses,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    0,
    100,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (statuses != null) 'statuses': statuses.map((e) => e.value).toList(),
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/2021-01-01/opensearch/list-applications',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListApplicationsResponse.fromJson(response);
}