@@ -11,20 +11,73 @@ markdownDescription: | # VS Code only
11
11
[_Online Documentation_][00]
12
12
***
13
13
14
- Represents the actual state of a resource instance in DSC. DSC expects every JSON Line emitted to
15
- stdout for the **Export** operation to adhere to this schema.
14
+ DSC expects a resource implementing the **Export** operation to return a series of JSON Lines.
16
15
17
- The output must be a JSON object. The object must be a valid representation of an instance of the
18
- resource.
16
+ The data that DSC expects depends on whether the resource kind is defined as `exporter`:
19
17
20
- Command resources define their instance schema with the [schema.command][01] or
21
- [schema.embedded][02] fields in their resource manifest. If a command resource returns JSON that
22
- is invalid against the resource instance schema, DSC raises an error.
23
-
24
- Adapted resource instances are validated by their adapter when the adapter invokes them.
18
+ - When the resource kind is `exporter`, DSC expects the resource to return JSON Lines
19
+ representing DSC resource instance definitions to recursively export.
20
+ - When the resource kind isn't `exporter`, DSC expects the resource to return JSON Lines
21
+ representing the actual state of every instance of the resource on the system.
25
22
26
23
[00]: <DOCS_BASE_URL>/reference/schemas/resource/stdout/export?<DOCS_VERSION_PIN>
27
24
[01]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/schema/command?<DOCS_VERSION_PIN>
28
25
[02]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/schema/embedded?<DOCS_VERSION_PIN>
29
26
30
- type : object
27
+ anyOf :
28
+ - title : Typical resource expected output
29
+ description : >-
30
+ Defines the expected output for a resource whose `kind` isn't `exporter` as the actual state
31
+ of every existing instance of that resource on the system.
32
+ type : object
33
+ markdownDescription : | # VS Code only
34
+ ***
35
+ [_Online Documentation_][00]
36
+ ***
37
+
38
+ DSC expects a typical resource implementing the **Export** operation to return a series of
39
+ JSON Lines.
40
+
41
+ Each JSON Line represents the actual state of a resource instance in DSC. DSC expects every
42
+ JSON Line emitted to stdout for the **Export** operation to adhere to this schema.
43
+
44
+ The output must be a JSON object. The object must be a valid representation of an instance of
45
+ the resource.
46
+
47
+ Command resources define their instance schema with the [schema.command][01] or
48
+ [schema.embedded][02] fields in their resource manifest. If a command resource returns JSON that
49
+ is invalid against the resource instance schema, DSC raises an error.
50
+
51
+ Adapted resource instances are validated by their adapter when the adapter invokes them.
52
+
53
+ [00]: <DOCS_BASE_URL>/reference/schemas/resource/stdout/export?<DOCS_VERSION_PIN>#typical-resource-expected-output
54
+ [01]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/schema/command?<DOCS_VERSION_PIN>
55
+ [02]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/schema/embedded?<DOCS_VERSION_PIN>
56
+ - title : Exporter resource expected output
57
+ description : >-
58
+ Defines the expected output for an `exporter` resource as a resource instance definition to
59
+ recursively invoke the **Export** operation for.
60
+ $ref : /<PREFIX>/<VERSION>/config/document.resource.yaml
61
+ markdownDescription : | # VS Code only
62
+ ***
63
+ [_Online Documentation_][00]
64
+ ***
65
+
66
+ DSC expects an exporter resource (one with the `kind` field in its manifest set to
67
+ `exporter`) to return a series of JSON Lines.
68
+
69
+ Each JSON Line represents a DSC resource instance definition to recursively invoke the
70
+ **Export** operation for. DSC expects every JSON Line emitted to stdout for the **Export**
71
+ operation to adhere to this schema.
72
+
73
+ The output must be a JSON object adhering to [DSC resource instance][01] schema, rather than
74
+ the instance schema for a specific resource. DSC expects the object to define at least the
75
+ [name][02] and [type][03] fields. If the object defines the [properties][04] field, DSC
76
+ passes those properties to the resource when recursively exporting it so that the resource
77
+ may filter the exported instance results.
78
+
79
+ [00]: <DOCS_BASE_URL>/reference/schemas/resource/stdout/export?<DOCS_VERSION_PIN>#typical-resource-expected-output
80
+ [01]: <DOCS_BASE_URL>/reference/schemas/config/resource?<DOCS_VERSION_PIN>
81
+ [02]: <DOCS_BASE_URL>/reference/schemas/config/resource?<DOCS_VERSION_PIN>#name
82
+ [02]: <DOCS_BASE_URL>/reference/schemas/config/resource?<DOCS_VERSION_PIN>#type
83
+ [02]: <DOCS_BASE_URL>/reference/schemas/config/resource?<DOCS_VERSION_PIN>#properties-1
0 commit comments