-
Notifications
You must be signed in to change notification settings - Fork 0
/
quickstart.json
90 lines (90 loc) · 3.44 KB
/
quickstart.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.6.18.56646",
"templateHash": "18021615006857050553"
}
},
"parameters": {
"serviceCatalog": {
"type": "bool",
"defaultValue": false
}
},
"variables": {
"iotHubName": "[format('iothub-{0}', uniqueString(resourceGroup().id))]",
"managedGroupId": "[format('{0}-resources-{1}', resourceGroup().id, uniqueString(resourceGroup().id))]",
"kind": "[if(parameters('serviceCatalog'), 'servicecatalog', 'marketplace')]"
},
"resources": [
{
"type": "Microsoft.Solutions/applications",
"apiVersion": "2021-07-01",
"name": "ux4iot",
"kind": "[variables('kind')]",
"location": "[resourceGroup().location]",
"plan": "[if(parameters('serviceCatalog'), null(), createObject('name', 'standard', 'product', 'ux4iot', 'publisher', 'deviceinsightgmbh-4961725', 'version', '2.0.0'))]",
"properties": {
"managedResourceGroupId": "[variables('managedGroupId')]",
"applicationDefinitionId": "[if(parameters('serviceCatalog'), '/subscriptions/ab92703c-7fdb-4a1e-8ea8-b402f4e2ea25/resourceGroups/ux4iot-shared/providers/Microsoft.Solutions/applicationDefinitions/ux4iot', null())]",
"parameters": {
"iotHubEventHubConnectionString": {
"value": "[format('Endpoint={0};SharedAccessKeyName=iothubowner;SharedAccessKey={1};EntityPath={2}', reference(resourceId('Microsoft.Devices/IotHubs', variables('iotHubName'))).eventHubEndpoints.events.endpoint, listKeys(resourceId('Microsoft.Devices/IotHubs', variables('iotHubName')), '2021-03-31').value[0].primaryKey, reference(resourceId('Microsoft.Devices/IotHubs', variables('iotHubName'))).eventHubEndpoints.events.path)]"
},
"iotHubServiceConnectionString": {
"value": "[format('HostName={0};SharedAccessKeyName=iothubowner;SharedAccessKey={1}', reference(resourceId('Microsoft.Devices/IotHubs', variables('iotHubName'))).hostName, listKeys(resourceId('Microsoft.Devices/IotHubs', variables('iotHubName')), '2021-03-31').value[0].primaryKey)]"
}
}
},
"dependsOn": [
"[resourceId('Microsoft.Devices/IotHubs', variables('iotHubName'))]"
]
},
{
"type": "Microsoft.Devices/IotHubs",
"apiVersion": "2021-03-31",
"name": "[variables('iotHubName')]",
"location": "[resourceGroup().location]",
"sku": {
"capacity": 1,
"name": "S1"
},
"properties": {
"routing": {
"fallbackRoute": {
"name": "$fallback",
"source": "DeviceMessages",
"condition": "true",
"endpointNames": [
"events"
],
"isEnabled": true
},
"routes": [
{
"name": "ux4iot-twin-changes",
"isEnabled": true,
"source": "TwinChangeEvents",
"condition": "true",
"endpointNames": [
"events"
]
},
{
"name": "ux4iot-connection-events",
"isEnabled": true,
"source": "DeviceConnectionStateEvents",
"condition": "true",
"endpointNames": [
"events"
]
}
]
}
}
}
]
}