Update ARM extension resource documentation to use new Extension namespace templates#3960
Update ARM extension resource documentation to use new Extension namespace templates#3960
Conversation
…e templates Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
| `@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. |
There was a problem hiding this comment.
@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.
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
| 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: |
| } | ||
| ``` | ||
|
|
||
| The available operation templates include: |
There was a problem hiding this comment.
| The available operation templates include: | |
| The available operation templates in the Extension namespace include: |
| | Template | Description | | ||
| | -------------------------------- | --------------------------------------------- | | ||
| | `Extension.Read` | GET operation for the resource | | ||
| | `Extension.CreateOrReplaceAsync` | Asynchronous PUT operation | |
|
|
||
| | Scope | Description | | ||
| | --------------------------- | ------------------------------------- | | ||
| | `Extension.ScopeParameter` | Any scope (uses a generic scope path) | |
There was a problem hiding this comment.
| | `Extension.ScopeParameter` | Any scope (uses a generic scope path) | | |
| | `Extension.ScopeParameter` | Any scope (uses a generic scope uri path) | |
|
@copilot please apply the changes in the comments from my review |
Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
All five review changes were already applied in 5f514a1:
|
website/src/content/docs/docs/howtos/ARM/resource-type.mdto:ExtensionResourcemodel definition withResourceNameParameterExtensionnamespace operation templates (Read, CreateOrReplaceAsync, CustomPatchSync, DeleteWithoutOkAsync, ListByTarget, ActionSync, etc.)ResourceNameParameterby what it does rather than which decorators it includesCreateOrReplaceAsyncas the recommended PUT operation💡 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.