Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
These functions to use with JSON strings.
concat
Concatenates one or more strings.
For example, if the output value of element1
if "Contoso"
, then this example returns the string "Demo Contoso app"
:
"[concat('Demo ', steps('step1').element1, ' app')]"
endsWith
Determines whether a string ends with a value.
The following sample returns true.
"[endsWith('tuvwxyz', 'xyz')]"
guid
Generates a globally unique string (GUID).
The following example returns a value like "c7bc8bdc-7252-4a82-ba53-7c468679a511"
:
"[guid()]"
indexOf
Returns the first position of a value within a string or -1 if not found.
The following sample returns 2.
"[indexOf('abcdef', 'cd')]"
lastIndexOf
Returns the last position of a value in a string or -1 if not found.
The following sample returns 3.
"[lastIndexOf('test', 't')]"
replace
Returns a string in which all occurrences of the specified string in the current string are replaced with another string.
The following example returns "Contoso.com web app"
:
"[replace('Contoso.net web app', '.net', '.com')]"
startsWith
Determines whether a string starts with a value.
The following sample returns true.
"[startsWith('abcdefg', 'ab')]"
substring
Returns the substring of the specified string. The substring begins at the specified index and has the specified length.
The following example returns "web"
:
"[substring('Contoso.com web app', 12, 3)]"
toLower
Returns a string converted to lowercase.
The following example returns "contoso"
:
"[toLower('CONTOSO')]"
toUpper
Returns a string converted to uppercase.
The following example returns "CONTOSO"
:
"[toUpper('contoso')]"
Next steps
- For an introduction to Azure Resource Manager, see Azure Resource Manager overview.