Share via


az consumption budget

Command group 'consumption' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage budgets for an Azure subscription.

Commands

Name Description Type Status
az consumption budget create

Create a budget for an Azure subscription.

Core Preview
az consumption budget create-with-rg

Create operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.

Core Preview
az consumption budget delete

Delete a budget for an Azure subscription.

Core Preview
az consumption budget delete-with-rg

Delete operation to delete a budget.

Core Preview
az consumption budget list

List budgets for an Azure subscription.

Core Preview
az consumption budget show

Show budget for an Azure subscription.

Core Preview
az consumption budget show-with-rg

Get the budget for a resource group under a subscription by budget name.

Core Preview
az consumption budget update

Update operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.

Core Preview
az consumption budget update-with-rg

Update operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.

Core Preview

az consumption budget create

Preview

Command group 'consumption' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create a budget for an Azure subscription.

az consumption budget create --amount
                             --budget-name
                             --category {cost, usage}
                             --end-date
                             --start-date
                             --time-grain {annually, monthly, quarterly}
                             [--meter-filter]
                             [--resource-filter]
                             [--resource-group]
                             [--resource-group-filter]

Required Parameters

--amount

Amount of a budget.

--budget-name

Name of a budget.

--category

Category of the budget can be cost or usage.

Accepted values: cost, usage
--end-date -e

End date (YYYY-MM-DD in UTC) of time period of a budget.

--start-date -s

Start date (YYYY-MM-DD in UTC) of time period of a budget.

--time-grain

Time grain of the budget can be monthly, quarterly, or annually.

Accepted values: annually, monthly, quarterly

Optional Parameters

--meter-filter

Space-separated list of meters to filter on. Required if category is usage.

--resource-filter

Space-separated list of resource instances to filter on.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--resource-group-filter

Space-separated list of resource groups to filter on.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az consumption budget create-with-rg

Preview

Command group 'consumption' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.

az consumption budget create-with-rg [--amount]
                                     [--budget-name]
                                     [--category {Cost, Usage}]
                                     [--e-tag]
                                     [--filters]
                                     [--ids]
                                     [--notifications]
                                     [--resource-group]
                                     [--subscription]
                                     [--time-grain {Annually, Monthly, Quarterly}]
                                     [--time-period]

Optional Parameters

--amount

The total amount of cost to track with the budget.

--budget-name --name -n

Budget Name.

--category

The category of the budget, whether the budget tracks cost or usage.

Accepted values: Cost, Usage
--e-tag

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.

--filters

May be used to filter budgets by resource group, resource, or meter. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--notifications

Dictionary of notifications associated with the budget. Budget can have up to five notifications. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--time-grain

The time covered by a budget. Tracking of the amount will be reset based on the time grain.

Accepted values: Annually, Monthly, Quarterly
--time-period

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. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az consumption budget delete

Preview

Command group 'consumption' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete a budget for an Azure subscription.

az consumption budget delete --budget-name
                             [--resource-group]

Examples

Delete a budget for an Azure subscription. (autogenerated)

az consumption budget delete --budget-name MyBudget

Required Parameters

--budget-name

Name of a budget.

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az consumption budget delete-with-rg

Preview

Command group 'consumption' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete operation to delete a budget.

az consumption budget delete-with-rg [--budget-name]
                                     [--ids]
                                     [--resource-group]
                                     [--subscription]

Optional Parameters

--budget-name --name -n

Budget Name.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az consumption budget list

Preview

Command group 'consumption' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List budgets for an Azure subscription.

az consumption budget list [--max-items]
                           [--next-token]
                           [--resource-group]

Optional Parameters

--max-items

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.

--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az consumption budget show

Preview

Command group 'consumption' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Show budget for an Azure subscription.

az consumption budget show --budget-name
                           [--resource-group]

Examples

Show budget for an Azure subscription. (autogenerated)

az consumption budget show --budget-name MyBudget

Required Parameters

--budget-name

Name of a budget.

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az consumption budget show-with-rg

Preview

Command group 'consumption' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get the budget for a resource group under a subscription by budget name.

az consumption budget show-with-rg [--budget-name]
                                   [--ids]
                                   [--resource-group]
                                   [--subscription]

Optional Parameters

--budget-name --name -n

Budget Name.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az consumption budget update

Preview

Command group 'consumption' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.

az consumption budget update [--add]
                             [--amount]
                             [--budget-name]
                             [--category {Cost, Usage}]
                             [--e-tag]
                             [--filters]
                             [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                             [--ids]
                             [--notifications]
                             [--remove]
                             [--set]
                             [--subscription]
                             [--time-grain {Annually, Monthly, Quarterly}]
                             [--time-period]

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--amount

The total amount of cost to track with the budget.

--budget-name --name -n

Budget Name.

--category

The category of the budget, whether the budget tracks cost or usage.

Accepted values: Cost, Usage
--e-tag

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.

--filters

May be used to filter budgets by resource group, resource, or meter. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--notifications

Dictionary of notifications associated with the budget. Budget can have up to five notifications. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--time-grain

The time covered by a budget. Tracking of the amount will be reset based on the time grain.

Accepted values: Annually, Monthly, Quarterly
--time-period

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. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az consumption budget update-with-rg

Preview

Command group 'consumption' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.

az consumption budget update-with-rg [--amount]
                                     [--budget-name]
                                     [--category {Cost, Usage}]
                                     [--e-tag]
                                     [--filters]
                                     [--ids]
                                     [--notifications]
                                     [--resource-group]
                                     [--subscription]
                                     [--time-grain {Annually, Monthly, Quarterly}]
                                     [--time-period]

Optional Parameters

--amount

The total amount of cost to track with the budget.

--budget-name --name -n

Budget Name.

--category

The category of the budget, whether the budget tracks cost or usage.

Accepted values: Cost, Usage
--e-tag

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.

--filters

May be used to filter budgets by resource group, resource, or meter. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--notifications

Dictionary of notifications associated with the budget. Budget can have up to five notifications. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--time-grain

The time covered by a budget. Tracking of the amount will be reset based on the time grain.

Accepted values: Annually, Monthly, Quarterly
--time-period

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. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.