|
2 | 2 | title: Template functions - arrays
|
3 | 3 | description: Describes the functions to use in an Azure Resource Manager template (ARM template) for working with arrays.
|
4 | 4 | ms.topic: conceptual
|
5 |
| -ms.date: 02/11/2022 |
| 5 | +ms.date: 03/10/2022 |
6 | 6 | ---
|
7 | 7 |
|
8 | 8 | # Array functions for ARM templates
|
@@ -36,6 +36,8 @@ To get an array of string values delimited by a value, see [split](template-func
|
36 | 36 |
|
37 | 37 | Converts the value to an array.
|
38 | 38 |
|
| 39 | +In Bicep, use the [array](../bicep/bicep-functions-array.md#array) function. |
| 40 | + |
39 | 41 | ### Parameters
|
40 | 42 |
|
41 | 43 | | Parameter | Required | Type | Description |
|
@@ -66,6 +68,8 @@ The output from the preceding example with the default values is:
|
66 | 68 |
|
67 | 69 | Combines multiple arrays and returns the concatenated array, or combines multiple string values and returns the concatenated string.
|
68 | 70 |
|
| 71 | +In Bicep, use the [concat](../bicep/bicep-functions-array.md#concat) function. |
| 72 | + |
69 | 73 | ### Parameters
|
70 | 74 |
|
71 | 75 | | Parameter | Required | Type | Description |
|
@@ -107,6 +111,8 @@ The output from the preceding example with the default values is:
|
107 | 111 |
|
108 | 112 | Checks whether an array contains a value, an object contains a key, or a string contains a substring. The string comparison is case-sensitive. However, when testing if an object contains a key, the comparison is case-insensitive.
|
109 | 113 |
|
| 114 | +In Bicep, use the [contains](../bicep/bicep-functions-array.md#contains) function. |
| 115 | + |
110 | 116 | ### Parameters
|
111 | 117 |
|
112 | 118 | | Parameter | Required | Type | Description |
|
@@ -137,10 +143,12 @@ The output from the preceding example with the default values is:
|
137 | 143 |
|
138 | 144 | ## createArray
|
139 | 145 |
|
140 |
| -`createArray (arg1, arg2, arg3, ...)` |
| 146 | +`createArray(arg1, arg2, arg3, ...)` |
141 | 147 |
|
142 | 148 | Creates an array from the parameters.
|
143 | 149 |
|
| 150 | +In Bicep, the `createArray` function isn't supported. To construct an array, see the Bicep [array](../bicep/data-types.md#arrays) data type. |
| 151 | + |
144 | 152 | ### Parameters
|
145 | 153 |
|
146 | 154 | | Parameter | Required | Type | Description |
|
@@ -173,6 +181,8 @@ The output from the preceding example with the default values is:
|
173 | 181 |
|
174 | 182 | Determines if an array, object, or string is empty.
|
175 | 183 |
|
| 184 | +In Bicep, use the [empty](../bicep/bicep-functions-array.md#empty) function. |
| 185 | + |
176 | 186 | ### Parameters
|
177 | 187 |
|
178 | 188 | | Parameter | Required | Type | Description |
|
@@ -203,6 +213,8 @@ The output from the preceding example with the default values is:
|
203 | 213 |
|
204 | 214 | Returns the first element of the array, or first character of the string.
|
205 | 215 |
|
| 216 | +In Bicep, use the [first](../bicep/bicep-functions-array.md#first) function. |
| 217 | + |
206 | 218 | ### Parameters
|
207 | 219 |
|
208 | 220 | | Parameter | Required | Type | Description |
|
@@ -232,6 +244,8 @@ The output from the preceding example with the default values is:
|
232 | 244 |
|
233 | 245 | Returns a single array or object with the common elements from the parameters.
|
234 | 246 |
|
| 247 | +In Bicep, use the [intersection](../bicep/bicep-functions-array.md#intersection) function. |
| 248 | + |
235 | 249 | ### Parameters
|
236 | 250 |
|
237 | 251 | | Parameter | Required | Type | Description |
|
@@ -259,10 +273,12 @@ The output from the preceding example with the default values is:
|
259 | 273 |
|
260 | 274 | ## last
|
261 | 275 |
|
262 |
| -`last (arg1)` |
| 276 | +`last(arg1)` |
263 | 277 |
|
264 | 278 | Returns the last element of the array, or last character of the string.
|
265 | 279 |
|
| 280 | +In Bicep, use the [last](../bicep/bicep-functions-array.md#last) function. |
| 281 | + |
266 | 282 | ### Parameters
|
267 | 283 |
|
268 | 284 | | Parameter | Required | Type | Description |
|
@@ -292,6 +308,8 @@ The output from the preceding example with the default values is:
|
292 | 308 |
|
293 | 309 | Returns the number of elements in an array, characters in a string, or root-level properties in an object.
|
294 | 310 |
|
| 311 | +In Bicep, use the [length](../bicep/bicep-functions-array.md#length) function. |
| 312 | + |
295 | 313 | ### Parameters
|
296 | 314 |
|
297 | 315 | | Parameter | Required | Type | Description |
|
@@ -333,6 +351,8 @@ For more information about using this function with an array, see [Resource iter
|
333 | 351 |
|
334 | 352 | Returns the maximum value from an array of integers or a comma-separated list of integers.
|
335 | 353 |
|
| 354 | +In Bicep, use the [max](../bicep/bicep-functions-array.md#max) function. |
| 355 | + |
336 | 356 | ### Parameters
|
337 | 357 |
|
338 | 358 | | Parameter | Required | Type | Description |
|
@@ -362,6 +382,8 @@ The output from the preceding example with the default values is:
|
362 | 382 |
|
363 | 383 | Returns the minimum value from an array of integers or a comma-separated list of integers.
|
364 | 384 |
|
| 385 | +In Bicep, use the [min](../bicep/bicep-functions-array.md#min) function. |
| 386 | + |
365 | 387 | ### Parameters
|
366 | 388 |
|
367 | 389 | | Parameter | Required | Type | Description |
|
@@ -391,6 +413,8 @@ The output from the preceding example with the default values is:
|
391 | 413 |
|
392 | 414 | Creates an array of integers from a starting integer and containing a number of items.
|
393 | 415 |
|
| 416 | +In Bicep, use the [range](../bicep/bicep-functions-array.md#range) function. |
| 417 | + |
394 | 418 | ### Parameters
|
395 | 419 |
|
396 | 420 | | Parameter | Required | Type | Description |
|
@@ -420,6 +444,8 @@ The output from the preceding example with the default values is:
|
420 | 444 |
|
421 | 445 | Returns an array with all the elements after the specified number in the array, or returns a string with all the characters after the specified number in the string.
|
422 | 446 |
|
| 447 | +In Bicep, use the [skip](../bicep/bicep-functions-array.md#skip) function. |
| 448 | + |
423 | 449 | ### Parameters
|
424 | 450 |
|
425 | 451 | | Parameter | Required | Type | Description |
|
@@ -450,6 +476,8 @@ The output from the preceding example with the default values is:
|
450 | 476 |
|
451 | 477 | Returns an array or string. An array has the specified number of elements from the start of the array. A string has the specified number of characters from the start of the string.
|
452 | 478 |
|
| 479 | +In Bicep, use the [take](../bicep/bicep-functions-array.md#take) function. |
| 480 | + |
453 | 481 | ### Parameters
|
454 | 482 |
|
455 | 483 | | Parameter | Required | Type | Description |
|
@@ -480,6 +508,8 @@ The output from the preceding example with the default values is:
|
480 | 508 |
|
481 | 509 | Returns a single array or object with all elements from the parameters. For arrays, duplicate values are included once. For objects, duplicate property names are only included once.
|
482 | 510 |
|
| 511 | +In Bicep, use the [union](../bicep/bicep-functions-array.md#union) function. |
| 512 | + |
483 | 513 | ### Parameters
|
484 | 514 |
|
485 | 515 | | Parameter | Required | Type | Description |
|
|
0 commit comments