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

**************
list_resources
**************



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

  

  Returns summaries of the organization's resources.

  

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


  **Request Syntax**
  ::

    response = client.list_resources(
        OrganizationId='string',
        NextToken='string',
        MaxResults=123,
        Filters={
            'NamePrefix': 'string',
            'PrimaryEmailPrefix': 'string',
            'State': 'ENABLED'|'DISABLED'|'DELETED'
        }
    )
    
  :type OrganizationId: string
  :param OrganizationId: **[REQUIRED]** 

    The identifier for the organization under which the resources exist.

    

  
  :type NextToken: string
  :param NextToken: 

    The token to use to retrieve the next page of results. The first call does not contain any tokens.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of results to return in a single call.

    

  
  :type Filters: dict
  :param Filters: 

    Limit the resource search results based on the filter criteria. You can only use one filter per request.

    

  
    - **NamePrefix** *(string) --* 

      Filters only resource that start with the entered name prefix .

      

    
    - **PrimaryEmailPrefix** *(string) --* 

      Filters only resource with the provided primary email prefix.

      

    
    - **State** *(string) --* 

      Filters only resource with the provided state.

      

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

    
    ::

      {
          'Resources': [
              {
                  'Id': 'string',
                  'Email': 'string',
                  'Name': 'string',
                  'Type': 'ROOM'|'EQUIPMENT',
                  'State': 'ENABLED'|'DISABLED'|'DELETED',
                  'EnabledDate': datetime(2015, 1, 1),
                  'DisabledDate': datetime(2015, 1, 1),
                  'Description': 'string'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Resources** *(list) --* 

        One page of the organization's resource representation.

        
        

        - *(dict) --* 

          The representation of a resource.

          
          

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

            The identifier of the resource.

            
          

          - **Email** *(string) --* 

            The email of the resource.

            
          

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

            The name of the resource.

            
          

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

            The type of the resource: equipment or room.

            
          

          - **State** *(string) --* 

            The state of the resource, which can be ENABLED, DISABLED, or DELETED.

            
          

          - **EnabledDate** *(datetime) --* 

            The date indicating when the resource was enabled for WorkMail use.

            
          

          - **DisabledDate** *(datetime) --* 

            The date indicating when the resource was disabled from WorkMail use.

            
          

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

            Resource description.

            
      
    
      

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

        The token used to paginate through all the organization's resources. 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.InvalidParameterException`

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

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

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

  