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

**********************
get_impersonation_role
**********************



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

  

  Gets the impersonation role details for the given WorkMail organization.

  

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


  **Request Syntax**
  ::

    response = client.get_impersonation_role(
        OrganizationId='string',
        ImpersonationRoleId='string'
    )
    
  :type OrganizationId: string
  :param OrganizationId: **[REQUIRED]** 

    The WorkMail organization from which to retrieve the impersonation role.

    

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

    The impersonation role ID to retrieve.

    

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

    
    ::

      {
          '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',
                  ]
              },
          ],
          'DateCreated': datetime(2015, 1, 1),
          'DateModified': datetime(2015, 1, 1)
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ImpersonationRoleId** *(string) --* 

        The impersonation role ID.

        
      

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

        The impersonation role name.

        
      

      - **Type** *(string) --* 

        The impersonation role type.

        
      

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

        The impersonation role description.

        
      

      - **Rules** *(list) --* 

        The list of rules for the given impersonation role.

        
        

        - *(dict) --* 

          The rules for the given impersonation role.

          
          

          - **ImpersonationRuleId** *(string) --* 

            The identifier of the rule.

            
          

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

            The rule name.

            
          

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

            The rule description.

            
          

          - **Effect** *(string) --* 

            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) --* 
        
      
    
      

      - **DateCreated** *(datetime) --* 

        The date when the impersonation role was created.

        
      

      - **DateModified** *(datetime) --* 

        The date when the impersonation role was last modified.

        
  
  **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`

  