DeadlineCloud / Client / get_budget

get_budget#

DeadlineCloud.Client.get_budget(**kwargs)#

Get a budget.

See also: AWS API Documentation

Request Syntax

response = client.get_budget(
    budgetId='string',
    farmId='string'
)
Parameters:
  • budgetId (string) –

    [REQUIRED]

    The budget ID.

  • farmId (string) –

    [REQUIRED]

    The farm ID of the farm connected to the budget.

Return type:

dict

Returns:

Response Syntax

{
    'actions': [
        {
            'description': 'string',
            'thresholdPercentage': ...,
            'type': 'STOP_SCHEDULING_AND_COMPLETE_TASKS'|'STOP_SCHEDULING_AND_CANCEL_TASKS'
        },
    ],
    'approximateDollarLimit': ...,
    'budgetId': 'string',
    'createdAt': datetime(2015, 1, 1),
    'createdBy': 'string',
    'description': 'string',
    'displayName': 'string',
    'queueStoppedAt': datetime(2015, 1, 1),
    'schedule': {
        'fixed': {
            'endTime': datetime(2015, 1, 1),
            'startTime': datetime(2015, 1, 1)
        }
    },
    'status': 'ACTIVE'|'INACTIVE',
    'updatedAt': datetime(2015, 1, 1),
    'updatedBy': 'string',
    'usageTrackingResource': {
        'queueId': 'string'
    },
    'usages': {
        'approximateDollarUsage': ...
    }
}

Response Structure

  • (dict) –

    • actions (list) –

      The budget actions for the budget.

      • (dict) –

        The details of a budget action.

        • description (string) –

          The budget action description.

        • thresholdPercentage (float) –

          The percentage threshold for the budget.

        • type (string) –

          The action taken on the budget once scheduling stops.

    • approximateDollarLimit (float) –

      The consumed usage limit for the budget.

    • budgetId (string) –

      The budget ID.

    • createdAt (datetime) –

      The date and time the resource was created.

    • createdBy (string) –

      The user or system that created this resource.

    • description (string) –

      The description of the budget.

    • displayName (string) –

      The display name of the budget.

    • queueStoppedAt (datetime) –

      The date and time the queue stopped.

    • schedule (dict) –

      The budget schedule.

      Note

      This is a Tagged Union structure. Only one of the following top level keys will be set: fixed. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

      'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
      
      • fixed (dict) –

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

        • endTime (datetime) –

          When the budget ends.

        • startTime (datetime) –

          When the budget starts.

    • status (string) –

      The status of the budget.

      • ACTIVE–Get a budget being evaluated.

      • INACTIVE–Get an inactive budget. This can include expired, canceled, or deleted statuses.

    • updatedAt (datetime) –

      The date and time the resource was updated.

    • updatedBy (string) –

      The user or system that updated this resource.

    • usageTrackingResource (dict) –

      The resource that the budget is tracking usage for.

      Note

      This is a Tagged Union structure. Only one of the following top level keys will be set: queueId. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

      'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
      
      • queueId (string) –

        The queue ID.

    • usages (dict) –

      The usages of the budget.

      • approximateDollarUsage (float) –

        The amount of the budget consumed.

Exceptions