Skip to content

[Consumption] Update consumption module swagger from 2023-05-01 to 2024-08-01#33222

Open
khang-11 wants to merge 1 commit intoAzure:devfrom
khang-11:feature/update-consumption-swagger
Open

[Consumption] Update consumption module swagger from 2023-05-01 to 2024-08-01#33222
khang-11 wants to merge 1 commit intoAzure:devfrom
khang-11:feature/update-consumption-swagger

Conversation

@khang-11
Copy link
Copy Markdown

Related command

Description

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature


This checklist is used to make sure that common guidelines for a pull request are followed.

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Hi @khang-11,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Apr 20, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@yonzhan yonzhan requested a review from necusjz April 20, 2026 01:00
@Azure Azure deleted a comment from azure-client-tools-bot-prd Bot Apr 24, 2026
@khang-11 khang-11 force-pushed the feature/update-consumption-swagger branch from d7f56b7 to 8562050 Compare April 24, 2026 03:11
@Azure Azure deleted a comment from azure-client-tools-bot-prd Bot Apr 24, 2026
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd Bot commented Apr 24, 2026

❌AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
❌appservice
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_linux_webapp_quick_create_cd self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f7d890b1a30>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f7d89a16c60>
command = 'webapp create -g clitest.rg000001 -n webapp-linux-cd000002 --plan plan-quick-linux-cd -u https://github.com/yugangw-msft/azure-site-test.git&nbsp;-r&nbsp;"NODE
20-lts"'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: 
                                        
env/lib/python3.12/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:157: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
                                       _ 

