listMembersOfAddressList method
Lists members of an address list.
May throw AccessDeniedException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter addressListId :
The unique identifier of the address list to list the addresses from.
Parameter filter :
Filter to be used to limit the results.
Parameter nextToken :
If you received a pagination token from a previous call to this API, you
can provide it here to continue paginating through the next page of
results.
Parameter pageSize :
The maximum number of address list members that are returned per call. You
can use NextToken to retrieve the next page of members.
Implementation
Future<ListMembersOfAddressListResponse> listMembersOfAddressList({
required String addressListId,
AddressFilter? filter,
String? nextToken,
int? pageSize,
}) async {
_s.validateNumRange(
'pageSize',
pageSize,
1,
1000,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'MailManagerSvc.ListMembersOfAddressList'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AddressListId': addressListId,
if (filter != null) 'Filter': filter,
if (nextToken != null) 'NextToken': nextToken,
if (pageSize != null) 'PageSize': pageSize,
},
);
return ListMembersOfAddressListResponse.fromJson(jsonResponse.body);
}