Skip to content

[Doc]: Update-* commands which use GET/PUT are supported, but undocumented #26677

Open
@sardobi

Description

@sardobi

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) 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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions