deleteArchive method

Future<void> deleteArchive({
  1. required String archiveId,
})

Initiates deletion of an email archive. This changes the archive state to pending deletion. In this state, no new emails can be added, and existing archived emails become inaccessible (search, export, download). The archive and all of its contents will be permanently deleted 30 days after entering the pending deletion state, regardless of the configured retention period.

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

Parameter archiveId : The identifier of the archive to delete.

Implementation

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