Skip to content

Commit 4f2d554

Browse files
committed
update template functions
1 parent 341b04e commit 4f2d554

File tree

4 files changed

+67
-224
lines changed

4 files changed

+67
-224
lines changed

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

Lines changed: 7 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Template functions - comparison
33
description: Describes the functions to use in an Azure Resource Manager template to compare values.
44
ms.topic: conceptual
5-
ms.date: 09/05/2017
5+
ms.date: 04/27/2020
66
---
77
# Comparison functions for ARM templates
88

@@ -14,9 +14,8 @@ Resource Manager provides several functions for making comparisons in your Azure
1414
* [less](#less)
1515
* [lessOrEquals](#lessorequals)
1616

17-
[!INCLUDE [updated-for-az](../../../includes/updated-for-az.md)]
18-
1917
## equals
18+
2019
`equals(arg1, arg2)`
2120

2221
Checks whether two values equal each other.
@@ -125,18 +124,6 @@ The output from the preceding example with the default values is:
125124
| checkArrays | Bool | True |
126125
| checkObjects | Bool | True |
127126

128-
To deploy this example template with Azure CLI, use:
129-
130-
```azurecli-interactive
131-
az deployment group create -g functionexamplegroup --template-uri https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/functions/equals.json
132-
```
133-
134-
To deploy this example template with PowerShell, use:
135-
136-
```powershell
137-
New-AzResourceGroupDeployment -ResourceGroupName functionexamplegroup -TemplateUri https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/functions/equals.json
138-
```
139-
140127
The following [example template](https://github.com/Azure/azure-docs-json-samples/blob/master/azure-resource-manager/functions/not-equals.json) uses [not](template-functions-logical.md#not) with **equals**.
141128

142129
```json
@@ -160,19 +147,8 @@ The output from the preceding example is:
160147
| ---- | ---- | ----- |
161148
| checkNotEquals | Bool | True |
162149

163-
To deploy this example template with Azure CLI, use:
164-
165-
```azurecli-interactive
166-
az deployment group create -g functionexamplegroup --template-uri https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/functions/not-equals.json
167-
```
168-
169-
To deploy this example template with PowerShell, use:
170-
171-
```powershell
172-
New-AzResourceGroupDeployment -ResourceGroupName functionexamplegroup -TemplateUri https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/functions/not-equals.json
173-
```
174-
175150
## greater
151+
176152
`greater(arg1, arg2)`
177153

178154
Checks whether the first value is greater than the second value.
@@ -236,19 +212,8 @@ The output from the preceding example with the default values is:
236212
| checkInts | Bool | False |
237213
| checkStrings | Bool | True |
238214

239-
To deploy this example template with Azure CLI, use:
240-
241-
```azurecli-interactive
242-
az deployment group create -g functionexamplegroup --template-uri https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/functions/greater.json
243-
```
244-
245-
To deploy this example template with PowerShell, use:
246-
247-
```powershell
248-
New-AzResourceGroupDeployment -ResourceGroupName functionexamplegroup -TemplateUri https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/functions/greater.json
249-
```
250-
251215
## greaterOrEquals
216+
252217
`greaterOrEquals(arg1, arg2)`
253218

254219
Checks whether the first value is greater than or equal to the second value.
@@ -312,19 +277,8 @@ The output from the preceding example with the default values is:
312277
| checkInts | Bool | False |
313278
| checkStrings | Bool | True |
314279

315-
To deploy this example template with Azure CLI, use:
316-
317-
```azurecli-interactive
318-
az deployment group create -g functionexamplegroup --template-uri https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/functions/greaterorequals.json
319-
```
320-
321-
To deploy this example template with PowerShell, use:
322-
323-
```powershell
324-
New-AzResourceGroupDeployment -ResourceGroupName functionexamplegroup -TemplateUri https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/functions/greaterorequals.json
325-
```
326-
327280
## less
281+
328282
`less(arg1, arg2)`
329283

330284
Checks whether the first value is less than the second value.
@@ -388,19 +342,8 @@ The output from the preceding example with the default values is:
388342
| checkInts | Bool | True |
389343
| checkStrings | Bool | False |
390344

391-
To deploy this example template with Azure CLI, use:
392-
393-
```azurecli-interactive
394-
az deployment group create -g functionexamplegroup --template-uri https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/functions/less.json
395-
```
396-
397-
To deploy this example template with PowerShell, use:
398-
399-
```powershell
400-
New-AzResourceGroupDeployment -ResourceGroupName functionexamplegroup -TemplateUri https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/functions/less.json
401-
```
402-
403345
## lessOrEquals
346+
404347
`lessOrEquals(arg1, arg2)`
405348

406349
Checks whether the first value is less than or equal to the second value.
@@ -464,21 +407,6 @@ The output from the preceding example with the default values is:
464407
| checkInts | Bool | True |
465408
| checkStrings | Bool | False |
466409

467-
To deploy this example template with Azure CLI, use:
468-
469-
```azurecli-interactive
470-
az deployment group create -g functionexamplegroup --template-uri https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/functions/lessorequals.json
471-
```
472-
473-
To deploy this example template with PowerShell, use:
474-
475-
```powershell
476-
New-AzResourceGroupDeployment -ResourceGroupName functionexamplegroup -TemplateUri https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/functions/lessorequals.json
477-
```
478-
479410
## Next steps
480-
* For a description of the sections in an Azure Resource Manager template, see [Authoring Azure Resource Manager templates](template-syntax.md).
481-
* To merge multiple templates, see [Using linked templates with Azure Resource Manager](linked-templates.md).
482-
* To iterate a specified number of times when creating a type of resource, see [Create multiple instances of resources in Azure Resource Manager](copy-resources.md).
483-
* To see how to deploy the template you have created, see [Deploy an application with Azure Resource Manager template](deploy-powershell.md).
484411

412+
* For a description of the sections in an Azure Resource Manager template, see [Understand the structure and syntax of ARM templates](template-syntax.md).

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

Lines changed: 6 additions & 2 deletions
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 to work with dates.
44
ms.topic: conceptual
5-
ms.date: 04/22/2020
5+
ms.date: 04/27/2020
66
---
77
# Date functions for ARM templates
88

@@ -235,4 +235,8 @@ The next example shows how to use a value from the function when setting a tag v
235235
}
236236
}
237237
}
238-
```
238+
```
239+
240+
## Next steps
241+
242+
* For a description of the sections in an Azure Resource Manager template, see [Understand the structure and syntax of ARM templates](template-syntax.md).

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Template functions - logical
33
description: Describes the functions to use in an Azure Resource Manager template to determine logical values.
44
ms.topic: conceptual
5-
ms.date: 04/15/2019
5+
ms.date: 04/27/2020
66
---
77
# Logical functions for ARM templates
88

@@ -289,6 +289,7 @@ The following [example template](https://github.com/Azure/azure-docs-json-sample
289289
"value": "[not(equals(1, 2))]"
290290
}
291291
}
292+
}
292293
```
293294

294295
The output from the preceding example is:
@@ -351,8 +352,5 @@ The output from the preceding example is:
351352

352353
## Next steps
353354

354-
* For a description of the sections in an Azure Resource Manager template, see [Authoring Azure Resource Manager templates](template-syntax.md).
355-
* To merge multiple templates, see [Using linked templates with Azure Resource Manager](linked-templates.md).
356-
* To iterate a specified number of times when creating a type of resource, see [Create multiple instances of resources in Azure Resource Manager](copy-resources.md).
357-
* To see how to deploy the template you've created, see [Deploy an application with Azure Resource Manager template](deploy-powershell.md).
355+
* For a description of the sections in an Azure Resource Manager template, see [Understand the structure and syntax of ARM templates](template-syntax.md).
358356

0 commit comments

Comments
 (0)