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
3 changes: 3 additions & 0 deletions linter_exclusions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1382,6 +1382,9 @@ consumption budget create:
resource_groups:
rule_exclusions:
- option_length_too_long
consumption budget update:
rule_exclusions:
- missing_command_example
consumption pricesheet show:
parameters:
include_meter_details:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@
short-summary: List budgets for an Azure subscription.
"""

helps['consumption budget update'] = """
type: command
short-summary: Update a budget for an Azure subscription.
examples:
- name: Update the amount for a budget.
text: az consumption budget update --budget-name MyBudget --amount 200.0
"""

helps['consumption budget show'] = """
type: command
short-summary: Show budget for an Azure subscription.
Expand Down
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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class CreateWithRg(AAZCommand):
"""

_aaz_info = {
"version": "2023-05-01",
"version": "2018-01-31",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.consumption/budgets/{}", "2023-05-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.consumption/budgets/{}", "2018-01-31"],
]
}

Expand Down Expand Up @@ -240,7 +240,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-05-01",
"api-version", "2018-01-31",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@

@register_command(
"consumption budget delete",
is_preview=True,
confirmation="Are you sure you want to perform this operation?",
)
class Delete(AAZCommand):
"""Delete operation to delete a budget.
"""

_aaz_info = {
"version": "2023-05-01",
"version": "2024-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/providers/microsoft.consumption/budgets/{}", "2023-05-01"],
["mgmt-plane", "/{scope}/providers/microsoft.consumption/budgets/{}", "2024-08-01"],
]
}

Expand All @@ -43,10 +43,14 @@ def _build_arguments_schema(cls, *args, **kwargs):

_args_schema = cls._args_schema
_args_schema.budget_name = AAZStrArg(
options=["-n", "--name", "--budget-name"],
options=["--budget-name"],
help="Budget Name.",
required=True,
id_part="name",
)
_args_schema.scope = AAZStrArg(
options=["--scope"],
help="The fully qualified Azure Resource manager identifier of the resource.",
required=True,
)
return cls._args_schema

Expand Down Expand Up @@ -77,7 +81,7 @@ def __call__(self, *args, **kwargs):
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/budgets/{budgetName}",
"/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}",
**self.url_parameters
)

Expand All @@ -87,7 +91,7 @@ def method(self):

@property
def error_format(self):
return "ODataV4Format"
return "MgmtErrorFormat"

@property
def url_parameters(self):
Expand All @@ -97,7 +101,8 @@ def url_parameters(self):
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
"scope", self.ctx.args.scope,
skip_quote=True,
required=True,
),
}
Expand All @@ -107,7 +112,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-05-01",
"api-version", "2024-08-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class DeleteWithRg(AAZCommand):
"""

_aaz_info = {
"version": "2023-05-01",
"version": "2018-01-31",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.consumption/budgets/{}", "2023-05-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.consumption/budgets/{}", "2018-01-31"],
]
}

Expand Down Expand Up @@ -114,7 +114,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-05-01",
"api-version", "2018-01-31",
required=True,
),
}
Expand Down
Loading
Loading