Skip to content

Commit f5d7893

Browse files
(DOCS) Add pass-through and json-array output formats to dsc resource get
1 parent f2aa30a commit f5d7893

File tree

1 file changed

+8
-2
lines changed
  • docs/reference/cli/resource

1 file changed

+8
-2
lines changed

docs/reference/cli/resource/get.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,11 @@ available formats are:
237237
- `pretty-json` to emit the data as JSON with newlines, indentation, and spaces for readability.
238238
- `yaml` to emit the data as YAML. When you use the `--all` option, each instance is returned as a
239239
YAML document with the `---` document separator between each returned instance.
240+
- `json-array` to emit the data as a single milti-line JSON array containing each object. This
241+
option is only valid with the [--all option](#--all).
242+
- `pass-through` to return the data from the resource directly without wrapping it in a DSC result.
243+
When you use this output option, the emitted JSON Line adheres to the resource's instance schema,
244+
not the DSC get result schema.
240245

241246
The default output format depends on whether DSC detects that the output is being redirected or
242247
captured as a variable:
@@ -256,7 +261,7 @@ for formatting.
256261
```yaml
257262
Type : string
258263
Mandatory : false
259-
ValidValues : [json, pretty-json, yaml]
264+
ValidValues : [json, pretty-json, yaml, json-array, pass-through]
260265
LongSyntax : --output-format <OUTPUT_FORMAT>
261266
ShortSyntax : -o <OUTPUT_FORMAT>
262267
```
@@ -280,7 +285,8 @@ ShortSyntax : -h
280285

281286
By default, this command returns a formatted data object that includes the actual state of the
282287
instance. When the `--all` option is specified, the command returns the formatted data for each
283-
instance.
288+
instance. When you specify the `pass-through` output format option, the emitted data is the
289+
unmodified output from the resource, not a DSC resource get result.
284290

285291
For more information about the structure of the output JSON, see
286292
[dsc resource get result schema][04].

0 commit comments

Comments
 (0)