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.
Parameters:
Raises:
-
AccessDeniedException
–
Occurs when a user is denied access to a specific resource or action.
-
ConflictException
–
The request configuration has conflicts. For details, see the accompanying error message.
-
ThrottlingException
–
Occurs when a service's request rate limit is exceeded, resulting in throttling of further requests.
-
ValidationException
–
The request validation has failed. For details, see the accompanying error message.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_mailmanager/_services/mail_manager.py
| def delete_archive(
self,
archive_id: "capo_mailmanager.types.archive_id_string.ArchiveIdString",
*,
config_overrides: Optional[MailManagerClientConfig] = None,
) -> "capo_mailmanager.types.delete_archive_response.DeleteArchiveResponse":
"""<p>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. </p>
Args:
archive_id: <p>The identifier of the archive to delete.</p>
Raises:
capo_mailmanager.errors.access_denied_exception.AccessDeniedException: <p>Occurs when a user is denied access to a specific resource or action.</p>
capo_mailmanager.errors.conflict_exception.ConflictException: <p>The request configuration has conflicts. For details, see the accompanying error message.</p>
capo_mailmanager.errors.throttling_exception.ThrottlingException: <p>Occurs when a service's request rate limit is exceeded, resulting in throttling of further requests.</p>
capo_mailmanager.errors.validation_exception.ValidationException: <p>The request validation has failed. For details, see the accompanying error message.</p>
capo_mailmanager.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_mailmanager.types.delete_archive_request.DeleteArchiveRequest]",
) -> OperationResponse[
"capo_mailmanager.types.delete_archive_response.DeleteArchiveResponse"
]:
import capo_mailmanager._operations.mail_manager_svc.delete_archive
output, http_response = (
capo_mailmanager._operations.mail_manager_svc.delete_archive.delete_archive(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteArchive")
)
input_: capo_mailmanager.types.delete_archive_request.DeleteArchiveRequest = {
"archive_id": archive_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|