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

***********************
list_resource_delegates
***********************



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

  

  Lists the delegates associated with a resource. Users and groups can be resource delegates and answer requests on behalf of the resource.

  

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


  **Request Syntax**
  ::

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

    The identifier for the organization that contains the resource for which delegates are listed.

    

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

    The identifier for the resource whose delegates are listed.

     

    The identifier can accept *ResourceId*, *Resourcename*, or *email*. The following identity formats are available:

     

    
    * Resource ID: r-0123456789a0123456789b0123456789
     
    * Email address: resource@domain.tld
     
    * Resource name: resource
    

    

  
  :type NextToken: string
  :param NextToken: 

    The token used to paginate through the delegates associated with a resource.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The number of maximum results in a page.

    

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

    
    ::

      {
          'Delegates': [
              {
                  'Id': 'string',
                  'Type': 'GROUP'|'USER'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Delegates** *(list) --* 

        One page of the resource's delegates.

        
        

        - *(dict) --* 

          The name of the attribute, which is one of the values defined in the UserAttribute enumeration.

          
          

          - **Id** *(string) --* 

            The identifier for the user or group associated as the resource's delegate.

            
          

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

            The type of the delegate: user or group.

            
      
    
      

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

        The token used to paginate through the delegates associated with a resource. While results are still available, it has an associated value. When the last page is reached, the token is empty.

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

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

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

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

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

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

  