:doc:`WorkMail <../../workmail>` / Client / put_retention_policy

********************
put_retention_policy
********************



.. py:method:: WorkMail.Client.put_retention_policy(**kwargs)

  

  Puts a retention policy to the specified organization.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/PutRetentionPolicy>`_  


  **Request Syntax**
  ::

    response = client.put_retention_policy(
        OrganizationId='string',
        Id='string',
        Name='string',
        Description='string',
        FolderConfigurations=[
            {
                'Name': 'INBOX'|'DELETED_ITEMS'|'SENT_ITEMS'|'DRAFTS'|'JUNK_EMAIL',
                'Action': 'NONE'|'DELETE'|'PERMANENTLY_DELETE',
                'Period': 123
            },
        ]
    )
    
  :type OrganizationId: string
  :param OrganizationId: **[REQUIRED]** 

    The organization ID.

    

  
  :type Id: string
  :param Id: 

    The retention policy ID.

    

  
  :type Name: string
  :param Name: **[REQUIRED]** 

    The retention policy name.

    

  
  :type Description: string
  :param Description: 

    The retention policy description.

    

  
  :type FolderConfigurations: list
  :param FolderConfigurations: **[REQUIRED]** 

    The retention policy folder configurations.

    

  
    - *(dict) --* 

      The configuration applied to an organization's folders by its retention policy.

      

    
      - **Name** *(string) --* **[REQUIRED]** 

        The folder name.

        

      
      - **Action** *(string) --* **[REQUIRED]** 

        The action to take on the folder contents at the end of the folder configuration period.

        

      
      - **Period** *(integer) --* 

        The number of days for which the folder-configuration action applies.

        

      
    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`WorkMail.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`WorkMail.Client.exceptions.OrganizationNotFoundException`

  
  *   :py:class:`WorkMail.Client.exceptions.OrganizationStateException`

  
  *   :py:class:`WorkMail.Client.exceptions.LimitExceededException`

  