You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/templates/template-functions-object.md
+18-10Lines changed: 18 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,7 @@ Determines if an array, object, or string is empty.
106
106
107
107
| Parameter | Required | Type | Description |
108
108
|:--- |:--- |:--- |:--- |
109
-
| itemToTest |Yes |array, object, or string |The value to check if it is empty. |
109
+
| itemToTest |Yes |array, object, or string |The value to check if it's empty. |
110
110
111
111
### Return value
112
112
@@ -249,13 +249,21 @@ If you need to include a parameter value or variable in the JSON object, use the
249
249
250
250
### Example
251
251
252
-
The following [example template](https://github.com/Azure/azure-docs-json-samples/blob/master/azure-resource-manager/functions/json.json) shows how to use the json function with arrays and objects:
252
+
The following [example template](https://github.com/Azure/azure-docs-json-samples/blob/master/azure-resource-manager/functions/json.json) shows how to use the json function. Notice that you can either pass in a string that represents the object or use **null** when no value is needed.
Returns the resource ID for an [extension resource](../management/extension-resource-types.md), which is a resource type that is applied to another resource to add to its capabilities.
30
28
@@ -102,9 +100,7 @@ The following example returns the resource ID for a resource group lock.
102
100
103
101
## list*
104
102
105
-
```json
106
-
list{Value}(resourceName or resourceIdentifier, apiVersion, functionValues)
107
-
```
103
+
`list{Value}(resourceName or resourceIdentifier, apiVersion, functionValues)`
108
104
109
105
The syntax for this function varies by name of the list operations. Each implementation returns values for the resource type that supports a list operation. The operation name must start with `list`. Some common usages are `listKeys` and `listSecrets`.
110
106
@@ -350,9 +346,7 @@ To get the SAS token, pass an object for the expiry time. The expiry time must b
350
346
351
347
## providers
352
348
353
-
```json
354
-
providers(providerNamespace, [resourceType])
355
-
```
349
+
`providers(providerNamespace, [resourceType])`
356
350
357
351
Returns information about a resource provider and its supported resource types. If you don't provide a resource type, the function returns all the supported types for the resource provider.
358
352
@@ -427,9 +421,7 @@ For the **Microsoft.Web** resource provider and **sites** resource type, the pre
427
421
428
422
## reference
429
423
430
-
```json
431
-
reference(resourceName or resourceIdentifier, [apiVersion], ['Full'])
432
-
```
424
+
`reference(resourceName or resourceIdentifier, [apiVersion], ['Full'])`
433
425
434
426
Returns an object representing a resource's runtime state.
435
427
@@ -665,9 +657,7 @@ The following [example template](https://github.com/Azure/azure-docs-json-sample
665
657
666
658
## resourceGroup
667
659
668
-
```json
669
-
resourceGroup()
670
-
```
660
+
`resourceGroup()`
671
661
672
662
Returns an object that represents the current resource group.
673
663
@@ -745,9 +735,7 @@ The preceding example returns an object in the following format:
Returns the unique identifier of a resource. You use this function when the resource name is ambiguous or not provisioned within the same template. The format of the returned identifier varies based on whether the deployment happens at the scope of a resource group, subscription, management group, or tenant.
753
741
@@ -902,9 +890,7 @@ The output from the preceding example with the default values is:
902
890
903
891
## subscription
904
892
905
-
```json
906
-
subscription()
907
-
```
893
+
`subscription()`
908
894
909
895
Returns details about the subscription for the current deployment.
910
896
@@ -945,9 +931,7 @@ The following [example template](https://github.com/Azure/azure-docs-json-sample
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/templates/template-functions.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,6 @@ To create your own functions, see [User-defined functions](template-syntax.md#fu
13
13
Most functions work the same when deployed to a resource group, subscription, management group, or tenant. A few functions can't be used in all scopes. They're noted in the lists below.
14
14
15
15
<aid="array"aria-hidden="true" />
16
-
<aid="coalesce"aria-hidden="true" />
17
16
<aid="concatarray"aria-hidden="true" />
18
17
<aid="contains"aria-hidden="true" />
19
18
<aid="createarray"aria-hidden="true" />
@@ -49,6 +48,7 @@ Resource Manager provides several functions for working with arrays.
49
48
*[take](template-functions-array.md#take)
50
49
*[union](template-functions-array.md#union)
51
50
51
+
<aid="coalesce"aria-hidden="true" />
52
52
<aid="equals"aria-hidden="true" />
53
53
<aid="less"aria-hidden="true" />
54
54
<aid="lessorequals"aria-hidden="true" />
@@ -59,6 +59,7 @@ Resource Manager provides several functions for working with arrays.
59
59
60
60
Resource Manager provides several functions for making comparisons in your templates.
0 commit comments