Skip to content

Give Invoke-AzResourceAction powershell cmdlet a synchronous mode #10316

Open
@buchs

Description

@buchs

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.

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions