azure-powershell
azure-powershell copied to clipboard
Give Invoke-AzResourceAction powershell cmdlet a synchronous mode
Description of the new feature
Invoke-AzResourceAction, Powershell cmdlet, https://docs.microsoft.com/en-us/powershell/module/az.resources/invoke-azresourceaction?view=azps-2.8.0, currently runs asynchronously. It returns immediately but it is still working on the operation. The user must poll for a resource to be created and then check the provisioningstatus of that resource. The Azure CLI runs the comparative command synchronously, so it pauses until it is done. Could you at least create a parameter for Invoke-AzResourceAction so that it would run synchronously.
Proposed implementation details (optional)
In other cases for async/sync operation you have -NoWait flag to trigger async so for consistency, lacking that flag should be the sync default. However, it now runs as async, so for the least breakage, you may want to add a -Wait flag.
You can no doubt implement this exactly as the CLI does.
@buchs thanks for submitting this inconsistency between the two tools. Our strategy is to reduce the differences between them and this falls in this category.
@ravbhatnagar, @Tiano2017 can you please have a look?
+1 on this request. We need a way to check if the aysnc operation is actually successful out of the box.
@raych1 Should your team own the solution for this? Or is there an issue with a dependency you are taking on ARM?
@raych1 Should your team own the solution for this? Or is there an issue with a dependency you are taking on ARM?
+@dcaro , @dingmeng-xue to comment.
No developer works on this cmdlet for couple years. We will check its owner.
+1 for this request. Please look into the feature requst