ux4iot
Search…
FAQ

How can the connection string and websocket URL be retrieved from az cli?

Here is an example for the websocket URL:
1
# ID of your Azure subscription
2
SUB="..."
3
# Name of the resource group containing the ux4iot instance
4
RG="..."
5
# Name of the ux4iot instance
6
NAME="ux4iot"
7
8
RESOURCE_ID="/subscriptions/$SUB/resourceGroups/$RG/providers/Microsoft.Solutions/applications/$NAME"
9
10
az resource show \
11
--ids $RESOURCE_ID/customwebsocketUrls/url \
12
--api-version 2018-09-01-preview \
13
--query properties.value \
14
--output tsv
Copied!
Here is an example for the primary admin connection string
1
# ID of your Azure subscription
2
SUB="..."
3
# Name of the resource group containing the ux4iot instance
4
RG="..."
5
# Name of the ux4iot instance
6
NAME="ux4iot"
7
8
RESOURCE_ID="/subscriptions/$SUB/resourceGroups/$RG/providers/Microsoft.Solutions/applications/$NAME"
9
10
az resource show \
11
--ids $RESOURCE_ID/customsharedAccessPolicies/Primary \
12
--api-version 2018-09-01-preview \
13
--query properties.connectionString \
14
--output tsv
Copied!
You can quite easily find the RESOURCE_ID of the ux4iot instance in the Azure portal if you navigate to the ux4iot instance and copy the highlighted section of the URL:
Copy link