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.

Property Value
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.

Property Value
Accepted values: annually, monthly, quarterly

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--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.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

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 --name]
                                     [--category {Cost, Usage}]
                                     [--e-tag]
                                     [--filters]
                                     [--ids]
                                     [--notifications]
                                     [--resource-group]
                                     [--subscription]
                                     [--time-grain {Annually, Monthly, Quarterly}]
                                     [--time-period]

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--amount

The total amount of cost to track with the budget.

Property Value
Parameter group: Properties Arguments
--budget-name --name -n

Budget Name.

Property Value
Parameter group: Resource Id Arguments
--category

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

Property Value
Parameter group: Properties Arguments
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.

Property Value
Parameter group: Parameters Arguments
--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.

Property Value
Parameter group: Properties Arguments
--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.

Property Value
Parameter group: 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.

Property Value
Parameter group: Properties Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--time-grain

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

Property Value
Parameter group: Properties Arguments
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.

Property Value
Parameter group: Properties Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False

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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--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.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

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 --name]
                                     [--ids]
                                     [--resource-group]
                                     [--subscription]

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--budget-name --name -n

Budget Name.

Property Value
Parameter group: Resource Id Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False

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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--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.

Property Value
Parameter group: Pagination Arguments
--next-token

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

Property Value
Parameter group: Pagination Arguments
--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.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--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.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

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 --name]
                                   [--ids]
                                   [--resource-group]
                                   [--subscription]

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--budget-name --name -n

Budget Name.

Property Value
Parameter group: Resource Id Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False

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 --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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--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>.

Property Value
Parameter group: Generic Update Arguments
--amount

The total amount of cost to track with the budget.

Property Value
Parameter group: Properties Arguments
--budget-name --name -n

Budget Name.

Property Value
Parameter group: Resource Id Arguments
--category

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

Property Value
Parameter group: Properties Arguments
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.

Property Value
Parameter group: Parameters Arguments
--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.

Property Value
Parameter group: Properties Arguments
--force-string

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

Property Value
Parameter group: Generic Update Arguments
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.

Property Value
Parameter group: 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.

Property Value
Parameter group: Properties Arguments
--remove

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

Property Value
Parameter group: Generic Update Arguments
--set

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

Property Value
Parameter group: Generic Update Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--time-grain

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

Property Value
Parameter group: Properties Arguments
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.

Property Value
Parameter group: Properties Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False

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 --name]
                                     [--category {Cost, Usage}]
                                     [--e-tag]
                                     [--filters]
                                     [--ids]
                                     [--notifications]
                                     [--resource-group]
                                     [--subscription]
                                     [--time-grain {Annually, Monthly, Quarterly}]
                                     [--time-period]

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--amount

The total amount of cost to track with the budget.

Property Value
Parameter group: Properties Arguments
--budget-name --name -n

Budget Name.

Property Value
Parameter group: Resource Id Arguments
--category

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

Property Value
Parameter group: Properties Arguments
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.

Property Value
Parameter group: Parameters Arguments
--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.

Property Value
Parameter group: Properties Arguments
--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.

Property Value
Parameter group: 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.

Property Value
Parameter group: Properties Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--time-grain

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

Property Value
Parameter group: Properties Arguments
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.

Property Value
Parameter group: Properties Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False