We've been working on AutoRest-based cmdlets for a resource provider which has very limited support for PATCH requests. We wanted to have an Update-* cmdlet for our resource, but didn't think that was possible, since by default the generated cmdlet will use PATCH requests to update the resource.
However, having asked in help channels, it seems there is an alternative. Per @VeryEarly:
...we provided a simpler way for these scenarios, if you use certain directive (in README.md) to remove patch API, we will generate an Update cmdlet which does Get then Put in one shot.
We have engineering hub page for autorest.powershell, please refer to it while developing autorest generated modules, and we will add introduction for GET/PUT there, thanks.
Type of issue
Missing information
Feedback
(This is about the engineering docs.)
We've been working on AutoRest-based cmdlets for a resource provider which has very limited support for PATCH requests. We wanted to have an
Update-*
cmdlet for our resource, but didn't think that was possible, since by default the generated cmdlet will use PATCH requests to update the resource.However, having asked in help channels, it seems there is an alternative. Per @VeryEarly:
This is super useful, but I don't think it is documented.
Page URL
https://github.com/Azure/azure-powershell/blob/main/documentation/development-docs/examples/update-cmdlet-example.md
Content source URL
https://github.com/Azure/azure-powershell/blob/main/documentation/development-docs/examples/update-cmdlet-example.md?plain=1
Author
No response
Document Id
No response