Upgrade Quota service from API version 2023-02-01 to 2025-09-01 stable#28902
Upgrade Quota service from API version 2023-02-01 to 2025-09-01 stable#28902RenSilvaAU wants to merge 51 commits intoAzure:mainfrom
2023-02-01 to 2025-09-01 stable#28902Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
…AU/azure-powershell into resilv/group-quota-sept
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
notyashhh
left a comment
There was a problem hiding this comment.
Looks Great! Also, can you please add changelog under the ##Upcoming Changes section?
In file Quota/Quota/Changelog.md
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
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 -Skippedwith 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.
|
|
||
| // 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 |
There was a problem hiding this comment.
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.
| // 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("[")) |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
@dolauli , @isra-fel , @notyashhh Comments have been addressed and tests now pass in Playback mode. |
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:
Get/New/Update/Remove-AzQuotaGroupQuota)Get/New/Update/Remove-AzQuotaGroupQuotaSubscription)2023-02-01to2025-09-01stableThis enables Azure customers to manage quotas across multiple subscriptions at the management group level for improved governance and resource allocation.
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.