listArchiveSearches method

Future<ListArchiveSearchesResponse> listArchiveSearches({
  1. required String archiveId,
  2. String? nextToken,
  3. int? pageSize,
})

Returns a list of email archive search jobs.

May throw AccessDeniedException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter archiveId : The identifier of the archive.

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 archive search jobs that are returned per call. You can use NextToken to obtain further pages of archives.

Implementation

Future<ListArchiveSearchesResponse> listArchiveSearches({
  required String archiveId,
  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.ListArchiveSearches'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ArchiveId': archiveId,
      if (nextToken != null) 'NextToken': nextToken,
      if (pageSize != null) 'PageSize': pageSize,
    },
  );

  return ListArchiveSearchesResponse.fromJson(jsonResponse.body);
}