Microsoft.Consumption budgets 2017-12-30-preview
Bicep resource definition
The budgets resource type is an extension resource, which means you can apply it to another resource.
Use the scope
property on this resource to set the scope for this resource. See Set scope on extension resources in Bicep.
Valid deployment scopes for the budgets resource are:
- Subscriptions - See subscription deployment commands
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@2017-12-30-preview' = {
name: 'string'
scope: resourceSymbolicName
eTag: 'string'
properties: {
amount: int
category: 'Cost'
notifications: {}
timeGrain: 'string'
timePeriod: {
endDate: 'string'
startDate: 'string'
}
}
}
Property values
budgets
Name | Description | Value |
---|---|---|
name | The resource name | string (required) Character limit: 1-63 Valid characters: Alphanumerics, hyphens, and underscores. |
scope | Use when creating an extension resource at a scope that is different than the deployment scope. | Target resource For Bicep, set this property to the symbolic name of the resource to apply the extension resource. |
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 something else. | 'Cost' (required) |
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. | 'Annually' '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 three months. Past start date should be selected within the timegrain period. There are no restrictions on the end date. | BudgetTimePeriod (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 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 is an extension resource, which means you can apply it to another resource.
Use the scope
property on this resource to set the scope for this resource. See Set scope on extension resources in ARM templates.
Valid deployment scopes for the budgets resource are:
- Subscriptions - See subscription deployment commands
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": "2017-12-30-preview",
"name": "string",
"scope": "string",
"eTag": "string",
"properties": {
"amount": "int",
"category": "Cost",
"notifications": {},
"timeGrain": "string",
"timePeriod": {
"endDate": "string",
"startDate": "string"
}
}
}
Property values
budgets
Name | Description | Value |
---|---|---|
type | The resource type | 'Microsoft.Consumption/budgets' |
apiVersion | The resource api version | '2017-12-30-preview' |
name | The resource name | string (required) Character limit: 1-63 Valid characters: Alphanumerics, hyphens, and underscores. |
scope | Use when creating an extension resource at a scope that is different than the deployment scope. | Target resource For JSON, set the value to the full name of the resource to apply the extension resource to. |
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 something else. | 'Cost' (required) |
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. | 'Annually' '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 three months. Past start date should be selected within the timegrain period. There are no restrictions on the end date. | BudgetTimePeriod (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 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 is an extension resource, which means you can apply it to another resource.
Use the parent_id
property on this resource to set the scope for this resource.
Valid deployment scopes for the budgets resource are:
- Subscriptions
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@2017-12-30-preview"
name = "string"
parent_id = "string"
body = jsonencode({
properties = {
amount = int
category = "Cost"
notifications = {}
timeGrain = "string"
timePeriod = {
endDate = "string"
startDate = "string"
}
}
eTag = "string"
})
}
Property values
budgets
Name | Description | Value |
---|---|---|
type | The resource type | "Microsoft.Consumption/budgets@2017-12-30-preview" |
name | The resource name | string (required) Character limit: 1-63 Valid characters: Alphanumerics, hyphens, and underscores. |
parent_id | The ID of the resource to apply this extension resource to. | string (required) |
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 something else. | "Cost" (required) |
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. | "Annually" "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 three months. Past start date should be selected within the timegrain period. There are no restrictions on the end date. | BudgetTimePeriod (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) |