DeadlineCloud / Client / create_budget

create_budget#

DeadlineCloud.Client.create_budget(**kwargs)#

Creates a budget to set spending thresholds for your rendering activity.

See also: AWS API Documentation

Request Syntax

response = client.create_budget(
    actions=[
        {
            'description': 'string',
            'thresholdPercentage': ...,
            'type': 'STOP_SCHEDULING_AND_COMPLETE_TASKS'|'STOP_SCHEDULING_AND_CANCEL_TASKS'
        },
    ],
    approximateDollarLimit=...,
    clientToken='string',
    description='string',
    displayName='string',
    farmId='string',
    schedule={
        'fixed': {
            'endTime': datetime(2015, 1, 1),
            'startTime': datetime(2015, 1, 1)
        }
    },
    usageTrackingResource={
        'queueId': 'string'
    }
)
Parameters:
  • actions (list) –

    [REQUIRED]

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

    • (dict) –

      The budget action to add.

      • description (string) –

        A description for the budget action to add.

      • thresholdPercentage (float) – [REQUIRED]

        The percentage threshold for the budget action to add.

      • type (string) – [REQUIRED]

        The type of budget action to add.

  • approximateDollarLimit (float) –

    [REQUIRED]

    The dollar limit based on consumed usage.

  • clientToken (string) –

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

    This field is autopopulated if not provided.

  • description (string) – The description of the budget.

  • displayName (string) –

    [REQUIRED]

    The display name of the budget.

  • farmId (string) –

    [REQUIRED]

    The farm ID to include in this budget.

  • schedule (dict) –

    [REQUIRED]

    The schedule to associate with this budget.

    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.

      • endTime (datetime) – [REQUIRED]

        When the budget ends.

      • startTime (datetime) – [REQUIRED]

        When the budget starts.

  • usageTrackingResource (dict) –

    [REQUIRED]

    The queue ID provided to this budget to track usage.

    Note

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

    • queueId (string) –

      The queue ID.

Return type:

dict

Returns:

Response Syntax

{
    'budgetId': 'string'
}

Response Structure

  • (dict) –

    • budgetId (string) –

      The budget ID.

Exceptions

  • DeadlineCloud.Client.exceptions.AccessDeniedException

  • DeadlineCloud.Client.exceptions.InternalServerErrorException

  • DeadlineCloud.Client.exceptions.ResourceNotFoundException

  • DeadlineCloud.Client.exceptions.ThrottlingException

  • DeadlineCloud.Client.exceptions.ValidationException

  • DeadlineCloud.Client.exceptions.ServiceQuotaExceededException