Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions src/azure-cli/azure/cli/command_modules/consumption/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@
short-summary: Create a budget for an Azure subscription.
examples:
- name: Create a cost-based monthly budget with a specified amount, start date, and end date.
text: az consumption budget create --budget-name "costbudget" --category "cost" --amount 100.0 -s "xxx" -e "xxx" --time-grain "monthly"
text: az consumption budget create --scope subscriptions/00000000-0000-0000-0000-000000000000 --name "costbudget" --category "Cost" --amount 100.0 --start-date "2024-01-01T00:00:00Z" --end-date "2024-12-31T00:00:00Z" --time-grain "Monthly"
"""

helps['consumption budget delete'] = """
type: command
short-summary: Delete a budget for an Azure subscription.
examples:
- name: Delete a budget for an Azure subscription. (autogenerated)
text: az consumption budget delete --budget-name MyBudget
crafted: true
- name: Delete a budget for an Azure subscription.
text: az consumption budget delete --scope subscriptions/00000000-0000-0000-0000-000000000000 --name MyBudget
"""

helps['consumption budget list'] = """
Expand All @@ -43,9 +42,8 @@
type: command
short-summary: Show budget for an Azure subscription.
examples:
- name: Show budget for an Azure subscription. (autogenerated)
text: az consumption budget show --budget-name MyBudget
crafted: true
- name: Show budget for an Azure subscription.
text: az consumption budget show --scope subscriptions/00000000-0000-0000-0000-000000000000 --name MyBudget
"""

helps['consumption marketplace'] = """
Expand Down
19 changes: 2 additions & 17 deletions src/azure-cli/azure/cli/command_modules/consumption/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,6 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

# pylint: disable=line-too-long
# pylint: disable=too-many-statements
from azure.cli.core.commands.parameters import get_enum_type
from ._validators import (datetime_type,
decimal_type)


def load_arguments(self, _):
with self.argument_context('consumption budget') as cb:
cb.argument('budget_name', help='Name of a budget.')
cb.argument('category', arg_type=get_enum_type(['cost', 'usage']), help='Category of the budget can be cost or usage.')
cb.argument('amount', type=decimal_type, help='Amount of a budget.')
cb.argument('time_grain', arg_type=get_enum_type(['monthly', 'quarterly', 'annually']), help='Time grain of the budget can be monthly, quarterly, or annually.')
cb.argument('start_date', options_list=['--start-date', '-s'], type=datetime_type, help='Start date (YYYY-MM-DD in UTC) of time period of a budget.')
cb.argument('end_date', options_list=['--end-date', '-e'], type=datetime_type, help='End date (YYYY-MM-DD in UTC) of time period of a budget.')
cb.argument('resource_groups', options_list='--resource-group-filter', nargs='+', help='Space-separated list of resource groups to filter on.')
cb.argument('resources', options_list='--resource-filter', nargs='+', help='Space-separated list of resource instances to filter on.')
cb.argument('meters', options_list='--meter-filter', nargs='+', help='Space-separated list of meters to filter on. Required if category is usage.')
def load_arguments(self, _): # pylint: disable=unused-argument
pass

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@register_command_group(
"consumption budget",
is_preview=True,
)
Comment on lines 14 to 16
Copy link

Copilot AI May 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change removes is_preview=True from the registered command group, which changes CLI surface area/metadata (preview vs GA) and is user-facing. The PR title/description focus on a swagger/api-version update; if the preview status change is intentional, it should be called out explicitly (and potentially require extra review). If it’s not intentional, consider restoring is_preview=True.

Copilot uses AI. Check for mistakes.
class __CMDGroup(AAZCommandGroup):
"""Manage budgets for an Azure subscription.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@

from .__cmd_group import *
from ._create import *
from ._create_with_rg import *
from ._delete import *
from ._delete_with_rg import *
from ._list import *
from ._show import *
from ._show_with_rg import *
from ._update import *
from ._update_with_rg import *
Loading
Loading