updateArchive method

Future<void> updateArchive({
  1. required String archiveId,
  2. String? archiveName,
  3. ArchiveRetention? retention,
})

Updates the attributes of an existing email archive.

May throw AccessDeniedException. May throw ConflictException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter archiveId : The identifier of the archive to update.

Parameter archiveName : A new, unique name for the archive.

Parameter retention : A new retention period for emails in the archive.

Implementation

Future<void> updateArchive({
  required String archiveId,
  String? archiveName,
  ArchiveRetention? retention,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'MailManagerSvc.UpdateArchive'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ArchiveId': archiveId,
      if (archiveName != null) 'ArchiveName': archiveName,
      if (retention != null) 'Retention': retention,
    },
  );
}