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.

Array and object functions

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

Comparison functions

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

Deployment value functions

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

Logical functions

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

Numeric functions

Resource Manager provides the following functions for working with integers:

Resource functions

Resource Manager provides the following functions for getting resource values:

String functions

Resource Manager provides the following functions for working with strings:

Next steps