Skip to content

Commit d70b0de

Browse files
committed
docs: Sync fixes from Microsoft Learn on schema reference
1 parent 45b1007 commit d70b0de

110 files changed

Lines changed: 7064 additions & 1698 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

0 commit comments

Comments
 (0)