:doc:`Batch <../../batch>` / Client / list_consumable_resources

*************************
list_consumable_resources
*************************



.. py:method:: Batch.Client.list_consumable_resources(**kwargs)

  

  Returns a list of Batch consumable resources.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ListConsumableResources>`_  


  **Request Syntax**
  ::

    response = client.list_consumable_resources(
        filters=[
            {
                'name': 'string',
                'values': [
                    'string',
                ]
            },
        ],
        maxResults=123,
        nextToken='string'
    )
    
  :type filters: list
  :param filters: 

    The filters to apply to the consumable resource list query. If used, only those consumable resources that match the filter are listed. Filter names and values can be:

     

    
    * name: ``CONSUMABLE_RESOURCE_NAME`` values: case-insensitive matches for the consumable resource name. If a filter value ends with an asterisk (*), it matches any consumable resource name that begins with the string before the '*'.
    

    

  
    - *(dict) --* 

      A filter name and value pair that's used to return a more specific list of results from a ``ListJobs`` or ``ListJobsByConsumableResource`` API operation.

      

    
      - **name** *(string) --* 

        The name of the filter. Filter names are case sensitive.

        

      
      - **values** *(list) --* 

        The filter values.

        

      
        - *(string) --* 

        
    
    

  :type maxResults: integer
  :param maxResults: 

    The maximum number of results returned by ``ListConsumableResources`` in paginated output. When this parameter is used, ``ListConsumableResources`` only returns ``maxResults`` results in a single page and a ``nextToken`` response element. The remaining results of the initial request can be seen by sending another ``ListConsumableResources`` request with the returned ``nextToken`` value. This value can be between 1 and 100. If this parameter isn't used, then ``ListConsumableResources`` returns up to 100 results and a ``nextToken`` value if applicable.

    

  
  :type nextToken: string
  :param nextToken: 

    The ``nextToken`` value returned from a previous paginated ``ListConsumableResources`` request where ``maxResults`` was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the ``nextToken`` value. This value is ``null`` when there are no more results to return.

     

    .. note::

      

      Treat this token as an opaque identifier that's only used to retrieve the next items in a list and not for other programmatic purposes.

      

    

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

    
    ::

      {
          'consumableResources': [
              {
                  'consumableResourceArn': 'string',
                  'consumableResourceName': 'string',
                  'totalQuantity': 123,
                  'inUseQuantity': 123,
                  'resourceType': 'string'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **consumableResources** *(list) --* 

        A list of consumable resources that match the request.

        
        

        - *(dict) --* 

          Current information about a consumable resource.

          
          

          - **consumableResourceArn** *(string) --* 

            The Amazon Resource Name (ARN) of the consumable resource.

            
          

          - **consumableResourceName** *(string) --* 

            The name of the consumable resource.

            
          

          - **totalQuantity** *(integer) --* 

            The total amount of the consumable resource that is available.

            
          

          - **inUseQuantity** *(integer) --* 

            The amount of the consumable resource that is currently in use.

            
          

          - **resourceType** *(string) --* 

            Indicates whether the resource is available to be re-used after a job completes. Can be one of:

             

            
            * ``REPLENISHABLE``
             
            * ``NON_REPLENISHABLE``
            

            
      
    
      

      - **nextToken** *(string) --* 

        The ``nextToken`` value to include in a future ``ListConsumableResources`` request. When the results of a ``ListConsumableResources`` request exceed ``maxResults``, this value can be used to retrieve the next page of results. This value is ``null`` when there are no more results to return.

        
  
  **Exceptions**
  
  *   :py:class:`Batch.Client.exceptions.ClientException`

  
  *   :py:class:`Batch.Client.exceptions.ServerException`

  