listApps method

Future<ListAppsResponse> listApps({
  1. List<String>? appIds,
  2. int? maxResults,
  3. String? nextToken,
})

Retrieves summaries for all applications.

May throw UnauthorizedOperationException. May throw InvalidParameterException. May throw MissingRequiredParameterException. May throw InternalError. May throw OperationNotPermittedException.

Parameter appIds : The unique application IDs.

Parameter maxResults : The maximum number of results to return in a single call. The default value is 100. To retrieve the remaining results, make another call with the returned NextToken value.

Parameter nextToken : The token for the next set of results.

Implementation

Future<ListAppsResponse> listApps({
  List<String>? appIds,
  int? maxResults,
  String? nextToken,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSServerMigrationService_V2016_10_24.ListApps'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (appIds != null) 'appIds': appIds,
      if (maxResults != null) 'maxResults': maxResults,
      if (nextToken != null) 'nextToken': nextToken,
    },
  );

  return ListAppsResponse.fromJson(jsonResponse.body);
}