:doc:`MailManager <../../mailmanager>` / Client / update_archive

**************
update_archive
**************



.. py:method:: MailManager.Client.update_archive(**kwargs)

  

  Updates the attributes of an existing email archive.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mailmanager-2023-10-17/UpdateArchive>`_  


  **Request Syntax**
  ::

    response = client.update_archive(
        ArchiveId='string',
        ArchiveName='string',
        Retention={
            'RetentionPeriod': 'THREE_MONTHS'|'SIX_MONTHS'|'NINE_MONTHS'|'ONE_YEAR'|'EIGHTEEN_MONTHS'|'TWO_YEARS'|'THIRTY_MONTHS'|'THREE_YEARS'|'FOUR_YEARS'|'FIVE_YEARS'|'SIX_YEARS'|'SEVEN_YEARS'|'EIGHT_YEARS'|'NINE_YEARS'|'TEN_YEARS'|'PERMANENT'
        }
    )
    
  :type ArchiveId: string
  :param ArchiveId: **[REQUIRED]** 

    The identifier of the archive to update.

    

  
  :type ArchiveName: string
  :param ArchiveName: 

    A new, unique name for the archive.

    

  
  :type Retention: dict
  :param Retention: 

    A new retention period for emails in the archive.

    .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``RetentionPeriod``. 

  
    - **RetentionPeriod** *(string) --* 

      The enum value sets the period for retaining emails in an archive.

      

    
  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 

      The response indicating if the archive update succeeded or failed.

       

      On success, returns an HTTP 200 status code. On failure, returns an error message.

      
  
  **Exceptions**
  
  *   :py:class:`MailManager.Client.exceptions.ValidationException`

  
  *   :py:class:`MailManager.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`MailManager.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`MailManager.Client.exceptions.ConflictException`

  
  *   :py:class:`MailManager.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`MailManager.Client.exceptions.ThrottlingException`

  