Skip to content

Commit a321e86

Browse files
(DOCS) Add resource capabilities reference doc
Prior to this change, the resource capabilities documentation was only defined in the output for the `dsc resource list` command reference. This change extracts the useful information into a separate document, reflecting also the shared definition schema added in the last release. This supports referencing the schema from other schemas. A future change will address updating those reference documents as needed.
1 parent 2b3ce80 commit a321e86

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
description: JSON schema reference for resource capabilities
3+
ms.date: 07/03/2025
4+
ms.topic: reference
5+
title: DSC Resource capabilities schema reference
6+
---
7+
8+
# DSC Resource capabilities schema reference
9+
10+
## Synopsis
11+
12+
Defines the operations you can invoke for a resource and how the resource behaves when invoked.
13+
14+
## Metadata
15+
16+
```yaml
17+
SchemaDialect: https://json-schema.org/draft/2020-12/schema
18+
SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/definitions/resourceKind.json
19+
Type: array
20+
Required: true
21+
ItemsMustBeUnique: true
22+
ItemsType: string
23+
ItemsValidValues: [
24+
get,
25+
set,
26+
setHandlesExist,
27+
whatIf,
28+
test,
29+
delete,
30+
export,
31+
resolve
32+
]
33+
```
34+
35+
## Description
36+
37+
DSC resources always have at least one capability. Resource capabilities define the operations you
38+
can invoke for a resource and how the resource behaves when invoked.
39+
40+
DSC resources may have the following capabilities:
41+
42+
- `get` - The resource can retrieve the current state of an instance.
43+
- `set` - The resource can enforce the desired state for an instance.
44+
- `setHandlesExist` - The resource handles deleting an instance during a **Set** operation.
45+
- `whatIf` - The resource can report how it would change state for an instance during a **Set** operation.
46+
- `test` - The resource implements the **Test** operation and doesn't rely on synthetic testing.
47+
- `delete` - The resource can remove an instance.
48+
- `export` - The resource can enumerate every instance.
49+
- `resolve` - The resource can resolve nested instances from an external source.
50+
51+
For more information about resource capabilities, see [DSC resource capabilities][01]. For more
52+
information about the operations you can invoke for a resource, see [DSC resource operations][02].
53+
54+
[01]: ../../../concepts/resources/capabilities.md
55+
[02]: ../../../concepts/resources/operations.md

0 commit comments

Comments
 (0)