budgets
Creates, updates, deletes, gets or lists a budgets
resource.
Overview
Name | budgets |
Type | Resource |
Id | azure.consumption.budgets |
Fields
The following fields are returned by SELECT
queries:
- get
- list
OK. The request has succeeded.
Name | Datatype | Description |
---|---|---|
properties | object | The properties of the budget. (title: Budget properties) |
OK. The request has succeeded.
Name | Datatype | Description |
---|---|---|
properties | object | The properties of the budget. (title: Budget properties) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | scope , budgetName | Gets the budget for the scope by budget name. | |
list | select | scope | Lists all budgets for the defined scope. | |
create_or_update | insert | scope , budgetName | The operation to create or update a budget. You can optionally provide an eTag if desired as a form of concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put operation. | |
delete | delete | scope , budgetName | The operation to delete 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 |
---|---|---|
budgetName | string | Budget Name. |
scope | string | The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope. |
SELECT
examples
- get
- list
Gets the budget for the scope by budget name.
SELECT
properties
FROM azure.consumption.budgets
WHERE scope = '{{ scope }}' -- required
AND budgetName = '{{ budgetName }}' -- required
;
Lists all budgets for the defined scope.
SELECT
properties
FROM azure.consumption.budgets
WHERE scope = '{{ scope }}' -- required
;
INSERT
examples
- create_or_update
- Manifest
The operation to create or update a budget. You can optionally provide an eTag if desired as a form of concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put operation.
INSERT INTO azure.consumption.budgets (
data__properties,
scope,
budgetName
)
SELECT
'{{ properties }}',
'{{ scope }}',
'{{ budgetName }}'
RETURNING
properties
;
# Description fields are for documentation purposes
- name: budgets
props:
- name: scope
value: string
description: Required parameter for the budgets resource.
- name: budgetName
value: string
description: Required parameter for the budgets resource.
- name: properties
value: object
description: |
The properties of the budget.
DELETE
examples
- delete
The operation to delete a budget.
DELETE FROM azure.consumption.budgets
WHERE scope = '{{ scope }}' --required
AND budgetName = '{{ budgetName }}' --required
;