Microsoft.Consumption budgets 2019-10-01
Bicep resource definition
The budgets resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Consumption/budgets resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Consumption/budgets@2019-10-01' = {
scope: resourceSymbolicName or scope
eTag: 'string'
name: 'string'
properties: {
amount: int
category: 'string'
filter: {
and: [
{
dimensions: {
name: 'string'
operator: 'string'
values: [
'string'
]
}
tags: {
name: 'string'
operator: 'string'
values: [
'string'
]
}
}
]
dimensions: {
name: 'string'
operator: 'string'
values: [
'string'
]
}
not: {
dimensions: {
name: 'string'
operator: 'string'
values: [
'string'
]
}
tags: {
name: 'string'
operator: 'string'
values: [
'string'
]
}
}
tags: {
name: 'string'
operator: 'string'
values: [
'string'
]
}
}
notifications: {
{customized property}: {
contactEmails: [
'string'
]
contactGroups: [
'string'
]
contactRoles: [
'string'
]
enabled: bool
locale: 'string'
operator: 'string'
threshold: int
thresholdType: 'string'
}
}
timeGrain: 'string'
timePeriod: {
endDate: 'string'
startDate: 'string'
}
}
}
Property values
BudgetComparisonExpression
Name | Description | Value |
---|---|---|
name | The name of the column to use in comparison. | string (required) |
operator | The operator to use for comparison. | 'In' (required) |
values | Array of values to use for comparison | string[] (required) |
BudgetFilter
Name | Description | Value |
---|---|---|
and | The logical "AND" expression. Must have at least 2 items. | BudgetFilterProperties[] |
dimensions | Has comparison expression for a dimension | BudgetComparisonExpression |
not | The logical "NOT" expression. | BudgetFilterProperties |
tags | Has comparison expression for a tag | BudgetComparisonExpression |
BudgetFilterProperties
Name | Description | Value |
---|---|---|
dimensions | Has comparison expression for a dimension | BudgetComparisonExpression |
tags | Has comparison expression for a tag | BudgetComparisonExpression |
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' (required) |
filter | May be used to filter budgets by user-specified dimensions and/or tags. | BudgetFilter |
notifications | Dictionary of notifications associated with the budget. Budget can have up to five notifications. | BudgetPropertiesNotifications |
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' (required) |
timePeriod | Has start and end date of the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than twelve months. Past start date should be selected within the timegrain period. There are no restrictions on the end date. | BudgetTimePeriod (required) |
BudgetPropertiesNotifications
Name | Description | Value |
---|
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) |
Microsoft.Consumption/budgets
Name | Description | Value |
---|---|---|
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 |
name | The resource name | string (required) |
properties | The properties of the budget. | BudgetProperties |
scope | Use when creating a resource at a scope that is different than the deployment scope. | Set this property to the symbolic name of a resource to apply the extension resource. |
Notification
Name | Description | Value |
---|---|---|
contactEmails | Email addresses to send the budget notification to when the threshold is exceeded. Must have at least one contact email or contact group specified at the Subscription or Resource Group scopes. All other scopes must have at least one contact email specified. | string[] (required) |
contactGroups | Action groups to send the budget notification to when the threshold is exceeded. Must be provided as a fully qualified Azure resource id. Only supported at Subscription or Resource Group scopes. | string[] |
contactRoles | Contact roles to send the budget notification to when the threshold is exceeded. | string[] |
enabled | The notification is enabled or not. | bool (required) |
locale | Language in which the recipient will receive the notification | 'cs-cz' 'da-dk' 'de-de' 'en-gb' 'en-us' 'es-es' 'fr-fr' 'hu-hu' 'it-it' 'ja-jp' 'ko-kr' 'nb-no' 'nl-nl' 'pl-pl' 'pt-br' 'pt-pt' 'ru-ru' 'sv-se' 'tr-tr' 'zh-cn' 'zh-tw' |
operator | The comparison operator. | 'EqualTo' 'GreaterThan' 'GreaterThanOrEqualTo' (required) |
threshold | Threshold value associated with a notification. Notification is sent when the cost exceeded the threshold. It is always percent and has to be between 0 and 1000. | int (required) |
thresholdType | The type of threshold | 'Actual' |
Quickstart samples
The following quickstart samples deploy this resource type.
Bicep File | Description |
---|---|
Create a Budget | This template shows how to create a budget under a subscription. |
Create a Budget with Filter | This template shows how to create a budget under a subscription. |
Create a Simple Budget | This template shows how to create a budget under a subscription. |
ARM template resource definition
The budgets resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Consumption/budgets resource, add the following JSON to your template.
{
"type": "Microsoft.Consumption/budgets",
"apiVersion": "2019-10-01",
"name": "string",
"eTag": "string",
"properties": {
"amount": "int",
"category": "string",
"filter": {
"and": [
{
"dimensions": {
"name": "string",
"operator": "string",
"values": [ "string" ]
},
"tags": {
"name": "string",
"operator": "string",
"values": [ "string" ]
}
}
],
"dimensions": {
"name": "string",
"operator": "string",
"values": [ "string" ]
},
"not": {
"dimensions": {
"name": "string",
"operator": "string",
"values": [ "string" ]
},
"tags": {
"name": "string",
"operator": "string",
"values": [ "string" ]
}
},
"tags": {
"name": "string",
"operator": "string",
"values": [ "string" ]
}
},
"notifications": {
"{customized property}": {
"contactEmails": [ "string" ],
"contactGroups": [ "string" ],
"contactRoles": [ "string" ],
"enabled": "bool",
"locale": "string",
"operator": "string",
"threshold": "int",
"thresholdType": "string"
}
},
"timeGrain": "string",
"timePeriod": {
"endDate": "string",
"startDate": "string"
}
}
}
Property values
BudgetComparisonExpression
Name | Description | Value |
---|---|---|
name | The name of the column to use in comparison. | string (required) |
operator | The operator to use for comparison. | 'In' (required) |
values | Array of values to use for comparison | string[] (required) |
BudgetFilter
Name | Description | Value |
---|---|---|
and | The logical "AND" expression. Must have at least 2 items. | BudgetFilterProperties[] |
dimensions | Has comparison expression for a dimension | BudgetComparisonExpression |
not | The logical "NOT" expression. | BudgetFilterProperties |
tags | Has comparison expression for a tag | BudgetComparisonExpression |
BudgetFilterProperties
Name | Description | Value |
---|---|---|
dimensions | Has comparison expression for a dimension | BudgetComparisonExpression |
tags | Has comparison expression for a tag | BudgetComparisonExpression |
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' (required) |
filter | May be used to filter budgets by user-specified dimensions and/or tags. | BudgetFilter |
notifications | Dictionary of notifications associated with the budget. Budget can have up to five notifications. | BudgetPropertiesNotifications |
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' (required) |
timePeriod | Has start and end date of the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than twelve months. Past start date should be selected within the timegrain period. There are no restrictions on the end date. | BudgetTimePeriod (required) |
BudgetPropertiesNotifications
Name | Description | Value |
---|
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) |
Microsoft.Consumption/budgets
Name | Description | Value |
---|---|---|
apiVersion | The api version | '2019-10-01' |
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 |
name | The resource name | string (required) |
properties | The properties of the budget. | BudgetProperties |
type | The resource type | 'Microsoft.Consumption/budgets' |
Notification
Name | Description | Value |
---|---|---|
contactEmails | Email addresses to send the budget notification to when the threshold is exceeded. Must have at least one contact email or contact group specified at the Subscription or Resource Group scopes. All other scopes must have at least one contact email specified. | string[] (required) |
contactGroups | Action groups to send the budget notification to when the threshold is exceeded. Must be provided as a fully qualified Azure resource id. Only supported at Subscription or Resource Group scopes. | string[] |
contactRoles | Contact roles to send the budget notification to when the threshold is exceeded. | string[] |
enabled | The notification is enabled or not. | bool (required) |
locale | Language in which the recipient will receive the notification | 'cs-cz' 'da-dk' 'de-de' 'en-gb' 'en-us' 'es-es' 'fr-fr' 'hu-hu' 'it-it' 'ja-jp' 'ko-kr' 'nb-no' 'nl-nl' 'pl-pl' 'pt-br' 'pt-pt' 'ru-ru' 'sv-se' 'tr-tr' 'zh-cn' 'zh-tw' |
operator | The comparison operator. | 'EqualTo' 'GreaterThan' 'GreaterThanOrEqualTo' (required) |
threshold | Threshold value associated with a notification. Notification is sent when the cost exceeded the threshold. It is always percent and has to be between 0 and 1000. | int (required) |
thresholdType | The type of threshold | 'Actual' |
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 with Filter |
This template shows how to create a budget under a subscription. |
Create a Simple Budget |
This template shows how to create a budget under a subscription. |
Terraform (AzAPI provider) resource definition
The budgets resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Consumption/budgets resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Consumption/budgets@2019-10-01"
name = "string"
parent_id = "string"
eTag = "string"
body = jsonencode({
properties = {
amount = int
category = "string"
filter = {
and = [
{
dimensions = {
name = "string"
operator = "string"
values = [
"string"
]
}
tags = {
name = "string"
operator = "string"
values = [
"string"
]
}
}
]
dimensions = {
name = "string"
operator = "string"
values = [
"string"
]
}
not = {
dimensions = {
name = "string"
operator = "string"
values = [
"string"
]
}
tags = {
name = "string"
operator = "string"
values = [
"string"
]
}
}
tags = {
name = "string"
operator = "string"
values = [
"string"
]
}
}
notifications = {
{customized property} = {
contactEmails = [
"string"
]
contactGroups = [
"string"
]
contactRoles = [
"string"
]
enabled = bool
locale = "string"
operator = "string"
threshold = int
thresholdType = "string"
}
}
timeGrain = "string"
timePeriod = {
endDate = "string"
startDate = "string"
}
}
})
}
Property values
BudgetComparisonExpression
Name | Description | Value |
---|---|---|
name | The name of the column to use in comparison. | string (required) |
operator | The operator to use for comparison. | 'In' (required) |
values | Array of values to use for comparison | string[] (required) |
BudgetFilter
Name | Description | Value |
---|---|---|
and | The logical "AND" expression. Must have at least 2 items. | BudgetFilterProperties[] |
dimensions | Has comparison expression for a dimension | BudgetComparisonExpression |
not | The logical "NOT" expression. | BudgetFilterProperties |
tags | Has comparison expression for a tag | BudgetComparisonExpression |
BudgetFilterProperties
Name | Description | Value |
---|---|---|
dimensions | Has comparison expression for a dimension | BudgetComparisonExpression |
tags | Has comparison expression for a tag | BudgetComparisonExpression |
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' (required) |
filter | May be used to filter budgets by user-specified dimensions and/or tags. | BudgetFilter |
notifications | Dictionary of notifications associated with the budget. Budget can have up to five notifications. | BudgetPropertiesNotifications |
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' (required) |
timePeriod | Has start and end date of the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than twelve months. Past start date should be selected within the timegrain period. There are no restrictions on the end date. | BudgetTimePeriod (required) |
BudgetPropertiesNotifications
Name | Description | Value |
---|
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) |
Microsoft.Consumption/budgets
Name | Description | Value |
---|---|---|
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 |
name | The resource name | string (required) |
parent_id | The ID of the resource to apply this extension resource to. | string (required) |
properties | The properties of the budget. | BudgetProperties |
type | The resource type | "Microsoft.Consumption/budgets@2019-10-01" |
Notification
Name | Description | Value |
---|---|---|
contactEmails | Email addresses to send the budget notification to when the threshold is exceeded. Must have at least one contact email or contact group specified at the Subscription or Resource Group scopes. All other scopes must have at least one contact email specified. | string[] (required) |
contactGroups | Action groups to send the budget notification to when the threshold is exceeded. Must be provided as a fully qualified Azure resource id. Only supported at Subscription or Resource Group scopes. | string[] |
contactRoles | Contact roles to send the budget notification to when the threshold is exceeded. | string[] |
enabled | The notification is enabled or not. | bool (required) |
locale | Language in which the recipient will receive the notification | 'cs-cz' 'da-dk' 'de-de' 'en-gb' 'en-us' 'es-es' 'fr-fr' 'hu-hu' 'it-it' 'ja-jp' 'ko-kr' 'nb-no' 'nl-nl' 'pl-pl' 'pt-br' 'pt-pt' 'ru-ru' 'sv-se' 'tr-tr' 'zh-cn' 'zh-tw' |
operator | The comparison operator. | 'EqualTo' 'GreaterThan' 'GreaterThanOrEqualTo' (required) |
threshold | Threshold value associated with a notification. Notification is sent when the cost exceeded the threshold. It is always percent and has to be between 0 and 1000. | int (required) |
thresholdType | The type of threshold | 'Actual' |