Skip to content

Latest commit

 

History

History
213 lines (187 loc) · 9.15 KB

resource-group-template-functions.md

File metadata and controls

213 lines (187 loc) · 9.15 KB
title description services documentationcenter author manager editor ms.assetid ms.service ms.devlang ms.topic ms.tgt_pltfrm ms.workload ms.date ms.author
Resource Manager Template Functions | Microsoft Docs
Describes the functions to use in an Azure Resource Manager template to retrieve values, work with strings and numerics, and retrieve deployment information.
azure-resource-manager
na
tfitzmac
timlt
tysonn
0644abe1-abaa-443d-820d-1966d7d26bfd
azure-resource-manager
na
article
na
na
09/18/2017
tomfitz

Azure Resource Manager template functions

This topic describes all the functions you can use in an Azure Resource Manager template.

You add functions in your templates by enclosing them within brackets: [ and ], respectively. The expression is evaluated during deployment. While written as a string literal, the result of evaluating the expression can be of a different JSON type, such as an array, object, or integer. Just like in JavaScript, function calls are formatted as functionName(arg1,arg2,arg3). You reference properties by using the dot and [index] operators.

A template expression cannot exceed 24,576 characters.

Template functions and their parameters are case-insensitive. For example, Resource Manager resolves variables('var1') and VARIABLES('VAR1') as the same. When evaluated, unless the function expressly modifies case (such as toUpper or toLower), the function preserves the case. Certain resource types may have case requirements irrespective of how functions are evaluated.

Resource Manager provides several functions for working with arrays and objects.

Resource Manager provides several functions for making comparisons in your templates.

Resource Manager provides the following functions for getting values from sections of the template and values related to the deployment:

Resource Manager provides the following functions for working with logical conditions:

Numeric functions

Resource Manager provides the following functions for working with integers:

Resource Manager provides the following functions for getting resource values:

Resource Manager provides the following functions for working with strings:

Next steps