CreateUiDefinition referencing functions
The functions to use when referencing outputs from the properties or context of a createUiDefinition.json file.
basics
Returns the output values of an element that is defined in the Basics step. Pass in the name of the element as a parameter to this function.
To get the output values of elements in other steps, use the steps() function.
The following example returns the output of the element named clusterName
in the Basics step:
"[basics('clusterName')]"
The returned values vary based on the type of element that is retrieved.
location
Returns the location selected in the Basics step or the current context.
The following example returns a value like "chinanorth"
:
"[location()]"
resourceGroup
Returns details about the resourceGroup selected in the Basics step or the current context.
The following example:
"[resourceGroup()]"
Returns the following properties:
{
"mode": "New" or "Existing",
"name": "{resourceGroupName}",
"location": "{resourceGroupLocation}"
}
You can get any particular value with dot notation.
"[resourceGroup().name]"
steps
Returns the elements on a specified step. Pass in the name of the step as a parameter to this function. From the returned elements, you can get particular property values.
To get the output values of elements in the Basics step, use the basics() function.
The following example returns the step named vmParameters
. On that step is an element named adminUsername
.
"[steps('vmParameters').adminUsername]"
subscription
Returns properties for the subscription selected in the Basics step or the current context.
The following example:
"[subscription()]"
Returns the following properties:
{
"id": "/subscriptions/{subscription-id}",
"subscriptionId": "{subscription-id}",
"tenantId": "{tenant-id}",
"displayName": "{name-of-subscription}"
}
Next steps
- For an introduction to developing the portal interface, see CreateUiDefinition.json for Azure managed application's create experience.