Microsoft.Consumption budgets
The budgets resource type can be deployed to: Resource groups, Subscriptions.
To learn about resource group deployments, see Bicep or ARM template. To learn about subscription deployments, see Bicep or ARM template
Template format
To create a Microsoft.Consumption/budgets resource, add the following Bicep or JSON to your template.
resource symbolicname 'Microsoft.Consumption/budgets@2021-10-01' = {
name: 'string'
eTag: 'string'
properties: {
amount: int
category: 'Cost'
filter: {
and: [
{
dimensions: {
name: 'string'
operator: 'In'
values: [
'string'
]
}
tags: {
name: 'string'
operator: 'In'
values: [
'string'
]
}
}
]
dimensions: {
name: 'string'
operator: 'In'
values: [
'string'
]
}
tags: {
name: 'string'
operator: 'In'
values: [
'string'
]
}
}
notifications: {}
timeGrain: 'string'
timePeriod: {
endDate: 'string'
startDate: 'string'
}
}
}
Property values
budgets
| Name | Description | Value |
|---|---|---|
| type | The resource type For Bicep, set this value in the resource declaration. |
'Microsoft.Consumption/budgets' |
| apiVersion | The resource api version For Bicep, set this value in the resource declaration. |
'2021-10-01' |
| name | The resource name | string (required) Character limit: 1-63 Valid characters: Alphanumerics, hyphens, and underscores. |
| eTag | eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not. | string |
| properties | The properties of the budget. | BudgetProperties |
BudgetProperties
| Name | Description | Value |
|---|---|---|
| amount | The total amount of cost to track with the budget | int (required) |
| category | The category of the budget, whether the budget tracks cost or usage. | 'Cost' |
| filter | May be used to filter budgets by resource group, resource, or meter. | BudgetFilter |
| notifications | Dictionary of notifications associated with the budget. Budget can have up to five notifications. | object |
| timeGrain | The time covered by a budget. Tracking of the amount will be reset based on the time grain. BillingMonth, BillingQuarter, and BillingAnnual are only supported by WD customers | 'Annually' 'BillingAnnual' 'BillingMonth' 'BillingQuarter' 'Monthly' 'Quarterly' |
| timePeriod | The start and end date for a budget. | BudgetTimePeriod (required) |
BudgetFilter
| Name | Description | Value |
|---|---|---|
| and | The logical "AND" expression. Must have at least 2 items. | BudgetFilterProperties[] |
| dimensions | The comparison expression to be used in the budgets. | BudgetComparisonExpression |
| tags | The comparison expression to be used in the budgets. | object |
BudgetFilterProperties
| Name | Description | Value |
|---|---|---|
| dimensions | The comparison expression to be used in the budgets. | BudgetComparisonExpression |
| tags | The comparison expression to be used in the budgets. | object |
BudgetComparisonExpression
| Name | Description | Value |
|---|---|---|
| name | The name of the column to use in comparison. | string (required) |
| operator | The operator to use for comparison. | 'In' |
| values | Array of values to use for comparison | string[] (required) |
BudgetTimePeriod
| Name | Description | Value |
|---|---|---|
| endDate | The end date for the budget. If not provided, we default this to 10 years from the start date. | string |
| startDate | The start date for the budget. | string (required) |
Quickstart templates
The following quickstart templates deploy this resource type.
| Template | Description |
|---|---|
| Create a Budget |
This template shows how to create a budget under a subscription. |
| Create a Budget |
This template shows how to create a budget under a subscription. |
| Create a Budget |
This template shows how to create a budget under a subscription. |