@@ -76,7 +76,7 @@ resource. DSC performs the synthetic test by:
76
76
1 . Invoking the ** Get** operation on the resource to retrieve the actual state of the instance.
77
77
1 . Synthetically testing each property for the desired state of an instance against the actual
78
78
state returned. The synthetic test:
79
-
79
+
80
80
- Uses strict, case-sensitive equivalence for strings.
81
81
- Uses simple equivalence for numerical, boolean, and null values.
82
82
- For arrays, item order doesn't matter. Arrays are considered equivalent if both the desired
@@ -134,32 +134,59 @@ manifest.
134
134
A resource with the ` export ` capability supports enumerating every instance of the resource with
135
135
the ** Export** operation.
136
136
137
- You can use resources with this capability with the following commands:
137
+ You can use resources with the ` export ` capability with the following commands:
138
138
139
- - [ dsc config export] [ 15 ] to return a configuration document
140
- representing the actual state for every instance of each resource defined in the input document.
141
- - [ dsc resource export] [ 16 ] to return a configuration document
142
- representing the actual state for every instance of the input resource.
143
- - ` dsc resource get ` with the [ --all] [ 17 ] option to return
144
- the actual state of every instance of the input resource.
139
+ - [ dsc config export] [ 15 ] to return a configuration document representing the actual state for
140
+ every instance of each resource defined in the input document.
141
+ - [ dsc resource export] [ 16 ] to return a configuration document representing the actual state for
142
+ every instance of the input resource.
143
+ - ` dsc resource get ` with the [ --all] [ 17 ] option to return the actual state of every instance of
144
+ the input resource.
145
145
146
146
A command resource has this capability when it defines the [ export] [ 18 ] property in its resource
147
147
manifest.
148
148
149
+ ### Synthetic export
150
+
151
+ When a resource doesn't have the ` export ` capability, DSC uses a synthetic export for instances of
152
+ the resource. DSC performs the synthetic export by:
153
+
154
+ 1 . Invoking the ** Get** operation on the resource to retrieve the actual state of the instance.
155
+
156
+ Unlike non-synthetic export operations, users _ must_ provide a filter for the resource if the
157
+ resource instance JSON schema defines any [ required properties] [ 19 ] .
158
+ 1 . Exporting an instance of the resource with:
159
+
160
+ - The ` properties ` field populated by the actual state returned by the ** Get** operation.
161
+ - The ` name ` field populated by a string with the format ` <short-type-name>-0 ` . The
162
+ ` <short-type-name> ` is the last segment of the resource type name, like ` Registry ` for
163
+ ` Microsoft.Windows/Registry ` .
164
+
165
+ Synthetic export only ever returns a single instance and always requires a filtering instance. You
166
+ can use resources that rely on synthetic exporting with the following commands:
167
+
168
+ - [ dsc config export] [ 15 ] to return a configuration document representing the actual state for
169
+ every instance of each resource defined in the input document. For resources that rely on
170
+ synthetic export, you _ must_ define a filtering instance in the input document. The resource
171
+ can only export a single instance per filtering instance.
172
+ - [ dsc resource export] [ 16 ] to return a configuration document representing the actual state for
173
+ the required filtering instance. If you invoke this command without providing a filtering
174
+ instance, the operation fails.
175
+
149
176
## resolve
150
177
151
178
A resource with the ` resolve ` capability supports resolving nested resource instances from an
152
- external source. This capability is primarily used by [ importer resources] [ 19 ] to enable users to
179
+ external source. This capability is primarily used by [ importer resources] [ 20 ] to enable users to
153
180
compose configuration documents.
154
181
155
- A command resource has this capability when it defines the [ resolve] [ 20 ] property in its resource
182
+ A command resource has this capability when it defines the [ resolve] [ 21 ] property in its resource
156
183
manifest.
157
184
158
185
## See also
159
186
160
- - [ DSC resource operations] [ 21 ]
161
- - [ DSC resource kinds] [ 22 ]
162
- - [ DSC resource properties] [ 23 ]
187
+ - [ DSC resource operations] [ 22 ]
188
+ - [ DSC resource kinds] [ 23 ]
189
+ - [ DSC resource properties] [ 24 ]
163
190
164
191
<!-- Link reference definitions -->
165
192
[ 01 ] : operations.md#get-operation
@@ -180,8 +207,9 @@ manifest.
180
207
[ 16 ] : ../../reference/cli/resource/export.md
181
208
[ 17 ] : ../../reference/cli/resource/get.md#--all
182
209
[ 18 ] : ../../reference/schemas/resource/manifest/export.md
183
- [ 19 ] : ../resources/kinds.md#importer-resources
184
- [ 20 ] : ../../reference/schemas/resource/manifest/resolve.md
185
- [ 21 ] : operations.md
186
- [ 22 ] : kinds.md
187
- [ 23 ] : ../../concepts/resources/properties.md
210
+ [ 19 ] : ./properties.md#required-resource-properties
211
+ [ 20 ] : ../resources/kinds.md#importer-resources
212
+ [ 21 ] : ../../reference/schemas/resource/manifest/resolve.md
213
+ [ 22 ] : operations.md
214
+ [ 23 ] : kinds.md
215
+ [ 24 ] : ../../concepts/resources/properties.md
0 commit comments