DeadlineCloud / Client / update_budget

update_budget#

DeadlineCloud.Client.update_budget(**kwargs)#

Updates a budget that sets spending thresholds for rendering activity.

See also: AWS API Documentation

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)
        }
    }
)
Parameters:
  • clientToken (string) –

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

    This field is autopopulated if not provided.

  • farmId (string) –

    [REQUIRED]

    The farm ID of the budget to update.

  • budgetId (string) –

    [REQUIRED]

    The budget ID to update.

  • displayName (string) –

    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.

  • description (string) –

    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.

  • status (string) –

    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.

  • approximateDollarLimit (float) – The dollar limit to update on the budget. Based on consumed usage.

  • actionsToAdd (list) –

    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.

  • actionsToRemove (list) –

    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.

  • schedule (dict) –

    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.

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions