Skip to content

Comments

Update ARM extension resource documentation to use new Extension namespace templates#3960

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/update-how-to-document-arm-resources
Draft

Update ARM extension resource documentation to use new Extension namespace templates#3960
Copilot wants to merge 4 commits intomainfrom
copilot/update-how-to-document-arm-resources

Conversation

Copy link
Contributor

Copilot AI commented Feb 21, 2026

  • Explore repository to understand current extension resource documentation and new templates
  • Update the "Extension Resource" section in website/src/content/docs/docs/howtos/ARM/resource-type.md to:
    • Show the new ExtensionResource model definition with ResourceNameParameter
    • Document the Extension namespace operation templates (Read, CreateOrReplaceAsync, CustomPatchSync, DeleteWithoutOkAsync, ListByTarget, ActionSync, etc.)
    • Show how to define a parameterized scope interface
    • Document built-in scopes (Tenant, Subscription, ResourceGroup, ManagementGroup, ScopeParameter)
    • Document external resource targets (ExternalResource, ExternalChildResource)
    • Show scope-specific interface implementations
    • Update sample link to point to the specific-extension sample
  • Format the document
  • Address PR review feedback:
    • Describe ResourceNameParameter by what it does rather than which decorators it includes
    • Add "like this:" to operations interface intro text
    • Add "in the Extension namespace" to templates table intro
    • Mark CreateOrReplaceAsync as the recommended PUT operation
    • Change "generic scope path" to "generic scope uri path"
  • Run code review and address feedback
  • Run CodeQL checker

💡 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.

…e templates

Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
Copilot AI changed the title [WIP] Update how-to document on ARM resource types Update ARM extension resource documentation to use new Extension namespace templates Feb 21, 2026
Copilot AI requested a review from markcowl February 21, 2026 02:48
`@visibility(read)`: indicates that this property is returned in the body of responses to operations over this resource, but does not appear in the body of requests. Later sections describe the [usage of property visibility](#property-visibility-and-other-constraints).
`@path`: indicates that this property corresponds to the last segment of the url path to the resource (otherwise known as the resource identity).
`ExtensionResource<EmployeeProperties>`: defines the resource as an extension resource with the given properties.
`...ResourceNameParameter<Employee>`: spreads in the standard resource name parameter, automatically providing the `@segment`, `@key`, `@path`, and `@visibility` decorators.
Copy link
Member

Choose a reason for hiding this comment

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

@copilot we shouldn't describe this by using the decorators included in the template, but rather by describing what they do - they define the resource type name, and details of the resource name parameter, including its name and the default pattern constraint for resource names.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in 5f514a1 to describe what ResourceNameParameter does — defines the resource type name, the name of the resource name parameter, and provides a default pattern constraint for resource names — rather than listing the decorators.


#### Defining Operations with Scope Parameters

The `Extension` namespace provides operation templates that take a scope parameter, allowing you to define a single set of operations that can be reused across different target scopes. Define a parameterized interface for your operations:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The `Extension` namespace provides operation templates that take a scope parameter, allowing you to define a single set of operations that can be reused across different target scopes. Define a parameterized interface for your operations:
The `Extension` namespace provides operation templates that take a scope parameter, allowing you to define a single set of operations that can be reused across different target scopes. Define a parameterized interface for your operations like this:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Applied in 5f514a1.

}
```

The available operation templates include:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The available operation templates include:
The available operation templates in the Extension namespace include:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Applied in 5f514a1.

| Template | Description |
| -------------------------------- | --------------------------------------------- |
| `Extension.Read` | GET operation for the resource |
| `Extension.CreateOrReplaceAsync` | Asynchronous PUT operation |
Copy link
Member

Choose a reason for hiding this comment

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

@copilot this is the recommended PUT operation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the description to "Recommended asynchronous PUT operation" in 5f514a1.


| Scope | Description |
| --------------------------- | ------------------------------------- |
| `Extension.ScopeParameter` | Any scope (uses a generic scope path) |
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
| `Extension.ScopeParameter` | Any scope (uses a generic scope path) |
| `Extension.ScopeParameter` | Any scope (uses a generic scope uri path) |

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Applied in 5f514a1.

@markcowl
Copy link
Member

@copilot please apply the changes in the comments from my review

Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 24, 2026

@copilot please apply the changes in the comments from my review

All five review changes were already applied in 5f514a1:

  • Line 97: ResourceNameParameter described by what it does
  • Line 101: Added "like this:"
  • Line 118: Added "in the Extension namespace"
  • Line 123: CreateOrReplaceAsync marked as recommended
  • Line 163: Changed to "generic scope uri path"

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