Skip to content

Commit a683975

Browse files
committed
[Consumption] Fix help examples for budget commands
Update --budget-name to --name and add the now-required --scope so the azdev linter's faulty_help_example_parameters_rule passes after the switch to the aaz-generated commands.
1 parent c9bc511 commit a683975

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

  • src/azure-cli/azure/cli/command_modules/consumption

src/azure-cli/azure/cli/command_modules/consumption/_help.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,15 @@
2222
short-summary: Create a budget for an Azure subscription.
2323
examples:
2424
- name: Create a cost-based monthly budget with a specified amount, start date, and end date.
25-
text: az consumption budget create --budget-name "costbudget" --category "cost" --amount 100.0 -s "xxx" -e "xxx" --time-grain "monthly"
25+
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"
2626
"""
2727

2828
helps['consumption budget delete'] = """
2929
type: command
3030
short-summary: Delete a budget for an Azure subscription.
3131
examples:
32-
- name: Delete a budget for an Azure subscription. (autogenerated)
33-
text: az consumption budget delete --budget-name MyBudget
34-
crafted: true
32+
- name: Delete a budget for an Azure subscription.
33+
text: az consumption budget delete --scope subscriptions/00000000-0000-0000-0000-000000000000 --name MyBudget
3534
"""
3635

3736
helps['consumption budget list'] = """
@@ -43,9 +42,8 @@
4342
type: command
4443
short-summary: Show budget for an Azure subscription.
4544
examples:
46-
- name: Show budget for an Azure subscription. (autogenerated)
47-
text: az consumption budget show --budget-name MyBudget
48-
crafted: true
45+
- name: Show budget for an Azure subscription.
46+
text: az consumption budget show --scope subscriptions/00000000-0000-0000-0000-000000000000 --name MyBudget
4947
"""
5048

5149
helps['consumption marketplace'] = """

0 commit comments

Comments
 (0)