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

*************************
update_impersonation_role
*************************



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

  

  Updates an impersonation role for the given WorkMail organization.

  

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


  **Request Syntax**
  ::

    response = client.update_impersonation_role(
        OrganizationId='string',
        ImpersonationRoleId='string',
        Name='string',
        Type='FULL_ACCESS'|'READ_ONLY',
        Description='string',
        Rules=[
            {
                'ImpersonationRuleId': 'string',
                'Name': 'string',
                'Description': 'string',
                'Effect': 'ALLOW'|'DENY',
                'TargetUsers': [
                    'string',
                ],
                'NotTargetUsers': [
                    'string',
                ]
            },
        ]
    )
    
  :type OrganizationId: string
  :param OrganizationId: **[REQUIRED]** 

    The WorkMail organization that contains the impersonation role to update.

    

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

    The ID of the impersonation role to update.

    

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

    The updated impersonation role name.

    

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

    The updated impersonation role type.

    

  
  :type Description: string
  :param Description: 

    The updated impersonation role description.

    

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

    The updated list of rules.

    

  
    - *(dict) --* 

      The rules for the given impersonation role.

      

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

        The identifier of the rule.

        

      
      - **Name** *(string) --* 

        The rule name.

        

      
      - **Description** *(string) --* 

        The rule description.

        

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

        The effect of the rule when it matches the input. Allowed effect values are ``ALLOW`` or ``DENY``.

        

      
      - **TargetUsers** *(list) --* 

        A list of user IDs that match the rule.

        

      
        - *(string) --* 

        
    
      - **NotTargetUsers** *(list) --* 

        A list of user IDs that don't match the rule.

        

      
        - *(string) --* 

        
    
    

  
  :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.ResourceNotFoundException`

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

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

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

  