listArchives method
Returns a list of all email archives in your account.
May throw AccessDeniedException.
May throw ThrottlingException.
May throw ValidationException.
Parameter nextToken :
If NextToken is returned, there are more results available. The value of
NextToken is a unique pagination token for each page. Make the call again
using the returned token to retrieve the next page.
Parameter pageSize :
The maximum number of archives that are returned per call. You can use
NextToken to obtain further pages of archives.
Implementation
Future<ListArchivesResponse> listArchives({
String? nextToken,
int? pageSize,
}) async {
_s.validateNumRange(
'pageSize',
pageSize,
1,
50,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'MailManagerSvc.ListArchives'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (nextToken != null) 'NextToken': nextToken,
if (pageSize != null) 'PageSize': pageSize,
},
);
return ListArchivesResponse.fromJson(jsonResponse.body);
}