budgets
Creates, updates, deletes, gets or lists a budgets resource.
Overview
| Name | budgets |
| Type | Resource |
| Id | aws.deadline.budgets |
Fields
The following fields are returned by SELECT queries:
- get_budget
- list_budgets
| Name | Datatype | Description |
|---|---|---|
actions | array | The budget actions for the budget. |
approximate_dollar_limit | number (float) | The consumed usage limit for the budget. |
budget_id | string | The budget ID. (pattern: <code>budget-[0-9a-f]{32}</code>) |
created_at | string (date-time) | The date and time the resource was created. |
created_by | string | The user or system that created this resource. |
description | string | The description of the budget. 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. |
display_name | string | The display name of the budget. 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. |
queue_stopped_at | string (date-time) | The date and time the queue stopped. |
schedule | object | The start and end time of the budget. |
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. (ACTIVE, INACTIVE) |
updated_at | string (date-time) | The date and time the resource was updated. |
updated_by | string | The user or system that updated this resource. |
usage_tracking_resource | object | The usage details of the allotted budget. |
usages | object | The usages of the budget. |
| Name | Datatype | Description |
|---|---|---|
approximate_dollar_limit | number (float) | The approximate dollar limit of the budget. |
budget_id | string | The budget ID. (pattern: <code>budget-[0-9a-f]{32}</code>) |
created_at | string (date-time) | The date and time the resource was created. |
created_by | string | The user or system that created this resource. |
description | string | The description of the budget summary. 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. |
display_name | string | The display name of the budget summary to update. 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 | 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. (ACTIVE, INACTIVE) |
updated_at | string (date-time) | The date and time the resource was updated. |
updated_by | string | The user or system that updated this resource. |
usage_tracking_resource | object | The usage details of the allotted budget. |
usages | object | The consumed usage for the budget. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_budget | select | farm_id, budget_id, region | Get a budget. | |
list_budgets | select | farm_id, region | nextToken, maxResults, status | A list of budgets in a farm. |
create_budget | insert | farm_id, region, displayName, usageTrackingResource, approximateDollarLimit, actions, schedule | X-Amz-Client-Token | Creates a budget to set spending thresholds for your rendering activity. |
update_budget | update | farm_id, budget_id, region | X-Amz-Client-Token | Updates a budget that sets spending thresholds for rendering activity. |
delete_budget | delete | farm_id, budget_id, region | Deletes a budget. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
budget_id | string | The budget ID of the budget to delete. |
farm_id | string | The farm ID of the farm to remove from the budget. |
region | string | AWS region (default: us-east-1) |
X-Amz-Client-Token | string | The unique token which the server uses to recognize retries of the same request. |
maxResults | integer | The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. |
nextToken | string | The token for the next set of results, or null to start from the beginning. |
status | string | The status to list for the budgets. |
SELECT examples
- get_budget
- list_budgets
Get a budget.
SELECT
actions,
approximate_dollar_limit,
budget_id,
created_at,
created_by,
description,
display_name,
queue_stopped_at,
schedule,
status,
updated_at,
updated_by,
usage_tracking_resource,
usages
FROM aws.deadline.budgets
WHERE farm_id = '{{ farm_id }}' -- required
AND budget_id = '{{ budget_id }}' -- required
AND region = '{{ region }}' -- required
;
A list of budgets in a farm.
SELECT
approximate_dollar_limit,
budget_id,
created_at,
created_by,
description,
display_name,
status,
updated_at,
updated_by,
usage_tracking_resource,
usages
FROM aws.deadline.budgets
WHERE farm_id = '{{ farm_id }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
AND status = '{{ status }}'
;
INSERT examples
- create_budget
- Manifest
Creates a budget to set spending thresholds for your rendering activity.
INSERT INTO aws.deadline.budgets (
displayName,
description,
usageTrackingResource,
approximateDollarLimit,
actions,
schedule,
tags,
farm_id,
region,
`X-Amz-Client-Token`
)
SELECT
'{{ displayName }}' /* required */,
'{{ description }}',
'{{ usageTrackingResource }}' /* required */,
{{ approximateDollarLimit }} /* required */,
'{{ actions }}' /* required */,
'{{ schedule }}' /* required */,
'{{ tags }}',
'{{ farm_id }}',
'{{ region }}',
'{{ X-Amz-Client-Token }}'
RETURNING
budget_id
;
# Description fields are for documentation purposes
- name: budgets
props:
- name: farm_id
value: "{{ farm_id }}"
description: Required parameter for the budgets resource.
- name: region
value: "{{ region }}"
description: Required parameter for the budgets resource.
- name: displayName
value: "{{ displayName }}"
- name: description
value: "{{ description }}"
- name: usageTrackingResource
description: |
The usage details of the allotted budget.
value:
queueId: "{{ queueId }}"
- name: approximateDollarLimit
value: {{ approximateDollarLimit }}
- name: actions
value:
- type_: "{{ type_ }}"
thresholdPercentage: {{ thresholdPercentage }}
description: "{{ description }}"
- name: schedule
description: |
The start and end time of the budget.
value:
fixed:
startTime: "{{ startTime }}"
endTime: "{{ endTime }}"
- name: tags
value: "{{ tags }}"
- name: X-Amz-Client-Token
value: "{{ X-Amz-Client-Token }}"
description: The unique token which the server uses to recognize retries of the same request.
description: The unique token which the server uses to recognize retries of the same request.
UPDATE examples
- update_budget
Updates a budget that sets spending thresholds for rendering activity.
UPDATE aws.deadline.budgets
SET
displayName = '{{ displayName }}',
description = '{{ description }}',
status = '{{ status }}',
approximateDollarLimit = {{ approximateDollarLimit }},
actionsToAdd = '{{ actionsToAdd }}',
actionsToRemove = '{{ actionsToRemove }}',
schedule = '{{ schedule }}'
WHERE
farm_id = '{{ farm_id }}' --required
AND budget_id = '{{ budget_id }}' --required
AND region = '{{ region }}' --required
AND `X-Amz-Client-Token` = '{{ X-Amz-Client-Token}}';
DELETE examples
- delete_budget
Deletes a budget.
DELETE FROM aws.deadline.budgets
WHERE farm_id = '{{ farm_id }}' --required
AND budget_id = '{{ budget_id }}' --required
AND region = '{{ region }}' --required
;