ARM template functions
This article describes all the functions you can use in an Azure Resource Manager template (ARM template). For information about using functions in your template, see template syntax.
To create your own functions, see User-defined functions.
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.
Array functions
Resource Manager provides several functions for working with arrays.
- array
- concat
- contains
- createArray
- empty
- first
- intersection
- last
- length
- min
- max
- range
- skip
- take
- union
Comparison functions
Resource Manager provides several functions for making comparisons in your templates.
Date functions
Resource Manager provides the following functions for working with dates.
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:
Object functions
Resource Manager provides several functions for working with objects.
Resource functions
Resource Manager provides the following functions for getting resource values:
- extensionResourceId
- listAccountSas
- listKeys
- listSecrets
- list*
- pickZones
- providers
- reference
- resourceGroup - can only be used in deployments to a resource group.
- resourceId - can be used at any scope, but the valid parameters change depending on the scope.
- subscription - can only be used in deployments to a resource group or subscription.
- subscriptionResourceId
- tenantResourceId
String functions
Resource Manager provides the following functions for working with strings:
- base64
- base64ToJson
- base64ToString
- concat
- contains
- dataUri
- dataUriToString
- empty
- endsWith
- first
- format
- guid
- indexOf
- last
- lastIndexOf
- length
- newGuid
- padLeft
- replace
- skip
- split
- startsWith
- string
- substring
- take
- toLower
- toUpper
- trim
- uniqueString
- uri
- uriComponent
- uriComponentToString
Next steps
- For a description of the sections in an ARM template, see Understand the structure and syntax of ARM templates.
- To merge multiple templates, see Using linked and nested templates when deploying Azure resources.
- To iterate a specified number of times when creating a type of resource, see Resource iteration in ARM templates.
- To see how to deploy the template you've created, see Deploy resources with ARM templates and Azure PowerShell.