Skip to content

Upgrade Quota service from API version 2023-02-01 to 2025-09-01 stable#28902

Open
RenSilvaAU wants to merge 51 commits intoAzure:mainfrom
RenSilvaAU:resilv/group-quota-sept
Open

Upgrade Quota service from API version 2023-02-01 to 2025-09-01 stable#28902
RenSilvaAU wants to merge 51 commits intoAzure:mainfrom
RenSilvaAU:resilv/group-quota-sept

Conversation

@RenSilvaAU
Copy link
Contributor

@RenSilvaAU RenSilvaAU commented Nov 19, 2025

Description

This PR upgrades the Az.Quota module from API version 2023-02-01 to 2025-09-01 stable, introducing comprehensive Group Quota management capabilities at the management group level. This is a significant enhancement that enables centralized quota governance across multiple subscriptions.

Key Changes:

  • API Version Upgrade: Migrated from 2023-02-01 to 2025-09-01 stable

  • New Group Quota Cmdlets: Added 10+ new cmdlets for CRUD operations on group quotas, subscriptions, location settings, limits, allocations, and usage

  • Documentation: Generated complete help documentation for all new cmdlets

Changes:

  • Added 10+ new cmdlets for managing group quotas at the management group level:
    • Group quota CRUD operations (Get/New/Update/Remove-AzQuotaGroupQuota)
    • Subscription associations (Get/New/Update/Remove-AzQuotaGroupQuotaSubscription)
    • Quota limit and allocation requests
    • Usage and location settings management
  • Upgraded from API version 2023-02-01 to 2025-09-01 stable
  • Updated AutoRest directives for proper verb mapping (New for PUT-only operations)
  • All tests passing with comprehensive recording files
  • Generated help documentation for all new cmdlets

This enables Azure customers to manage quotas across multiple subscriptions at the management group level for improved governance and resource allocation.

Mandatory Checklist

  • SHOULD updated ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

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

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

@RenSilvaAU RenSilvaAU self-assigned this Nov 19, 2025
@RenSilvaAU RenSilvaAU requested a review from dolauli November 19, 2025 22:32
@notyashhh
Copy link
Member

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Member

@notyashhh notyashhh left a comment

Choose a reason for hiding this comment

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

Looks Great! Also, can you please add changelog under the ##Upcoming Changes section?

In file Quota/Quota/Changelog.md

@isra-fel
Copy link
Member

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

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

Copilot reviewed 128 out of 144 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (6)

src/Quota/Quota.Autorest/test/env.json:1

  • This appears to commit real Tenant/Subscription GUIDs into the repository. Even if not secrets, these identifiers can be sensitive and can unintentionally couple tests/recordings to a specific environment. Prefer using placeholder values (e.g., '00000000-0000-0000-0000-000000000000') and rely on loadEnv.ps1 / CI secret variables to inject real IDs at runtime, or ensure the test framework’s sanitization replaces them during recording generation.
    src/Quota/Quota.Autorest/test/Update-AzQuota.Tests.ps1:1
  • The generated help/docs in this PR show Update-AzQuota uses -NameValue (not -Name). These tests still call -Name, which is likely to fail parameter binding unless an alias exists. Update the tests to use -NameValue (or remove the parameter if it’s optional and not required by the cmdlet).
    src/Quota/Quota.Autorest/test/Update-AzQuota.Tests.ps1:1
  • The generated help/docs in this PR show Update-AzQuota uses -NameValue (not -Name). These tests still call -Name, which is likely to fail parameter binding unless an alias exists. Update the tests to use -NameValue (or remove the parameter if it’s optional and not required by the cmdlet).
    src/Quota/Quota.Autorest/test/Get-AzQuotaGroupQuotaSubscriptionAllocationRequest.Tests.ps1:1
  • This test will always pass, even if the cmdlet throws or returns unexpected output. To keep recordings robust while still validating behavior, assert something concrete (e.g., that the call does not throw, or that the returned object has expected shape when present). If known service/cmdlet bugs require soft-fail, prefer Set-ItResult -Skipped with a specific reason or assert on the expected exception/message.
    src/Quota/Quota/help/Get-AzQuotaGroupQuotaUsage.md:1
  • Corrected spelling of 'paramter' to 'parameter'.
    src/Quota/Quota/help/Az.Quota.md:1
  • Corrected spelling of 'Ten' to 'Then' in this sentence.

Comment on lines +16 to +26

// Check if response is plain text (not JSON)
if (!string.IsNullOrEmpty(content) && !content.TrimStart().StartsWith("{") && !content.TrimStart().StartsWith("["))
{
// Handle plain text response
if (content.Trim() == "[]")
{
// Empty array - output nothing (no allocation requests found)
returnNow = global::System.Threading.Tasks.Task.FromResult(true);
}
else
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

Same logic issue as the other custom override: the [] handling can’t be reached due to the !StartsWith(\"[\") guard. Reorder the checks (handle [] first) or use Content-Type to decide whether to treat the payload as JSON vs plain text.

Suggested change
// Check if response is plain text (not JSON)
if (!string.IsNullOrEmpty(content) && !content.TrimStart().StartsWith("{") && !content.TrimStart().StartsWith("["))
{
// Handle plain text response
if (content.Trim() == "[]")
{
// Empty array - output nothing (no allocation requests found)
returnNow = global::System.Threading.Tasks.Task.FromResult(true);
}
else
if (!string.IsNullOrEmpty(content))
{
var trimmedContent = content.Trim();
// Handle empty array response explicitly
if (trimmedContent == "[]")
{
// Empty array - output nothing (no allocation requests found)
returnNow = global::System.Threading.Tasks.Task.FromResult(true);
}
// Check if response is plain text (not JSON)
else if (!trimmedContent.StartsWith("{") && !trimmedContent.StartsWith("["))

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings January 27, 2026 03:38
Copy link
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.

Copilot wasn't able to review any files in this pull request.

@isra-fel
Copy link
Member

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@isra-fel
Copy link
Member

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Copilot AI review requested due to automatic review settings January 27, 2026 23:28
Copy link
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.

Copilot wasn't able to review any files in this pull request.

@isra-fel
Copy link
Member

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@isra-fel
Copy link
Member

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Copilot AI review requested due to automatic review settings January 28, 2026 01:40
Copy link
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.

Copilot wasn't able to review any files in this pull request.

@isra-fel
Copy link
Member

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@RenSilvaAU
Copy link
Contributor Author

@dolauli , @isra-fel , @notyashhh

Comments have been addressed and tests now pass in Playback mode.

@isra-fel isra-fel assigned isra-fel and unassigned RenSilvaAU Jan 28, 2026
@isra-fel isra-fel added this to the Az 15.4.0 (03/03/2026) milestone Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants