Skip to main content

budgets

Creates, updates, deletes, gets or lists a budgets resource.

Overview

Namebudgets
TypeResource
Idazure.consumption.budgets

Fields

The following fields are returned by SELECT queries:

OK. The request has succeeded.

NameDatatypeDescription
propertiesobjectThe properties of the budget. (title: Budget properties)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectscope, budgetNameGets the budget for the scope by budget name.
listselectscopeLists all budgets for the defined scope.
create_or_updateinsertscope, budgetNameThe 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.
deletedeletescope, budgetNameThe 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.

NameDatatypeDescription
budgetNamestringBudget Name.
scopestringThe 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

Gets the budget for the scope by budget name.

SELECT
properties
FROM azure.consumption.budgets
WHERE scope = '{{ scope }}' -- required
AND budgetName = '{{ budgetName }}' -- required
;

INSERT examples

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
;

DELETE examples

The operation to delete a budget.

DELETE FROM azure.consumption.budgets
WHERE scope = '{{ scope }}' --required
AND budgetName = '{{ budgetName }}' --required
;