:doc:`DeadlineCloud <../../deadline>` / Client / update_budget

*************
update_budget
*************



.. py:method:: DeadlineCloud.Client.update_budget(**kwargs)

  

  Updates a budget that sets spending thresholds for rendering activity.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/deadline-2023-10-12/UpdateBudget>`_  


  **Request Syntax**
  ::

    response = client.update_budget(
        clientToken='string',
        farmId='string',
        budgetId='string',
        displayName='string',
        description='string',
        status='ACTIVE'|'INACTIVE',
        approximateDollarLimit=...,
        actionsToAdd=[
            {
                'type': 'STOP_SCHEDULING_AND_COMPLETE_TASKS'|'STOP_SCHEDULING_AND_CANCEL_TASKS',
                'thresholdPercentage': ...,
                'description': 'string'
            },
        ],
        actionsToRemove=[
            {
                'type': 'STOP_SCHEDULING_AND_COMPLETE_TASKS'|'STOP_SCHEDULING_AND_CANCEL_TASKS',
                'thresholdPercentage': ...
            },
        ],
        schedule={
            'fixed': {
                'startTime': datetime(2015, 1, 1),
                'endTime': datetime(2015, 1, 1)
            }
        }
    )
    
  :type clientToken: string
  :param clientToken: 

    The unique token which the server uses to recognize retries of the same request.

    This field is autopopulated if not provided.

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

    The farm ID of the budget to update.

    

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

    The budget ID to update.

    

  
  :type displayName: string
  :param displayName: 

    The display name of the budget to update.

     

    .. warning::

       

      This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.

      

    

  
  :type description: string
  :param description: 

    The description of the budget to update.

     

    .. warning::

       

      This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.

      

    

  
  :type status: string
  :param status: 

    Updates the status of the budget.

     

    
    * ``ACTIVE``–The budget is being evaluated.
     
    * ``INACTIVE``–The budget is inactive. This can include Expired, Canceled, or deleted Deleted statuses.
    

    

  
  :type approximateDollarLimit: float
  :param approximateDollarLimit: 

    The dollar limit to update on the budget. Based on consumed usage.

    

  
  :type actionsToAdd: list
  :param actionsToAdd: 

    The budget actions to add. Budget actions specify what happens when the budget runs out.

    

  
    - *(dict) --* 

      The budget action to add.

      

    
      - **type** *(string) --* **[REQUIRED]** 

        The type of budget action to add.

        

      
      - **thresholdPercentage** *(float) --* **[REQUIRED]** 

        The percentage threshold for the budget action to add.

        

      
      - **description** *(string) --* 

        A description for the budget action to add.

         

        .. warning::

           

          This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.

          

        

      
    

  :type actionsToRemove: list
  :param actionsToRemove: 

    The budget actions to remove from the budget.

    

  
    - *(dict) --* 

      The budget action to remove.

      

    
      - **type** *(string) --* **[REQUIRED]** 

        The type of budget action to remove.

        

      
      - **thresholdPercentage** *(float) --* **[REQUIRED]** 

        The percentage threshold for the budget action to remove.

        

      
    

  :type schedule: dict
  :param schedule: 

    The schedule to update.

    .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``fixed``. 

  
    - **fixed** *(dict) --* 

      The fixed start and end time of the budget's schedule.

      

    
      - **startTime** *(datetime) --* **[REQUIRED]** 

        When the budget starts.

        

      
      - **endTime** *(datetime) --* **[REQUIRED]** 

        When the budget ends.

        

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`DeadlineCloud.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`DeadlineCloud.Client.exceptions.InternalServerErrorException`

  
  *   :py:class:`DeadlineCloud.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`DeadlineCloud.Client.exceptions.ThrottlingException`

  
  *   :py:class:`DeadlineCloud.Client.exceptions.ValidationException`

  