Skip to content

Comments

Add usage documentation for undocumented ARM operation templates#3961

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/add-usage-documentation
Draft

Add usage documentation for undocumented ARM operation templates#3961
Copilot wants to merge 4 commits intomainfrom
copilot/add-usage-documentation

Conversation

Copy link
Contributor

Copilot AI commented Feb 21, 2026

Several operation templates in the Azure.ResourceManager namespace had no usage examples in the how-to documentation. This adds coverage for each in resource-operations.md.

New sections

  • ArmResourceCheckExistence — HEAD operation for checking resource existence without fetching the body
  • ArmProviderActionSync / ArmProviderActionAsync — Provider-level actions with configurable scope (TenantActionScope, SubscriptionActionScope, etc.)

Additions to existing sections

  • ArmResourcePatchSync / ArmResourcePatchAsync — Added as explicit "Lifecycle PATCH" table rows with a note that they are not recommended, since their Lifecycle.Update visibility analysis is only performed by the typespec-autorest emitter and will not be replicated in generated SDKs
  • ArmCustomPatchSync / ArmCustomPatchAsync — Marked as the recommended PATCH templates in the table and explanatory text
  • ArmResourceListAtScope — Added to the List Operations table for custom-scope listing

Not documented (intentionally)

  • ArmResourceDeleteAsyncBase, ArmResourceActionAsyncBase — internal @dev base templates
  • ArmResourceCreateOrUpdateSync, ArmResourceDeleteAsync, ArmResourceActionNoContentAsync — deprecated
  • ActionAsync — omitted per reviewer guidance

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
Copilot AI changed the title [WIP] Add usage documentation for unreferenced ARM types Add usage documentation for undocumented ARM operation templates Feb 21, 2026
Copilot AI requested a review from markcowl February 21, 2026 02:58
| Async TagsOnly PATCH | `update is ArmTagsPatchAsync<ResourceType>` |
| Sync Lifecycle PATCH | `update is ArmResourcePatchSync<ResourceType, ResourcePropertiesType>` |
| Async Lifecycle PATCH | `update is ArmResourcePatchAsync<ResourceType, ResourcePropertiesType>` |
| Sync Custom Properties PATCH | `update is ArmCustomPatchSync<ResourceType, Azure.ResourceManager.Foundations.ResourceUpdateModel<ResourceType, ResourcePropertiesType>>` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot the two ArmCustomPatch templates are the recommended templates for PATCH operations

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reordered the table to list ArmCustomPatch* before the lifecycle templates and marked them as "(recommended)" in the operation description. Also updated the explanatory text below the table to lead with ArmCustomPatch* as the recommended choice. See 2dc82a2.

| Sync Custom Properties PATCH | `update is ArmCustomPatchSync<ResourceType, Azure.ResourceManager.Foundations.ResourceUpdateModel<ResourceType, ResourcePropertiesType>>` |
| Async Custom Properties PATCH | `update is ArmCustomPatchAsync<ResourceType, Azure.ResourceManager.Foundations.ResourceUpdateModel<ResourceType, ResourcePropertiesType>>` |

The `ArmResourcePatch*` templates use the resource's Lifecycle.Update visibility to automatically
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should make it clear that the ArmResourcePatch templates are not recommended because the visibility analysis you mention is preformed only by the typespec-autorest emitter and so will not be replaicated in SDKs generated for the PATCH operation. Instead, spec authors should define a specific PATCH template and use the ArmCustomPatch* template

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a blockquote note explaining that ArmResourcePatch* templates are not recommended because the Lifecycle.Update visibility analysis is only performed by the typespec-autorest emitter and won't be replicated in SDKs. The note directs spec authors to define a specific PATCH model and use ArmCustomPatch* instead. See 2dc82a2.

Parameters to the template are the ResourceType, the model for the operation Request body, and the
model for the operation Response body.

For long-running actions where the response is only available after polling the LRO (rather than
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove any documentation about this template for now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the ActionAsync documentation. See 2dc82a2.

…inst ArmResourcePatch, remove ActionAsync docs

Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants