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

**************************
update_consumable_resource
**************************



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

  

  Updates a consumable resource.

  

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


  **Request Syntax**
  ::

    response = client.update_consumable_resource(
        consumableResource='string',
        operation='string',
        quantity=123,
        clientToken='string'
    )
    
  :type consumableResource: string
  :param consumableResource: **[REQUIRED]** 

    The name or ARN of the consumable resource to be updated.

    

  
  :type operation: string
  :param operation: 

    Indicates how the quantity of the consumable resource will be updated. Must be one of:

     

    
    * ``SET`` Sets the quantity of the resource to the value specified by the ``quantity`` parameter.
     
    * ``ADD`` Increases the quantity of the resource by the value specified by the ``quantity`` parameter.
     
    * ``REMOVE`` Reduces the quantity of the resource by the value specified by the ``quantity`` parameter.
    

    

  
  :type quantity: integer
  :param quantity: 

    The change in the total quantity of the consumable resource. The ``operation`` parameter determines whether the value specified here will be the new total quantity, or the amount by which the total quantity will be increased or reduced. Must be a non-negative value.

    

  
  :type clientToken: string
  :param clientToken: 

    If this parameter is specified and two update requests with identical payloads and ``clientToken``s are received, these requests are considered the same request. Both requests will succeed, but the update will only happen once. A ``clientToken`` is valid for 8 hours.

    This field is autopopulated if not provided.

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

    
    ::

      {
          'consumableResourceName': 'string',
          'consumableResourceArn': 'string',
          'totalQuantity': 123
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        The name of the consumable resource to be updated.

        
      

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

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

        
      

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

        The total amount of the consumable resource that is available.

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

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

  