getArchiveSearchResults method

Future<GetArchiveSearchResultsResponse> getArchiveSearchResults({
  1. required String searchId,
})

Returns the results of a completed email archive search job.

May throw AccessDeniedException. May throw ConflictException. May throw ThrottlingException. May throw ValidationException.

Parameter searchId : The identifier of the completed search job.

Implementation

Future<GetArchiveSearchResultsResponse> getArchiveSearchResults({
  required String searchId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'MailManagerSvc.GetArchiveSearchResults'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'SearchId': searchId,
    },
  );

  return GetArchiveSearchResultsResponse.fromJson(jsonResponse.body);
}