ex = ValidationError("Linux Runtime 'NODE
Failed test_win_webapp_quick_create_cd The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:174
Failed test_win_webapp_quick_create_runtime The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:156
Failed test_download_win_web_log The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:480
Failed test_webapp_config The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:732
Failed test_linux_webapp The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:1261
Failed test_linux_webapp_remote_ssh The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:1366
Failed test_acr_integration The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:1427
Failed test_webapp_linux_acr_use_identity The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2592
Failed test_webapp_deployment_source_track_runtimestatus_buildfailed The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3368
Failed test_webapp_deployment_source_track_runtimestatus_runtimefailed The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3381
Failed test_webapp_track_runtimestatus_buildfailed The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3307
Failed test_webapp_track_runtimestatus_runtimefailed The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3320
❌3.13
Type Test Case Error Message Line
Failed test_linux_webapp_quick_create_cd self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f1f0ae96c10>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f1f0bd1e990>
command = 'webapp create -g clitest.rg000001 -n webapp-linux-cd000002 --plan plan-quick-linux-cd -u https://github.com/yugangw-msft/azure-site-test.git&nbsp;-r&nbsp;"NODE
20-lts"'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: 
                                        
env/lib/python3.13/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:157: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
                                       _ 

ex = ValidationError("Linux Runtime 'NODE
Failed test_win_webapp_quick_create_cd The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:174
Failed test_win_webapp_quick_create_runtime The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:156
Failed test_download_win_web_log The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:480
Failed test_webapp_config The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:732
Failed test_linux_webapp The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:1261
Failed test_linux_webapp_remote_ssh The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:1366
Failed test_acr_integration The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:1427
Failed test_webapp_linux_acr_use_identity The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2592
Failed test_webapp_deployment_source_track_runtimestatus_buildfailed The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3368
Failed test_webapp_deployment_source_track_runtimestatus_runtimefailed The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3381
Failed test_webapp_track_runtimestatus_buildfailed The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3307
Failed test_webapp_track_runtimestatus_runtimefailed The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3320
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️postgresql
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

"version": "2024-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/providers/microsoft.consumption/budgets", "2023-05-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.consumption/budgets", "2023-05-01"],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

do we have this swagger path in the latest api? --rg will be removed without it.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

latest swagger does not have --rg, but I believe it will end up using 2018 if that command is targeted

@khang-11 khang-11 changed the title update swagger [Consumption] Update consumption module swagger from 2023-05-01 to 2024-08-01 Apr 30, 2026
@microsoft-github-policy-service
Copy link
Copy Markdown
Contributor

@khang-11 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"
Contributor License Agreement

Contribution License Agreement

This Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
and conveys certain license rights to Microsoft Corporation and its affiliates (“Microsoft”) for Your
contributions to Microsoft open source projects. This Agreement is effective as of the latest signature
date below.

  1. Definitions.
    “Code” means the computer software code, whether in human-readable or machine-executable form,
    that is delivered by You to Microsoft under this Agreement.
    “Project” means any of the projects owned or managed by Microsoft and offered under a license
    approved by the Open Source Initiative (www.opensource.org).
    “Submit” is the act of uploading, submitting, transmitting, or distributing code or other content to any
    Project, including but not limited to communication on electronic mailing lists, source code control
    systems, and issue tracking systems that are managed by, or on behalf of, the Project for the purpose of
    discussing and improving that Project, but excluding communication that is conspicuously marked or
    otherwise designated in writing by You as “Not a Submission.”
    “Submission” means the Code and any other copyrightable material Submitted by You, including any
    associated comments and documentation.
  2. Your Submission. You must agree to the terms of this Agreement before making a Submission to any
    Project. This Agreement covers any and all Submissions that You, now or in the future (except as
    described in Section 4 below), Submit to any Project.
  3. Originality of Work. You represent that each of Your Submissions is entirely Your original work.
    Should You wish to Submit materials that are not Your original work, You may Submit them separately
    to the Project if You (a) retain all copyright and license information that was in the materials as You
    received them, (b) in the description accompanying Your Submission, include the phrase “Submission
    containing materials of a third party:” followed by the names of the third party and any licenses or other
    restrictions of which You are aware, and (c) follow any other instructions in the Project’s written
    guidelines concerning Submissions.
  4. Your Employer. References to “employer” in this Agreement include Your employer or anyone else
    for whom You are acting in making Your Submission, e.g. as a contractor, vendor, or agent. If Your
    Submission is made in the course of Your work for an employer or Your employer has intellectual
    property rights in Your Submission by contract or applicable law, You must secure permission from Your
    employer to make the Submission before signing this Agreement. In that case, the term “You” in this
    Agreement will refer to You and the employer collectively. If You change employers in the future and
    desire to Submit additional Submissions for the new employer, then You agree to sign a new Agreement
    and secure permission from the new employer before Submitting those Submissions.
  5. Licenses.
  • Copyright License. You grant Microsoft, and those who receive the Submission directly or
    indirectly from Microsoft, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license in the
    Submission to reproduce, prepare derivative works of, publicly display, publicly perform, and distribute
    the Submission and such derivative works, and to sublicense any or all of the foregoing rights to third
    parties.
  • Patent License. You grant Microsoft, and those who receive the Submission directly or
    indirectly from Microsoft, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license under
    Your patent claims that are necessarily infringed by the Submission or the combination of the
    Submission with the Project to which it was Submitted to make, have made, use, offer to sell, sell and
    import or otherwise dispose of the Submission alone or with the Project.
  • Other Rights Reserved. Each party reserves all rights not expressly granted in this Agreement.
    No additional licenses or rights whatsoever (including, without limitation, any implied licenses) are
    granted by implication, exhaustion, estoppel or otherwise.
  1. Representations and Warranties. You represent that You are legally entitled to grant the above
    licenses. You represent that each of Your Submissions is entirely Your original work (except as You may
    have disclosed under Section 3). You represent that You have secured permission from Your employer to
    make the Submission in cases where Your Submission is made in the course of Your work for Your
    employer or Your employer has intellectual property rights in Your Submission by contract or applicable
    law. If You are signing this Agreement on behalf of Your employer, You represent and warrant that You
    have the necessary authority to bind the listed employer to the obligations contained in this Agreement.
    You are not expected to provide support for Your Submission, unless You choose to do so. UNLESS
    REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, AND EXCEPT FOR THE WARRANTIES
    EXPRESSLY STATED IN SECTIONS 3, 4, AND 6, THE SUBMISSION PROVIDED UNDER THIS AGREEMENT IS
    PROVIDED WITHOUT WARRANTY OF ANY KIND, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY OF
    NONINFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
  2. Notice to Microsoft. You agree to notify Microsoft in writing of any facts or circumstances of which
    You later become aware that would make Your representations in this Agreement inaccurate in any
    respect.
  3. Information about Submissions. You agree that contributions to Projects and information about
    contributions may be maintained indefinitely and disclosed publicly, including Your name and other
    information that You submit with Your Submission.
  4. Governing Law/Jurisdiction. This Agreement is governed by the laws of the State of Washington, and
    the parties consent to exclusive jurisdiction and venue in the federal courts sitting in King County,
    Washington, unless no federal subject matter jurisdiction exists, in which case the parties consent to
    exclusive jurisdiction and venue in the Superior Court of King County, Washington. The parties waive all
    defenses of lack of personal jurisdiction and forum non-conveniens.
  5. Entire Agreement/Assignment. This Agreement is the entire agreement between the parties, and
    supersedes any and all prior agreements, understandings or communications, written or oral, between
    the parties relating to the subject matter hereof. This Agreement may be assigned by Microsoft.

@khang-11 khang-11 force-pushed the feature/update-consumption-swagger branch 2 times, most recently from 9332d8e to 090d716 Compare April 30, 2026 08:03
@khang-11 khang-11 force-pushed the feature/update-consumption-swagger branch from f7f5db4 to bd501cd Compare April 30, 2026 11:51
@khang-11 khang-11 marked this pull request as ready for review May 1, 2026 01:10
Copilot AI review requested due to automatic review settings May 1, 2026 01:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the consumption command module to use newer Consumption RP swagger/API version (2024-08-01) and adjusts command implementations + test recordings accordingly, while attempting to preserve backward compatibility for existing CLI UX.

Changes:

  • Updated AAZ-generated Consumption operations (budgets, marketplace, pricesheet, reservation summaries/details) to api-version 2024-08-01 and new scope-based resource paths.
  • Added/updated adapters in custom.py to keep legacy CLI behavior (optional scope defaults, restored aliases, legacy filter mapping) and introduced az consumption budget update.
  • Refreshed recorded tests to reflect the new api-version in request URLs and nextLink values.

Reviewed changes

Copilot reviewed 36 out of 36 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/azure-cli/azure/cli/command_modules/consumption/tests/latest/recordings/test_list_reservations_summaries_monthly_with_reservationid.yaml Update reservation summaries recording to api-version 2024-08-01.
src/azure-cli/azure/cli/command_modules/consumption/tests/latest/recordings/test_list_reservations_summaries_monthly.yaml Update reservation summaries recording to api-version 2024-08-01.
src/azure-cli/azure/cli/command_modules/consumption/tests/latest/recordings/test_list_reservations_summaries_daily_with_reservationid.yaml Update reservation summaries (daily) recording to api-version 2024-08-01.
src/azure-cli/azure/cli/command_modules/consumption/tests/latest/recordings/test_list_reservations_summaries_daily.yaml Update reservation summaries (daily) recording to api-version 2024-08-01.
src/azure-cli/azure/cli/command_modules/consumption/tests/latest/recordings/test_list_reservations_details_with_reservationid.yaml Update reservation details recording to api-version 2024-08-01.
src/azure-cli/azure/cli/command_modules/consumption/tests/latest/recordings/test_list_reservations_details.yaml Update reservation details recording to api-version 2024-08-01.
src/azure-cli/azure/cli/command_modules/consumption/tests/latest/recordings/test_consumption_pricesheet_billing_period.yaml Update pricesheet-by-billing-period recording to api-version 2024-08-01 (incl. nextLink).
src/azure-cli/azure/cli/command_modules/consumption/tests/latest/recordings/test_consumption_pricesheet.yaml Update pricesheet recording to api-version 2024-08-01 (incl. nextLink).
src/azure-cli/azure/cli/command_modules/consumption/tests/latest/recordings/test_consumption_marketplace_list_billing_period_filter.yaml Update marketplace list recording (billing period + top) to api-version 2024-08-01 (incl. nextLink).
src/azure-cli/azure/cli/command_modules/consumption/tests/latest/recordings/test_consumption_marketplace_list_billing_period.yaml Update marketplace list (billing period) recording to api-version 2024-08-01.
src/azure-cli/azure/cli/command_modules/consumption/tests/latest/recordings/test_consumption_marketplace_list.yaml Update marketplace list recording to api-version 2024-08-01.
src/azure-cli/azure/cli/command_modules/consumption/tests/latest/recordings/test_consumption_budget_usage_create.yaml Update budget create (usage) recording to api-version 2024-08-01.
src/azure-cli/azure/cli/command_modules/consumption/tests/latest/recordings/test_consumption_budget_show.yaml Update budget show recording to api-version 2024-08-01.
src/azure-cli/azure/cli/command_modules/consumption/tests/latest/recordings/test_consumption_budget_delete.yaml Update budget delete recording to api-version 2024-08-01.
src/azure-cli/azure/cli/command_modules/consumption/tests/latest/recordings/test_consumption_budget_create.yaml Update budget create recording to api-version 2024-08-01.
src/azure-cli/azure/cli/command_modules/consumption/custom.py Add adapters for budget show/create/delete/update + marketplace scope/billing-period support and legacy filter mapping.
src/azure-cli/azure/cli/command_modules/consumption/commands.py Register the new consumption budget update command and wire updated adapters into command table.
src/azure-cli/azure/cli/command_modules/consumption/aaz/latest/consumption/reservation/summary/_list.py Regenerate reservation summaries list for api-version 2024-08-01; update resource paths and schema.
src/azure-cli/azure/cli/command_modules/consumption/aaz/latest/consumption/reservation/detail/_list.py Regenerate reservation details list for api-version 2024-08-01; update resource paths and schema.
src/azure-cli/azure/cli/command_modules/consumption/aaz/latest/consumption/pricesheet/_show.py Regenerate pricesheet show for api-version 2024-08-01; update schema (systemData, savingsPlan, etc.).
src/azure-cli/azure/cli/command_modules/consumption/aaz/latest/consumption/pricesheet/__cmd_group.py Remove preview marker from AAZ command group registration.
src/azure-cli/azure/cli/command_modules/consumption/aaz/latest/consumption/marketplace/_list.py Regenerate marketplace list for scope-based path and api-version 2024-08-01; add 204 handling + schema updates.
src/azure-cli/azure/cli/command_modules/consumption/aaz/latest/consumption/marketplace/__cmd_group.py Remove preview marker from AAZ command group registration.
src/azure-cli/azure/cli/command_modules/consumption/aaz/latest/consumption/budget/_update_with_rg.py Switch RG-scoped update-with-rg api-version metadata to 2018-01-31.
src/azure-cli/azure/cli/command_modules/consumption/aaz/latest/consumption/budget/_update.py Regenerate budget update for scope-based path and api-version 2024-08-01 (new filter model).
src/azure-cli/azure/cli/command_modules/consumption/aaz/latest/consumption/budget/_show_with_rg.py Switch RG-scoped show-with-rg api-version metadata to 2018-01-31.
src/azure-cli/azure/cli/command_modules/consumption/aaz/latest/consumption/budget/_show.py Regenerate budget show for scope-based path and api-version 2024-08-01 (new filter model).
src/azure-cli/azure/cli/command_modules/consumption/aaz/latest/consumption/budget/_list.py Regenerate budget list for scope-based path and api-version 2024-08-01 (new filter model).
src/azure-cli/azure/cli/command_modules/consumption/aaz/latest/consumption/budget/_delete_with_rg.py Switch RG-scoped delete-with-rg api-version metadata to 2018-01-31.
src/azure-cli/azure/cli/command_modules/consumption/aaz/latest/consumption/budget/_delete.py Regenerate budget delete for scope-based path and api-version 2024-08-01; add confirmation prompt.
src/azure-cli/azure/cli/command_modules/consumption/aaz/latest/consumption/budget/_create_with_rg.py Switch RG-scoped create-with-rg api-version metadata to 2018-01-31.
src/azure-cli/azure/cli/command_modules/consumption/aaz/latest/consumption/budget/_create.py Regenerate budget create for scope-based path and api-version 2024-08-01 (new filter model).
src/azure-cli/azure/cli/command_modules/consumption/aaz/latest/consumption/budget/__cmd_group.py Remove preview marker from AAZ command group registration.
src/azure-cli/azure/cli/command_modules/consumption/aaz/latest/init.py Add lint skips for generated AAZ package.
src/azure-cli/azure/cli/command_modules/consumption/_help.py Add help entry for consumption budget update.
linter_exclusions.yml Add linter exclusion entry for consumption budget update examples rule.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 14 to 16
@register_command_group(
"consumption marketplace",
is_preview=True,
)
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.
Comment on lines 14 to 16
@register_command_group(
"consumption pricesheet",
is_preview=True,
)
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.
Comment on lines 491 to 494
if resource_group_name:
from .aaz.latest.consumption.budget import CreateWithRg
args['resource_group'] = resource_group_name
return CreateWithRg(cli_ctx=cmd.cli_ctx)(command_args=args)
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.

When resource_group_name is provided, this calls CreateWithRg, but the earlier mapping now builds args["filter"] (new schema) rather than the legacy args["filters"] structure that CreateWithRg expects. As a result, --meter-filter/--resource-filter/--resource-group-filter inputs will be silently ignored for resource-group scoped budget creation (and usage-category budgets may fail server-side because meters aren’t sent). Consider either (1) populating args["filters"] for the CreateWithRg path, or (2) switching the RG path to use the 2024-08-01 scope-based Create adapter with scope set to the RG and the new filter structure.

Suggested change
if resource_group_name:
from .aaz.latest.consumption.budget import CreateWithRg
args['resource_group'] = resource_group_name
return CreateWithRg(cli_ctx=cmd.cli_ctx)(command_args=args)
subscription_scope = "/subscriptions/{}".format(cmd.cli_ctx.data['subscription_id'])
if resource_group_name:
args["scope"] = "{}/resourceGroups/{}".format(subscription_scope, resource_group_name)
else:
args["scope"] = subscription_scope

Copilot uses AI. Check for mistakes.
Comment on lines 91 to 96
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
if session.http_response.status_code in [204]:
return self.on_204(session)

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.

MarketplacesList.__call__ treats HTTP 204 as a success and calls on_204, but on_204 doesn’t populate ctx.vars.instance. The command’s _output unconditionally reads self.ctx.vars.instance.value, which will raise at runtime for a 204 response. Either remove the 204 success handling, or implement on_204 to set instance to an empty result (e.g., value=[], nextLink=None) and/or make _output resilient when no instance is set.

Copilot uses AI. Check for mistakes.
Comment on lines 35 to +36
self.command_table["consumption budget list"] = ConsumptionBudgetsList(loader=self)
self.command_table["consumption budget update"] = BudgetUpdateAdapter(loader=self)
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.

consumption budget update is added directly as an AAZ command, but unlike budget create/show/list it doesn’t apply transform_budget_create_update_output (or any equivalent _output override). This will make update output formatting inconsistent (e.g., numeric fields won’t be stringified like other budget commands). Consider wiring update through a custom wrapper/transform (or overriding _output in the adapter) to keep output consistent with the existing budget commands.

Suggested change
self.command_table["consumption budget list"] = ConsumptionBudgetsList(loader=self)
self.command_table["consumption budget update"] = BudgetUpdateAdapter(loader=self)
class TransformedBudgetUpdateAdapter(BudgetUpdateAdapter):
def _output(self, *args, **kwargs):
return transform_budget_create_update_output(super()._output(*args, **kwargs))
self.command_table["consumption budget list"] = ConsumptionBudgetsList(loader=self)
self.command_table["consumption budget update"] = TransformedBudgetUpdateAdapter(loader=self)

Copilot uses AI. Check for mistakes.
Comment on lines 14 to 16
@register_command_group(
"consumption budget",
is_preview=True,
)
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 List(AAZCommand):
"""List the marketplace for an Azure subscription within a billing period.
"""List the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1, 2014 or later.
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.

The command description has redundant wording (“for a scope at the defined scope”), which reads like a generation glitch and can be confusing in az consumption marketplace list -h. Consider rephrasing to a single clear sentence (e.g., “List marketplaces for the given scope …”).

Suggested change
"""List the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1, 2014 or later.
"""List marketplaces for the given scope. Marketplaces are available via this API only for May 1, 2014 or later.

Copilot uses AI. Check for mistakes.
@Azure Azure deleted a comment from azure-client-tools-bot-prd Bot May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants