getArchive method

Future<GetArchiveResponse> getArchive({
  1. required String archiveId,
})

Retrieves the full details and current state of a specified email archive.

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

Parameter archiveId : The identifier of the archive to retrieve.

Implementation

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

  return GetArchiveResponse.fromJson(jsonResponse.body);
}