-
Notifications
You must be signed in to change notification settings - Fork 5.1k
/
IotHub.json
227 lines (227 loc) · 8.91 KB
/
IotHub.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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
{
"swagger": "2.0",
"info": {
"version": "2018-01-01",
"title": "Schema of Azure IoT Hub events published to Azure Event Grid",
"description": "Describes the schema of the Azure IoT Hub events published to Azure Event Grid. This corresponds to the Data property of an EventGridEvent."
},
"paths": {},
"definitions": {
"IotHubDeviceCreatedEventData": {
"description": "Event data for Microsoft.Devices.DeviceCreated event.",
"allOf": [
{
"$ref": "#/definitions/DeviceLifeCycleEventProperties"
}
],
"properties": {}
},
"IotHubDeviceDeletedEventData": {
"description": "Event data for Microsoft.Devices.DeviceDeleted event.",
"allOf": [
{
"$ref": "#/definitions/DeviceLifeCycleEventProperties"
}
],
"properties": {}
},
"IotHubDeviceConnectedEventData": {
"description": "Event data for Microsoft.Devices.DeviceConnected event.",
"allOf": [
{
"$ref": "#/definitions/DeviceConnectionStateEventProperties"
}
],
"properties": {}
},
"IotHubDeviceDisconnectedEventData": {
"description": "Event data for Microsoft.Devices.DeviceDisconnected event.",
"allOf": [
{
"$ref": "#/definitions/DeviceConnectionStateEventProperties"
}
],
"properties": {}
},
"IotHubDeviceTelemetryEventData": {
"description": "Event data for Microsoft.Devices.DeviceTelemetry event.",
"allOf": [
{
"$ref": "#/definitions/DeviceTelemetryEventProperties"
}
],
"properties": {}
},
"DeviceLifeCycleEventProperties": {
"type": "object",
"description": "Schema of the Data property of an EventGridEvent for a device life cycle event (DeviceCreated, DeviceDeleted).",
"properties": {
"deviceId": {
"type": "string",
"description": "The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '."
},
"hubName": {
"type": "string",
"description": "Name of the IoT Hub where the device was created or deleted."
},
"twin": {
"description": "Information about the device twin, which is the cloud representation of application device metadata.",
"$ref": "#/definitions/DeviceTwinInfo"
}
}
},
"DeviceConnectionStateEventProperties": {
"type": "object",
"description": "Schema of the Data property of an EventGridEvent for a device connection state event (DeviceConnected, DeviceDisconnected).",
"properties": {
"deviceId": {
"type": "string",
"description": "The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '."
},
"moduleId": {
"type": "string",
"description": "The unique identifier of the module. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '."
},
"hubName": {
"type": "string",
"description": "Name of the IoT Hub where the device was created or deleted."
},
"deviceConnectionStateEventInfo": {
"description": "Information about the device connection state event.",
"$ref": "#/definitions/DeviceConnectionStateEventInfo"
}
}
},
"DeviceTelemetryEventProperties": {
"type": "object",
"description": "Schema of the Data property of an EventGridEvent for a device telemetry event (DeviceTelemetry).",
"properties": {
"body": {
"type": "object",
"description": "The content of the message from the device."
},
"properties": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Application properties are user-defined strings that can be added to the message. These fields are optional."
},
"systemProperties": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "System properties help identify contents and source of the messages."
}
}
},
"DeviceTwinInfo": {
"type": "object",
"description": "Information about the device twin, which is the cloud representation of application device metadata.",
"properties": {
"authenticationType": {
"type": "string",
"description": "Authentication type used for this device: either SAS, SelfSigned, or CertificateAuthority."
},
"cloudToDeviceMessageCount": {
"type": "number",
"description": "Count of cloud to device messages sent to this device."
},
"connectionState": {
"type": "string",
"description": "Whether the device is connected or disconnected."
},
"deviceId": {
"type": "string",
"description": "The unique identifier of the device twin."
},
"etag": {
"type": "string",
"description": "A piece of information that describes the content of the device twin. Each etag is guaranteed to be unique per device twin."
},
"lastActivityTime": {
"type": "string",
"description": "The ISO8601 timestamp of the last activity."
},
"properties": {
"type": "object",
"description": "Properties JSON element.",
"properties": {
"desired": {
"description": "A portion of the properties that can be written only by the application back-end, and read by the device.",
"$ref": "#/definitions/DeviceTwinProperties"
},
"reported": {
"description": "A portion of the properties that can be written only by the device, and read by the application back-end.",
"$ref": "#/definitions/DeviceTwinProperties"
}
}
},
"status": {
"type": "string",
"description": "Whether the device twin is enabled or disabled."
},
"statusUpdateTime": {
"type": "string",
"description": "The ISO8601 timestamp of the last device twin status update."
},
"version": {
"type": "number",
"description": "An integer that is incremented by one each time the device twin is updated."
},
"x509Thumbprint": {
"type": "object",
"description": "The thumbprint is a unique value for the x509 certificate, commonly used to find a particular certificate in a certificate store. The thumbprint is dynamically generated using the SHA1 algorithm, and does not physically exist in the certificate.",
"properties": {
"primaryThumbprint": {
"type": "string",
"description": "Primary thumbprint for the x509 certificate."
},
"secondaryThumbprint": {
"type": "string",
"description": "Secondary thumbprint for the x509 certificate."
}
}
}
}
},
"DeviceTwinProperties": {
"type": "object",
"description": "A portion of the properties that can be written only by the application back-end, and read by the device.",
"properties": {
"metadata": {
"description": "Metadata information for the properties JSON document.",
"$ref": "#/definitions/DeviceTwinMetadata",
"x-ms-client-name": "$metadata"
},
"version": {
"type": "number",
"description": "Version of device twin properties.",
"x-ms-client-name": "$version"
}
}
},
"DeviceTwinMetadata": {
"type": "object",
"description": "Metadata information for the properties JSON document.",
"properties": {
"lastUpdated": {
"type": "string",
"description": "The ISO8601 timestamp of the last time the properties were updated.",
"x-ms-client-name": "$lastUpdated"
}
}
},
"DeviceConnectionStateEventInfo": {
"type": "object",
"description": "Information about the device connection state event.",
"properties": {
"sequenceNumber": {
"type": "string",
"description": "Sequence number is string representation of a hexadecimal number. string compare can be used to identify the larger number because both in ASCII and HEX numbers come after alphabets. If you are converting the string to hex, then the number is a 256 bit number."
}
}
}
}
}