Skip to content

Commit 5682a6f

Browse files
authored
docs: Update output schemas, schema URIs, and dsc function CLI reference (#1709)
1 parent f2e2ce1 commit 5682a6f

12 files changed

Lines changed: 1876 additions & 527 deletions

File tree

‎docs/reference/cli/function/list.md‎

Lines changed: 103 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Command line reference for the 'dsc function list' command
3-
ms.date: 07/20/2025
3+
ms.date: 09/01/2026
44
ms.topic: reference
55
title: dsc function list
66
---
@@ -49,16 +49,16 @@ dsc function list
4949
```
5050

5151
```output
52-
Category Function MinArgs MaxArgs ReturnTypes Description
53-
---------------------------------------------------------------------------------------------------
54-
Array array 1 1 a----- Convert the value to a…
55-
Array createArray 0 maxInt a----- Creates an array from …
56-
Array range 2 2 a----- Creates an array of in…
57-
Array tryIndexFromEnd 2 2 ab-nso Retrieves a value from
58-
Array, Lambda filter 2 2 a----- Filters an array with …
59-
Array, Lambda map 2 2 a----- Transforms an array by
60-
Array, Object intersection 2 maxInt a----o Returns a single array
61-
Array, Object tryGet 2 2 ab-nso Attempts to retrieve a
52+
Category Function Syntax Description
53+
-----------------------------------------------------------------------------------------
54+
Array array array( <string | number | object … Convert the value to…
55+
Array createArray createArray( [value], ... ) Creates an array fro…
56+
Array range range( <startIndex>, <count> ) Creates an array of …
57+
Array tryIndexFromEnd tryIndexFromEnd( <array>, <index> ) Retrieves a value fr…
58+
Array, Lambda filter filter( <array>, <lambda> ) Filters an array wit…
59+
Array, Lambda map map( <array>, <lambda> ) Transforms an array …
60+
Array, Object intersection intersection( <array | object>, <… Returns a single arr…
61+
Array, Object tryGet tryGet( <array | object>, <key | … Attempts to retrieve…
6262
// truncated
6363
```
6464

@@ -73,9 +73,9 @@ dsc function list resource*
7373
```
7474

7575
```output
76-
Category Name MinArgs MaxArgs ArgTypes Description
77-
-------- ---- ------- ------- -------- -----------
78-
Resource resourceId 2 2 ---s- Constructs a resource ID from the given type and name
76+
Category Function Syntax Description
77+
----------------------------------------------------------------------------------------
78+
Resource resourceId resourceId( <type>, <name> ) Constructs a resource ID from the gi…
7979
```
8080

8181
### Example 3 - Get details for a specific function
@@ -90,23 +90,63 @@ dsc function list concat --output-format yaml
9090

9191
```yaml
9292
category:
93-
- Array
94-
- String
93+
- array
94+
- string
9595
name: concat
9696
description: Concatenates two or more strings or arrays
97+
syntax: concat( <string | array>, <string | array>, ... )
98+
constraints: All arguments must be of the same type (all strings or all arrays)
9799
minArgs: 2
98100
maxArgs: 18446744073709551615
99101
acceptedArgOrderedTypes:
100-
- - String
101-
- Array
102-
- - String
103-
- Array
102+
- - string
103+
- array
104+
- - string
105+
- array
104106
remainingArgAcceptedTypes:
105-
- String
106-
- Array
107+
- string
108+
- array
107109
returnTypes:
108-
- String
109-
- Array
110+
- string
111+
- array
112+
```
113+
114+
### Example 4 - Filter functions by category
115+
116+
<a id="example-4"></a>
117+
118+
This command uses the `--category` option to list only the functions in the `lambda` category.
119+
120+
```sh
121+
dsc function list --category lambda
122+
```
123+
124+
```output
125+
Category Function Syntax Description
126+
----------------------------------------------------------------------------------------
127+
Array, Lambda filter filter( <array>, <lambda> ) Filters an ar…
128+
Array, Lambda map map( <array>, <lambda> ) Transforms an…
129+
Lambda lambda lambda( <param1>, [param2], ..., <body> ) Creates a lam…
130+
Lambda lambdaVariables lambdaVariables( <name> ) Retrieves the…
131+
```
132+
133+
### Example 5 - Filter functions by description
134+
135+
<a id="example-5"></a>
136+
137+
This command uses the `--description` option to list only the functions whose description
138+
matches a wildcard pattern.
139+
140+
```sh
141+
dsc function list --description *CIDR*
142+
```
143+
144+
```output
145+
Category Function Syntax Description
146+
-----------------------------------------------------------------------------------------
147+
CIDR cidrHost cidrHost( <cidr>, <hostIndex> ) Calculates the usab…
148+
CIDR cidrSubnet cidrSubnet( <cidr>, <newCidr>, <subnetIndex> ) Splits the specifie…
149+
CIDR parseCidr parseCidr( <cidr> ) Parses an IP addres…
110150
```
111151

112152
## Parameters
@@ -125,6 +165,39 @@ Position: 0
125165

126166
## Options
127167

168+
### -c, --category
169+
170+
<a id="-c"></a>
171+
<a id="--category"></a>
172+
173+
The `--category` option filters the results by function category. You can specify the option more
174+
than once to filter for multiple categories. When you specify more than one category, DSC returns
175+
only the functions that belong to every specified category.
176+
177+
```yaml
178+
Type: string
179+
Mandatory: false
180+
ValidValues: [array, cidr, comparison, date, deployment, lambda, logical,
181+
numeric, object, resource, string, system]
182+
LongSyntax: --category <CATEGORY>
183+
ShortSyntax: -c <CATEGORY>
184+
```
185+
186+
### -d, --description
187+
188+
<a id="-d"></a>
189+
<a id="--description"></a>
190+
191+
The `--description` option filters the results by function description. You can use wildcard
192+
patterns in the value. DSC returns only the functions whose description matches the pattern.
193+
194+
```yaml
195+
Type: string
196+
Mandatory: false
197+
LongSyntax: --description <PATTERN>
198+
ShortSyntax: -d <PATTERN>
199+
```
200+
128201
### -o, --output-format
129202

130203
<a id="-o"></a>
@@ -183,29 +256,18 @@ ShortSyntax : -h
183256

184257
## Output
185258

186-
This command returns a formatted array containing an object for each function that includes the
187-
function's type, version, manifest settings, and other metadata. For more information, see
188-
[dsc function list result schema reference][03].
259+
This command returns an object for each function that includes the function's name, categories,
260+
syntax, argument metadata, and return types. For more information, see
261+
[dsc function list result schema reference][03]. For more information about the [data types][04]
262+
used in the argument and return type metadata, see the linked schema reference.
189263

190264
If the output of the command isn't captured or redirected, it displays in the console by default as
191265
a summary table for the returned functions. The summary table includes the following columns,
192266
displayed in the listed order:
193267

194-
- **Category** - The category the function belongs to.
268+
- **Category** - The categories the function belongs to.
195269
- **Function** - The name of the function.
196-
- **MinArgs** - The minimum number of arguments the function accepts.
197-
- **MaxArgs** - The maximum number of arguments the function accepts.
198-
- **ReturnTypes** - The [data types][04] the function emits as flags. The valid return types are
199-
displayed in the following order, using a `-` instead of the appropriate letter if the function
200-
doesn't return that data type:
201-
202-
- `a` indicates that the function returns an array value.
203-
- `b` indicates that the function returns a boolean value.
204-
- `l` indicates that the function returns a lambda value.
205-
- `n` indicates that the function returns a number value.
206-
- `s` indicates that the function returns a string value.
207-
- `o` indicates that the function returns an object value.
208-
270+
- **Syntax** - The syntax for calling the function, showing its expected arguments.
209271
- **Description** - A synopsis of what the function does.
210272

211273
For more information about the formatting of the output data, see the

‎docs/reference/schemas/outputs/config/get.md‎

Lines changed: 88 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: JSON schema reference for the data returned by the 'dsc config get' command.
3-
ms.date: 07/03/2025
3+
ms.date: 09/01/2026
44
ms.topic: reference
55
title: dsc config get result schema reference
66
---
@@ -28,34 +28,24 @@ in the configuration document.
2828

2929
The output always includes these properties:
3030

31-
- [metadata](#metadata-1)
3231
- [results](#results)
3332
- [messages](#messages)
3433
- [hadErrors](#haderrors)
3534

3635
## Properties
3736

38-
### metadata
37+
### executionInformation
3938

40-
Defines metadata DSC returns for a configuration operation. The properties under the
41-
`Microsoft.DSC` property describe the context of the operation.
42-
43-
```yaml
44-
Type: object
45-
Required: true
46-
```
47-
48-
#### Microsoft.DSC
49-
50-
The metadata under this property describes the context of the overall operation:
39+
Describes the context of the overall operation. DSC adds this property to the output of every
40+
configuration operation. The value is an object with the following properties:
5141

5242
- [version][01] defines the version of DSC that ran the command. This value is always the semantic
5343
version of the DSC command, like `3.0.0-preview.7`.
54-
- [operation][02] defines the operation that DSC applied to the configuration document: `Get`,
55-
`Set`, `Test`, or `Export`.
44+
- [operation][02] defines the operation that DSC applied to the configuration document: `get`,
45+
`set`, `test`, or `export`.
5646
- [executionType][03] defines whether DSC actually applied an operation to the configuration or was
57-
run in `WhatIf` mode. This property is always `Actual` for `Get`, `Test`, and `Export`
58-
operations. For `Set` operations, this value is `WhatIf` when DSC is invoked with the `--what-if`
47+
run in what-if mode. This property is always `actual` for `get`, `test`, and `export`
48+
operations. For `set` operations, this value is `whatIf` when DSC is invoked with the `--what-if`
5949
argument.
6050
- [startDatetime][04] defines the start date and time for the DSC operation as a timestamp
6151
following the format defined in [RFC3339, section 5.6 (see `date-time`)][05], like
@@ -67,32 +57,87 @@ The metadata under this property describes the context of the overall operation:
6757
resource instance as a string following the format defined in [ISO8601 ABNF for `duration`][08].
6858
For example, `PT0.611216S` represents a duration of about `0.61` seconds.
6959
- [securityContext][09] defines the security context that DSC was run under. If the value for this
70-
metadata property is `Elevated`, DSC was run as `root` (non-Windows) or an elevated session with
71-
Administrator privileges (on Windows). If the value is `Restricted`, DSC was run as a normal user
60+
metadata property is `elevated`, DSC was run as `root` (non-Windows) or an elevated session with
61+
Administrator privileges (on Windows). If the value is `restricted`, DSC was run as a normal user
7262
or account in a non-elevated session.
63+
- [restartRequired][10] defines the list of restarts that resource instances reported as required
64+
during the operation. DSC only includes this property when at least one instance reported a
65+
required restart.
66+
67+
```yaml
68+
Type: object
69+
Required: false
70+
```
71+
72+
### metadata
73+
74+
Defines metadata DSC returns for a configuration operation. The properties under the
75+
`Microsoft.DSC` property describe the context of the operation. DSC includes this property for
76+
backwards compatibility with tools and scripts that process DSC output. In DSC version 4.0.0, the
77+
output will no longer include this property. Prefer [executionInformation](#executioninformation)
78+
instead.
79+
80+
```yaml
81+
Type: object
82+
Required: false
83+
```
84+
85+
#### Microsoft.DSC
86+
87+
The metadata under this property describes the context of the overall operation. It includes the
88+
same properties as [executionInformation](#executioninformation). For more information, see
89+
[Microsoft.DSC metadata property schema reference][11].
7390

7491
### results
7592

7693
Defines the list of results for the `get` operation invoked against every instance in the
7794
configuration document. Every entry in the list includes the resource's type name, instance name,
78-
and the result data for an instance.
95+
and the result data for an instance. DSC doesn't include an entry for an instance it skipped
96+
because the instance's `condition` didn't evaluate to `true`.
7997

8098
```yaml
8199
Type: array
82100
Required: true
83101
ItemsType: object
84102
```
85103

104+
#### executionInformation
105+
106+
An item's `executionInformation` property describes the context of the operation for the instance.
107+
The value is an object with the following properties:
108+
109+
- [duration][07] defines the duration of the DSC operation against the resource instance as a
110+
string following the format defined in [ISO8601 ABNF for `duration`][08].
111+
- [restartRequired][10] defines the list of restarts the resource reported as required. DSC only
112+
includes this property when the resource reported a required restart.
113+
114+
```yaml
115+
Type: object
116+
Required: false
117+
```
118+
119+
#### metadata
120+
121+
An item's `metadata` property defines the metadata DSC returns for the resource instance operation.
122+
The `Microsoft.DSC` property under this property includes the [duration][07] of the operation. DSC
123+
includes this property for backwards compatibility. In DSC version 4.0.0, the output will no longer
124+
include this property.
125+
126+
```yaml
127+
Type: object
128+
Required: false
129+
```
130+
86131
#### type
87132

88133
An item's `type` property identifies the instance's DSC Resource by its fully qualified type name.
89134
For more information about type names, see
90-
[DSC Resource fully qualified type name schema reference][10].
135+
[DSC Resource fully qualified type name schema reference][12].
91136

92137
```yaml
93138
Type: string
94139
Required: true
95-
Pattern: ^\w+(\.\w+){0,2}\/\w+$
140+
Pattern: ^\w+(\.\w+)*\/\w+$
96141
```
97142

98143
#### name
@@ -108,12 +153,12 @@ Required: true
108153

109154
An item's `result` property includes the actual state for the resource instance. The value for this
110155
property adheres to the same schema as the output for the `dsc resource get` command. For more
111-
information, see [dsc resource get result schema reference][11].
156+
information, see [dsc resource get result schema reference][13].
112157

113158
### messages
114159

115160
Defines the list of structured messages emitted by resources during the get operation. For more
116-
information, see [Structured message schema reference][12].
161+
information, see [Structured message schema reference][14].
117162

118163
```yaml
119164
Type: array
@@ -130,6 +175,18 @@ Type: boolean
130175
Required: true
131176
```
132177

178+
### outputs
179+
180+
Defines the values for the outputs that the configuration document defines. Each key is the name of
181+
an output and the value is the evaluated value for that output. DSC only includes this property
182+
when the document defines at least one output that DSC evaluated. For more information about
183+
defining outputs, see the [outputs][15] property in the configuration document schema.
184+
185+
```yaml
186+
Type: object
187+
Required: false
188+
```
189+
133190
<!-- Link reference definitions -->
134191
[01]: ../../metadata/Microsoft.DSC/properties.md#version
135192
[02]: ../../metadata/Microsoft.DSC/properties.md#operation
@@ -140,6 +197,9 @@ Required: true
140197
[07]: ../../metadata/Microsoft.DSC/properties.md#duration
141198
[08]: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A
142199
[09]: ../../metadata/Microsoft.DSC/properties.md#securitycontext
143-
[10]: ../../definitions/resourceType.md
144-
[11]: ../resource/get.md
145-
[12]: ../../definitions/message.md
200+
[10]: ../../metadata/Microsoft.DSC/properties.md#restartrequired
201+
[11]: ../../metadata/Microsoft.DSC/properties.md
202+
[12]: ../../definitions/resourceType.md
203+
[13]: ../resource/get.md
204+
[14]: ../../definitions/message.md
205+
[15]: ../../config/document.md#outputs

0 commit comments

Comments
 (0)