forked from Azure/azure-quickstart-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazuredeploy.json
145 lines (145 loc) · 4.61 KB
/
azuredeploy.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"iotHubName": {
"type": "string",
"minLength": 3,
"metadata": {
"description": "Name of the IoT Hub instance to provision."
}
},
"skuName": {
"type": "string",
"allowedValues": [
"F1",
"S1",
"S2"
],
"defaultValue": "F1",
"metadata": {
"description": "One of the supported SKUs: F1, S1 or S2"
}
},
"capacityUnits": {
"type": "int",
"minValue": 1,
"defaultValue": 1,
"metadata": {
"description": "Number of desired IoT Hub units. Restricted to 1 unit for F1. Can be set up to maximum number allowed for subscription."
}
},
"d2cMessageRetentionInDaysPeriod": {
"type": "int",
"minValue": 1,
"maxValue": 7,
"defaultValue": 1,
"metadata": {
"description": "Retention time in days for device-to-cloud messages."
}
},
"d2cPartitionCount": {
"type": "int",
"minValue": 2,
"defaultValue": 2,
"metadata": {
"description": "Number of desired partitions for device-to-cloud event ingestion."
}
},
"c2dMessagesTTLAsIso8601": {
"type": "string",
"defaultValue": "PT1H",
"metadata": {
"description": "Default TTL in ISO_8601 format for cloud-to-device messages. The value can range from PT1M to PT2D (or any other format as per ISO_8601 standards for duration)."
}
},
"c2dMessagesMaxDeliveryCount": {
"type": "int",
"minValue": 1,
"maxValue": 100,
"defaultValue": 10,
"metadata": {
"description": "Maximum delivery count for cloud-to-device messages per-device queues."
}
},
"c2dFeebackMessagesTTLAsIso8601": {
"type": "string",
"defaultValue": "PT1H",
"metadata": {
"description": "TTL in ISO_8601 format for service-bound feedback messages. The value can range from PT1M to PT2D (or any other format as per ISO_8601 standards for duration)."
}
},
"c2dFeedbackMessagesMaxDeliveryCount": {
"type": "int",
"minValue": 1,
"maxValue": 100,
"defaultValue": 10,
"metadata": {
"description": "Maximum delivery count for feedback queue."
}
},
"c2dFeedbackMessagesLockDurationAsIso8601": {
"type": "string",
"defaultValue": "PT60S",
"metadata": {
"description": "Lock duration in ISO_8601 format for service-bound feedback messages. The value can range from PT5S to PT300S (or any other format as per ISO_8601 standards for duration)."
}
},
"d2cConsumerGroupName": {
"type": "string",
"minLength": 3,
"defaultValue": "cg1",
"metadata": {
"description": "Name of device-to-cloud consumer group to provision on the IoT Hub instance."
}
}
},
"variables": {
"apiVersion": "2016-02-03",
"location": "[resourceGroup().location]"
},
"resources": [
{
"apiVersion": "2016-02-03",
"location": "[variables('location')]",
"name": "[parameters('iotHubName')]",
"properties": {
"eventHubEndpoints": {
"events": {
"retentionTimeInDays": "[parameters('d2cMessageRetentionInDaysPeriod')]",
"partitionCount": "[parameters('d2cPartitionCount')]"
}
},
"cloudToDevice": {
"defaultTtlAsIso8601": "[parameters('c2dMessagesTTLAsIso8601')]",
"maxDeliveryCount": "[parameters('c2dMessagesMaxDeliveryCount')]",
"feedback": {
"maxDeliveryCount": "[parameters('c2dFeedbackMessagesMaxDeliveryCount')]",
"ttlAsIso8601": "[parameters('c2dFeebackMessagesTTLAsIso8601')]",
"lockDurationAsIso8601": "[parameters('c2dFeedbackMessagesLockDurationAsIso8601')]"
}
},
"location": "[resourceGroup().location]"
},
"sku": {
"name": "[parameters('skuName')]",
"capacity": "[parameters('capacityUnits')]"
},
"type": "Microsoft.Devices/iotHubs"
},
{
"apiVersion": "2016-02-03",
"dependsOn": [
"[concat('Microsoft.Devices/iothubs/', parameters('iotHubName'))]"
],
"name": "[concat(parameters('iotHubName'), '/events/',parameters('d2cConsumerGroupName'))]",
"type": "Microsoft.Devices/iotHubs/eventhubEndpoints/ConsumerGroups"
}
],
"outputs": {
"iotHubKeys": {
"value": "[listKeys(resourceId('Microsoft.Devices/iotHubs', parameters('iotHubName')), variables('apiVersion'))]",
"type": "object"
}
}
}