Azure / Azure/azure-powershell
[Doc]: Update-* commands which use GET/PUT are supported, but undocumented
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 51
Description
### 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:
> ...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.
>
>...this line: [azure-powershell/src/Storage/Storage.Autorest/README.md at ccf7f84061bd622a2ba094755ebabd30d2bc546a · Azure/azure-powershell (github.com)](https://github.com/Azure/azure-powershell/blob/ccf7f84061bd622a2ba094755ebabd30d2bc546a/src/Storage/Storage.Autorest/README.md?plain=1#L47) showcased how to remove a certain operation, please find the operationid in swagger for the patch API you want to remove as the value.
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_
Contributor guide
Assessment
This issue has not been assessed yet.