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

************************
list_impersonation_roles
************************



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

  

  Lists all the impersonation roles for the given WorkMail organization.

  

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


  **Request Syntax**
  ::

    response = client.list_impersonation_roles(
        OrganizationId='string',
        NextToken='string',
        MaxResults=123
    )
    
  :type OrganizationId: string
  :param OrganizationId: **[REQUIRED]** 

    The WorkMail organization to which the listed impersonation roles belong.

    

  
  :type NextToken: string
  :param NextToken: 

    The token used to retrieve the next page of results. The first call doesn't require a token.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of results returned in a single call.

    

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

    
    ::

      {
          'Roles': [
              {
                  'ImpersonationRoleId': 'string',
                  'Name': 'string',
                  'Type': 'FULL_ACCESS'|'READ_ONLY',
                  'DateCreated': datetime(2015, 1, 1),
                  'DateModified': datetime(2015, 1, 1)
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Roles** *(list) --* 

        The list of impersonation roles under the given WorkMail organization.

        
        

        - *(dict) --* 

          An impersonation role for the given WorkMail organization.

          
          

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

            The identifier of the impersonation role.

            
          

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

            The impersonation role name.

            
          

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

            The impersonation role type.

            
          

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

            The date when the impersonation role was created.

            
          

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

            The date when the impersonation role was last modified.

            
      
    
      

      - **NextToken** *(string) --* 

        The token to retrieve the next page of results. The value is ``null`` when there are no results to return.

        
  
  **Exceptions**
  
  *   :py:class:`WorkMail.Client.exceptions.InvalidParameterException`

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

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

  