@@ -79,70 +79,22 @@ Pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z
79
79
80
80
# ## capabilities
81
81
82
- Defines the operations and behaviors the resource is implemented to support. This property is an
83
- array of capabilities. Resources always have the `Get` capability, but the other capabilities are
84
- optional and depend on the resource.
85
-
86
- The following list describes the available capabilities for a resource :
87
-
88
- - <a id="capability-get" ></a> `get` - The resource supports retrieving the current state of an
89
- instance. All DSC Resources must have this capability. A resource has this capability when it
90
- defines the mandatory [get][07] property in its resource manifest.
91
- - <a id="capability-set" ></a> `set` - The resource supports enforcing the desired state of an
92
- instance. A resource has this capability when it defines the [set][08] property in its resource
93
- manifest. Resources without this capability can't be used with the [dsc resource set][09] or
94
- [dsc config set][10] commands unless they're in a Microsoft.DSC/Assertion group as a nested
95
- instance.
96
- - <a id="capability-sethandlesexist" ></a> `setHandlesExist` - The resource supports the
97
- [_exist property][11] directly. A resource has this capability when it defines the
98
- [handlesExist][12] property as `true` in the definition of the [set][08] command property in its
99
- resource manifest.
100
-
101
- When a resource has this capability, the `_exist` property is part of the resource's instance
102
- schema and the resource handles deleting instances of the resource in its `set` command.
103
-
104
- When a resource doesn't have this capability, when DSC finds an instance of the resource with
105
- ` _exist` set to `false`, it handles calling the [delete][13] operation for the resource.
106
-
107
- If the resource doesn't have this capability or the `delete` capability, DSC raises an error when
108
- an instance defines `_exist` as `false`.
109
- - <a id="capability-whatif" ></a> `whatIf` - The resource supports returning explicit information
110
- about how it will modify state when a user calls [dsc config set][10] with the [--what-if][14]
111
- option. A resource has this capability when it defines the [What-if operation][15] in its
112
- resource manifest.
113
-
114
- When a resource has this capability, DSC calls the defined command with its arguments when a
115
- user executes the `dsc config set` command with the `--what-if` option.
116
-
117
- When a resource doesn't have this capability, DSC synthesizes how the resource will change and
118
- instance by converting the `Test` result for the instance into a `Set` result. The synthetic
119
- operation can't indicate potential issues or changes that can't be determined by comparing the
120
- result of the `Test` operation against the resource's desired state. For example, the credentials
121
- used to test a resource might be valid for that operation, but not have permissions to actually
122
- modify the system state. Only a resource with this capability can fully report whether and how
123
- the resource will change system state.
124
- - <a id="capability-test" ></a> `test` - The resource supports validating the desired state of an
125
- instance against the current state of the instance. A resource has this capability when it
126
- defines the [test][16] property in its resource manifest.
127
-
128
- If a resource doesn't have the `test` capability, DSC uses a synthetic test for instances of the
129
- resource. The synthetic test compares each property for the desired state of an instance against
130
- the actual state. The synthetic test uses strict, case-sensitive equivalence. If the desired
131
- state for a property and the actual state aren't the same, DSC marks the property as out of the
132
- desired state.
133
- - <a id="capability-delete" ></a> `delete` - The resource supports removing an instance. A resource
134
- has this capability when it defines the [delete][13] property in its resource manifest. This
135
- capability isn't mutually exclusive with the `setHandlesExist` property. A resource can handle
136
- the `_exist` property in set operations and be called directly with [dsc resource delete][17] to
137
- remove an instance.
138
- - <a id="capability-export" ></a> `export` - The resource supports enumerating every instance of
139
- the resource. A resource has this capability when it defines the [export][18] property in its
140
- resource manifest. Only resources with this capability are usable with the
141
- [dsc resource export][19] and [dsc config export][20] commands.
142
- - <a id="capability-resolve" ></a> `resolve` - The resource supports resolving nested resource
143
- instances from an external source. A resource has this capability when it defines the
144
- [resolve][21] property in its resource manifest. This functionality is primarily used by
145
- [importer resources][22].
82
+ DSC resources always have at least one capability. Resource capabilities define the operations you
83
+ can invoke for a resource and how the resource behaves when invoked.
84
+
85
+ DSC resources may have the following capabilities :
86
+
87
+ - ` get` - The resource can retrieve the current state of an instance.
88
+ - ` set` - The resource can enforce the desired state for an instance.
89
+ - ` setHandlesExist` - The resource handles deleting an instance during a **Set** operation.
90
+ - ` whatIf` - The resource can report how it would change state for an instance during a **Set** operation.
91
+ - ` test` - The resource implements the **Test** operation and doesn't rely on synthetic testing.
92
+ - ` delete` - The resource can remove an instance.
93
+ - ` export` - The resource can enumerate every instance.
94
+ - ` resolve` - The resource can resolve nested instances from an external source.
95
+
96
+ For more information about resource capabilities, see [DSC resource capabilities][07]. For more
97
+ information about the operations you can invoke for a resource, see [DSC resource operations][08].
146
98
147
99
` ` ` yaml
148
100
Type: array
@@ -239,7 +191,7 @@ Required: true
239
191
240
192
Represents the values defined in the resource's manifest. This value is `null` for resources that
241
193
aren't command-based. For more information on the value for this property, see
242
- [Command-based DSC Resource manifest schema reference][23 ].
194
+ [Command-based DSC Resource manifest schema reference][09 ].
243
195
244
196
` ` ` yaml
245
197
Type: [object, 'null']
@@ -253,20 +205,6 @@ Required: true
253
205
[04] : ../../definitions/resourceKind.md#group-resources
254
206
[05] : ../../resource/manifest/root.md#kind
255
207
[06] : ../../definitions/resourceKind.md
256
- [07] : ../../resource/manifest/get.md
257
- [08] : ../../resource/manifest/set.md
258
- [09] : ../../../cli/resource/set.md
259
- [10] : ../../../cli/config/set.md
260
- [11] : ../../resource/properties/exist.md
261
- [12] : ../../resource/manifest/set.md#handlesexist
262
- [13] : ../../resource/manifest/delete.md
263
- [14] : ../../../cli/config/set.md#-w---what-if
264
- [15] : ../../resource/manifest/whatif.md
265
- [16] : ../../resource/manifest/test.md
266
- [17] : ../../../cli/resource/delete.md
267
- [18] : ../../resource/manifest/export.md
268
- [19] : ../../../cli/resource/export.md
269
- [20] : ../../../cli/config/export.md
270
- [21] : ../../resource/manifest/resolve.md
271
- [22] : ../../definitions/resourceKind.md#importer-resources
272
- [23] : ../../resource/manifest/root.md
208
+ [07] : ../../../../concepts/resources/capabilities.md
209
+ [08] : ../../../../concepts/resources/operations.md
210
+ [09] : ../../resource/manifest/root.md
0 commit comments