listPackages method
Returns a list of packages.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter maxResults :
The maximum number of packages to return in one page of results.
Parameter nextToken :
Specify the pagination token from a previous request to retrieve the next
page of results.
Implementation
Future<ListPackagesResponse> listPackages({
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
0,
25,
);
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);
}