listContactLists method
Lists all of the contact lists available.
May throw BadRequestException. May throw TooManyRequestsException.
Parameter nextToken
:
A string token indicating that there might be additional contact lists
available to be listed. Use the token provided in the Response to use in
the subsequent call to ListContactLists with the same parameters to
retrieve the next page of contact lists.
Parameter pageSize
:
Maximum number of contact lists to return at once. Use this parameter to
paginate results. If additional contact lists exist beyond the specified
limit, the NextToken
element is sent in the response. Use the
NextToken
value in subsequent requests to retrieve additional
lists.
Implementation
Future<ListContactListsResponse> listContactLists({
String? nextToken,
int? pageSize,
}) async {
final $query = <String, List<String>>{
if (nextToken != null) 'NextToken': [nextToken],
if (pageSize != null) 'PageSize': [pageSize.toString()],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/v2/email/contact-lists',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListContactListsResponse.fromJson(response);
}