[Accounts] Add Long-Running Operation (LRO) Support to Invoke-AzRestMethod
Description
This PR introduces Long-Running Operation (LRO) support to the Invoke-AzRestMethod Cmdlet. It enhances the cmd with the ability to handle asynchronous operations by polling until completion, making it easier to work with long-running tasks in PowerShell. Key updates include:
New Parameters: • -WaitForCompletion: A switch parameter that specifies whether to detect and wait for long-running operations. • -PollFrom: Enum parameter allowing users to override the auto-detection of the polling URI. • -FinalResultFrom: Enum parameter to override the auto-detection of the final result URI.
LRO Support Details: • Supports multiple operation types: PUT, PATCH, POST, DELETE, and GET. • Supports four polling URIs (azure-async-location, location, original-uri, operation-location) and corresponding final result options. • Adds non-terminal and terminal status checks for LROs, including status codes 201, 202, and 200.
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.)
- [x] General release
- [ ] Public preview
- [ ] Private preview
- [ ] Engineering build
- [ ] No need for a release
-
[x] Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:
- SHOULD update
ChangeLog.mdfile(s) appropriately- For SDK-based development mode, update
src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.- A snippet outlining the change(s) made in the PR should be written under the
## Upcoming Releaseheader in the past tense.
- A snippet outlining the change(s) made in the PR should be written under the
- For autorest-based development mode, include the changelog in the PR description.
- Should not change
ChangeLog.mdif no new release is required, such as fixing test case only.
- For SDK-based development mode, update
- 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
⚠️Az.Accounts
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Breaking Change Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Signature Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Help Example Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Help File Existence Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️File Change Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️UX Metadata Check
⚠️PowerShell Core - Windows
Type Module ResourceType SubResourceType Command Description ⚠️ Az.Accounts Microsoft.Subscription subscriptions Get-AzSubscription The path /subscriptions/{subscriptionId} doesn't contains the right resource tpye: Microsoft.Subscription ⚠️Windows PowerShell - Windows
Type Module ResourceType SubResourceType Command Description ⚠️ Az.Accounts Microsoft.Subscription subscriptions Get-AzSubscription The path /subscriptions/{subscriptionId} doesn't contains the right resource tpye: Microsoft.Subscription ️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Aks
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.ApplicationInsights
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Compute
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Functions
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️Az.KeyVault
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️Test
⚠️ - Linux
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 22.09 % Test coverage for the module cannot be lower than 50%. ⚠️ - MacOS
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 22.09% Test coverage for the module cannot be lower than 50%. ⚠️PowerShell Core - Windows
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 22.09% Test coverage for the module cannot be lower than 50%. ⚠️Windows PowerShell - Windows
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 22.09% Test coverage for the module cannot be lower than 50%.
️✔️Az.KubernetesConfiguration
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.ManagedServiceIdentity
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Monitor
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Network
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.OperationalInsights
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.PostgreSql
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.PrivateDns
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️Az.Purview
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️Test
⚠️ - Linux
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 8.70 % Test coverage for the module cannot be lower than 50%. ⚠️ - MacOS
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 8.70% Test coverage for the module cannot be lower than 50%. ⚠️PowerShell Core - Windows
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 8.70% Test coverage for the module cannot be lower than 50%. ⚠️Windows PowerShell - Windows
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 8.70% Test coverage for the module cannot be lower than 50%.
⚠️Az.Resources
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️Test
⚠️ - Linux
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 49.76 % Test coverage for the module cannot be lower than 50%. ⚠️ - MacOS
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 49.76% Test coverage for the module cannot be lower than 50%. ⚠️PowerShell Core - Windows
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 49.76% Test coverage for the module cannot be lower than 50%. ⚠️Windows PowerShell - Windows
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 49.76% Test coverage for the module cannot be lower than 50%.
️✔️Az.Sql
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️Az.Storage
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️Test
⚠️ - Linux
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 41.76 % Test coverage for the module cannot be lower than 50%. ⚠️ - MacOS
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 41.76% Test coverage for the module cannot be lower than 50%. ⚠️PowerShell Core - Windows
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 41.76% Test coverage for the module cannot be lower than 50%. ⚠️Windows PowerShell - Windows
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 41.76% Test coverage for the module cannot be lower than 50%.
️✔️Az.Websites
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
This PR was labeled "needs-revision" because it has unresolved review comments or CI failures. Please resolve all open review comments and make sure all CI checks are green. Refer to our guide to troubleshoot common CI failures.
Hi @notyashhh , is your pr ready to merge?
Hi @notyashhh , is your pr ready to merge?
@Nickcandy Not ready yet, writing some test cases and a review from a team member is pending.
release-2024-11-11 is for Az 12.5. This PR should target 13.0. I'm updating the base branch to main.