listPackages method

Future<ListPackagesResponse> listPackages({
  1. int? maxResults,
  2. String? nextToken,
})

Lists the software packages associated to the account.

Requires permission to access the ListPackages action.

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

Parameter maxResults : The maximum number of results returned at one time.

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

Implementation

Future<ListPackagesResponse> listPackages({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/packages',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListPackagesResponse.fromJson(response);
}