Skip to content

Commit 464afe6

Browse files
committed
Merge branch 'main' of https://github.com/MicrosoftDocs/azure-docs-pr into lb-qs-cli
2 parents 1fe2856 + 88c57e6 commit 464afe6

10 files changed

+193
-37
lines changed

articles/azure-resource-manager/bicep/bicep-functions-string.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Describes the functions to use in a Bicep file to work with strings
44
author: mumian
55
ms.author: jgao
66
ms.topic: conceptual
7-
ms.date: 02/07/2022
7+
ms.date: 03/10/2022
88
---
99

1010
# String functions for Bicep
@@ -55,7 +55,7 @@ The output from the preceding example with the default values is:
5555

5656
## base64ToJson
5757

58-
`base64tojson`
58+
`base64ToJson(base64Value)`
5959

6060
Converts a base64 representation to a JSON object.
6161

@@ -160,7 +160,7 @@ Namespace: [sys](bicep-functions.md#namespaces-for-functions).
160160

161161
## contains
162162

163-
`contains (container, itemToFind)`
163+
`contains(container, itemToFind)`
164164

165165
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.
166166

@@ -565,7 +565,7 @@ Namespace: [sys](bicep-functions.md#namespaces-for-functions).
565565

566566
## last
567567

568-
`last (arg1)`
568+
`last(arg1)`
569569

570570
Returns last character of the string, or the last element of the array.
571571

@@ -624,7 +624,7 @@ An integer that represents the last position of the item to find. The value is z
624624

625625
### Examples
626626

627-
The following example shows how to use the indexOf and lastIndexOf functions:
627+
The following example shows how to use the `indexOf` and `lastIndexOf` functions:
628628

629629
```bicep
630630
output firstT int = indexOf('test', 't')
@@ -1182,7 +1182,7 @@ The output from the preceding example with the default values is:
11821182

11831183
## trim
11841184

1185-
`trim (stringToTrim)`
1185+
`trim(stringToTrim)`
11861186

11871187
Removes all leading and trailing white-space characters from the specified string.
11881188

@@ -1216,7 +1216,7 @@ The output from the preceding example with the default values is:
12161216

12171217
## uniqueString
12181218

1219-
`uniqueString (baseString, ...)`
1219+
`uniqueString(baseString, ...)`
12201220

12211221
Creates a deterministic hash string based on the values provided as parameters.
12221222

@@ -1283,7 +1283,7 @@ output uniqueDeploy string = uniqueString(resourceGroup().id, deployment().name)
12831283

12841284
## uri
12851285

1286-
`uri (baseUri, relativeUri)`
1286+
`uri(baseUri, relativeUri)`
12871287

12881288
Creates an absolute URI by combining the baseUri and the relativeUri string.
12891289

articles/azure-resource-manager/templates/template-functions-array.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Template functions - arrays
33
description: Describes the functions to use in an Azure Resource Manager template (ARM template) for working with arrays.
44
ms.topic: conceptual
5-
ms.date: 02/11/2022
5+
ms.date: 03/10/2022
66
---
77

88
# Array functions for ARM templates
@@ -36,6 +36,8 @@ To get an array of string values delimited by a value, see [split](template-func
3636

3737
Converts the value to an array.
3838

39+
In Bicep, use the [array](../bicep/bicep-functions-array.md#array) function.
40+
3941
### Parameters
4042

4143
| Parameter | Required | Type | Description |
@@ -66,6 +68,8 @@ The output from the preceding example with the default values is:
6668

6769
Combines multiple arrays and returns the concatenated array, or combines multiple string values and returns the concatenated string.
6870

71+
In Bicep, use the [concat](../bicep/bicep-functions-array.md#concat) function.
72+
6973
### Parameters
7074

7175
| Parameter | Required | Type | Description |
@@ -107,6 +111,8 @@ The output from the preceding example with the default values is:
107111

108112
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.
109113

114+
In Bicep, use the [contains](../bicep/bicep-functions-array.md#contains) function.
115+
110116
### Parameters
111117

112118
| Parameter | Required | Type | Description |
@@ -137,10 +143,12 @@ The output from the preceding example with the default values is:
137143

138144
## createArray
139145

140-
`createArray (arg1, arg2, arg3, ...)`
146+
`createArray(arg1, arg2, arg3, ...)`
141147

142148
Creates an array from the parameters.
143149

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+
144152
### Parameters
145153

146154
| Parameter | Required | Type | Description |
@@ -173,6 +181,8 @@ The output from the preceding example with the default values is:
173181

174182
Determines if an array, object, or string is empty.
175183

184+
In Bicep, use the [empty](../bicep/bicep-functions-array.md#empty) function.
185+
176186
### Parameters
177187

178188
| Parameter | Required | Type | Description |
@@ -203,6 +213,8 @@ The output from the preceding example with the default values is:
203213

204214
Returns the first element of the array, or first character of the string.
205215

216+
In Bicep, use the [first](../bicep/bicep-functions-array.md#first) function.
217+
206218
### Parameters
207219

208220
| Parameter | Required | Type | Description |
@@ -232,6 +244,8 @@ The output from the preceding example with the default values is:
232244

233245
Returns a single array or object with the common elements from the parameters.
234246

247+
In Bicep, use the [intersection](../bicep/bicep-functions-array.md#intersection) function.
248+
235249
### Parameters
236250

237251
| Parameter | Required | Type | Description |
@@ -259,10 +273,12 @@ The output from the preceding example with the default values is:
259273

260274
## last
261275

262-
`last (arg1)`
276+
`last(arg1)`
263277

264278
Returns the last element of the array, or last character of the string.
265279

280+
In Bicep, use the [last](../bicep/bicep-functions-array.md#last) function.
281+
266282
### Parameters
267283

268284
| Parameter | Required | Type | Description |
@@ -292,6 +308,8 @@ The output from the preceding example with the default values is:
292308

293309
Returns the number of elements in an array, characters in a string, or root-level properties in an object.
294310

311+
In Bicep, use the [length](../bicep/bicep-functions-array.md#length) function.
312+
295313
### Parameters
296314

297315
| Parameter | Required | Type | Description |
@@ -333,6 +351,8 @@ For more information about using this function with an array, see [Resource iter
333351

334352
Returns the maximum value from an array of integers or a comma-separated list of integers.
335353

354+
In Bicep, use the [max](../bicep/bicep-functions-array.md#max) function.
355+
336356
### Parameters
337357

338358
| Parameter | Required | Type | Description |
@@ -362,6 +382,8 @@ The output from the preceding example with the default values is:
362382

363383
Returns the minimum value from an array of integers or a comma-separated list of integers.
364384

385+
In Bicep, use the [min](../bicep/bicep-functions-array.md#min) function.
386+
365387
### Parameters
366388

367389
| Parameter | Required | Type | Description |
@@ -391,6 +413,8 @@ The output from the preceding example with the default values is:
391413

392414
Creates an array of integers from a starting integer and containing a number of items.
393415

416+
In Bicep, use the [range](../bicep/bicep-functions-array.md#range) function.
417+
394418
### Parameters
395419

396420
| Parameter | Required | Type | Description |
@@ -420,6 +444,8 @@ The output from the preceding example with the default values is:
420444

421445
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.
422446

447+
In Bicep, use the [skip](../bicep/bicep-functions-array.md#skip) function.
448+
423449
### Parameters
424450

425451
| Parameter | Required | Type | Description |
@@ -450,6 +476,8 @@ The output from the preceding example with the default values is:
450476

451477
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.
452478

479+
In Bicep, use the [take](../bicep/bicep-functions-array.md#take) function.
480+
453481
### Parameters
454482

455483
| Parameter | Required | Type | Description |
@@ -480,6 +508,8 @@ The output from the preceding example with the default values is:
480508

481509
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.
482510

511+
In Bicep, use the [union](../bicep/bicep-functions-array.md#union) function.
512+
483513
### Parameters
484514

485515
| Parameter | Required | Type | Description |

articles/azure-resource-manager/templates/template-functions-date.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Template functions - date
33
description: Describes the functions to use in an Azure Resource Manager template (ARM template) to work with dates.
44
ms.topic: conceptual
5-
ms.date: 02/11/2022
5+
ms.date: 03/10/2022
66
---
77

88
# Date functions for ARM templates
@@ -21,6 +21,8 @@ Resource Manager provides the following functions for working with dates in your
2121

2222
Adds a time duration to a base value. ISO 8601 format is expected.
2323

24+
In Bicep, use the [dateTimeAdd](../bicep/bicep-functions-date.md#datetimeadd) function.
25+
2426
### Parameters
2527

2628
| Parameter | Required | Type | Description |
@@ -57,6 +59,8 @@ The next example template shows how to set the start time for an Automation sche
5759

5860
Returns the current (UTC) datetime value in the specified format. If no format is provided, the ISO 8601 (`yyyyMMddTHHmmssZ`) format is used. **This function can only be used in the default value for a parameter.**
5961

62+
In Bicep, use the [utcNow](../bicep/bicep-functions-date.md#utcnow) function.
63+
6064
### Parameters
6165

6266
| Parameter | Required | Type | Description |

articles/azure-resource-manager/templates/template-functions-deployment.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Template functions - deployment
33
description: Describes the functions to use in an Azure Resource Manager template (ARM template) to retrieve deployment information.
44
ms.topic: conceptual
5-
ms.date: 02/11/2022
5+
ms.date: 03/10/2022
66
---
77

88
# Deployment functions for ARM templates
@@ -25,6 +25,8 @@ To get values from resources, resource groups, or subscriptions, see [Resource f
2525

2626
Returns information about the current deployment operation.
2727

28+
In Bicep, use the [deployment](../bicep/bicep-functions-deployment.md#deployment) function.
29+
2830
### Return value
2931

3032
This function returns the object that is passed during deployment. The properties in the returned object differ based on whether you are:
@@ -179,6 +181,8 @@ For a subscription deployment, the following example returns a deployment object
179181

180182
Returns information about the Azure environment used for deployment.
181183

184+
In Bicep, use the [environment](../bicep/bicep-functions-deployment.md#environment) function.
185+
182186
### Return value
183187

184188
This function returns properties for the current Azure environment. The following example shows the properties for global Azure. Sovereign clouds may return slightly different properties.
@@ -265,7 +269,7 @@ The preceding example returns the following object when deployed to global Azure
265269

266270
Returns a parameter value. The specified parameter name must be defined in the parameters section of the template.
267271

268-
In Bicep, directly reference parameters by using their symbolic names.
272+
In Bicep, directly reference [parameters](../bicep/parameters.md) by using their symbolic names.
269273

270274
### Parameters
271275

@@ -320,7 +324,7 @@ For more information about using parameters, see [Parameters in ARM templates](.
320324

321325
Returns the value of variable. The specified variable name must be defined in the variables section of the template.
322326

323-
In Bicep, directly reference variables by using their symbolic names.
327+
In Bicep, directly reference [variables](../bicep/variables.md) by using their symbolic names.
324328

325329
### Parameters
326330

articles/azure-resource-manager/templates/template-functions-logical.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Resource Manager provides several functions for making comparisons in your Azure
2626

2727
Checks whether all parameter values are true.
2828

29-
The `and` function isn't supported in Bicep, use the [&& operator](../bicep/operators-logical.md#and-) instead.
29+
The `and` function isn't supported in Bicep. Use the [&& operator](../bicep/operators-logical.md#and-) instead.
3030

3131
### Parameters
3232

@@ -60,6 +60,8 @@ The output from the preceding example is:
6060

6161
Converts the parameter to a boolean.
6262

63+
In Bicep, use the [bool](../bicep/bicep-functions-logical.md#bool) logical function.
64+
6365
### Parameters
6466

6567
| Parameter | Required | Type | Description |
@@ -95,7 +97,7 @@ The output from the preceding example with the default values is:
9597

9698
Returns false.
9799

98-
The `false` function isn't available in Bicep. Use the `false` keyword instead.
100+
The `false` function isn't available in Bicep. Use the `false` keyword instead.
99101

100102
### Parameters
101103

@@ -209,7 +211,7 @@ The following [example template](https://github.com/krnese/AzureDeploy/blob/mast
209211

210212
Converts boolean value to its opposite value.
211213

212-
The `not` function isn't supported in Bicep, use the [! operator](../bicep/operators-logical.md#not-) instead.
214+
The `not` function isn't supported in Bicep. Use the [! operator](../bicep/operators-logical.md#not-) instead.
213215

214216
### Parameters
215217

@@ -251,7 +253,7 @@ The output from the preceding example is:
251253

252254
Checks whether any parameter value is true.
253255

254-
The `or` function isn't supported in Bicep, use the [|| operator](../bicep/operators-logical.md#or-) instead.
256+
The `or` function isn't supported in Bicep. Use the [|| operator](../bicep/operators-logical.md#or-) instead.
255257

256258
### Parameters
257259

@@ -285,7 +287,7 @@ The output from the preceding example is:
285287

286288
Returns true.
287289

288-
The `true` function isn't available in Bicep. Use the `true` keyword instead.
290+
The `true` function isn't available in Bicep. Use the `true` keyword instead.
289291

290292
### Parameters
291293

0 commit comments

Comments
 (0)