You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/iot-hub/iot-hub-devguide-device-twins.md
+1-40Lines changed: 1 addition & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -177,46 +177,7 @@ The solution back end operates on the device twin using the following atomic ope
177
177
178
178
***Replace tags**. This operation enables the solution back end to completely overwrite all existing tags and substitute a new JSON document for `tags`.
179
179
180
-
***Receive twin notifications**. This operation allows the solution back end to be notified when the twin is modified. To do so, your IoT solution needs to create a route and to set the Data Source equal to *twinChangeEvents*. By default, no such routes pre-exist, so no twin notifications are sent. If the rate of change is too high, or for other reasons such as internal failures, the IoT Hub might send only one notification that contains all changes. Therefore, if your application needs reliable auditing and logging of all intermediate states, you should use device-to-cloud messages. The twin notification message includes properties and body.
181
-
182
-
- Properties
183
-
184
-
| Name | Value |
185
-
| --- | --- |
186
-
$content-type | application/json |
187
-
$iothub-enqueuedtime | Time when the notification was sent |
188
-
$iothub-message-source | twinChangeEvents |
189
-
$content-encoding | utf-8 |
190
-
deviceId | ID of the device |
191
-
hubName | Name of IoT Hub |
192
-
operationTimestamp | [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of operation |
193
-
iothub-message-schema | twinChangeNotification |
194
-
opType | "replaceTwin" or "updateTwin" |
195
-
196
-
Message system properties are prefixed with the `$` symbol.
197
-
198
-
- Body
199
-
200
-
This section includes all the twin changes in a JSON format. It uses the same format as a patch, with the difference that it can contain all twin sections: tags, properties.reported, properties.desired, and that it contains the "$metadata" elements. For example,
201
-
202
-
```json
203
-
{
204
-
"properties": {
205
-
"desired": {
206
-
"$metadata": {
207
-
"$lastUpdated": "2016-02-30T16:24:48.789Z"
208
-
},
209
-
"$version": 1
210
-
},
211
-
"reported": {
212
-
"$metadata": {
213
-
"$lastUpdated": "2016-02-30T16:24:48.789Z"
214
-
},
215
-
"$version": 1
216
-
}
217
-
}
218
-
}
219
-
```
180
+
***Receive twin notifications**. This operation allows the solution back end to be notified when the twin is modified. To do so, your IoT solution needs to create a route and to set the Data Source equal to *twinChangeEvents*. By default, no such route exists, so no twin notifications are sent. If the rate of change is too high, or for other reasons such as internal failures, the IoT Hub might send only one notification that contains all changes. Therefore, if your application needs reliable auditing and logging of all intermediate states, you should use device-to-cloud messages. To learn more about the properties and body returned in the twin notification message, see [Non-telemetry event schemas](iot-hub-non-telemetry-event-schema.md).
220
181
221
182
All the preceding operations support [Optimistic concurrency](iot-hub-devguide-device-twins.md#optimistic-concurrency) and require the **ServiceConnect** permission, as defined in [Control access to IoT Hub](iot-hub-dev-guide-sas.md).
Copy file name to clipboardExpand all lines: articles/iot-hub/iot-hub-devguide-identity-registry.md
+1-77Lines changed: 1 addition & 77 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,83 +90,7 @@ A more complex implementation could include the information from [Azure Monitor]
90
90
91
91
## Device and module lifecycle notifications
92
92
93
-
IoT Hub can notify your IoT solution when a device identity is created or deleted by sending lifecycle notifications. To do so, your IoT solution needs to create a route and to set the Data Source equal to *DeviceLifecycleEvents*. By default, no lifecycle notifications are sent, that is, no such routes pre-exist. By creating a route with Data Source equal to *DeviceLifecycleEvents*, lifecycle events will be sent for both device identities and module identities; however, the message contents will differ depending on whether the events are generated for module identities or device identities. It should be noted that for IoT Edge modules, the module identity creation flow is different than for other modules, as a result for IoT Edge modules the create notification is only sent if the corresponding IoT Edge Device for the updated IoT Edge module identity is running. For all other modules, lifecycle notifications are sent whenever the module identity is updated on the IoT Hub side. The notification message includes properties, and body.
94
-
95
-
Properties: Message system properties are prefixed with the `$` symbol.
96
-
97
-
Notification message for device:
98
-
99
-
| Name | Value |
100
-
| --- | --- |
101
-
|$content-type | application/json |
102
-
|$iothub-enqueuedtime | Time when the notification was sent |
103
-
|$iothub-message-source | deviceLifecycleEvents |
104
-
|$content-encoding | utf-8 |
105
-
|opType |**createDeviceIdentity** or **deleteDeviceIdentity**|
106
-
|hubName | Name of IoT Hub |
107
-
|deviceId | ID of the device |
108
-
|operationTimestamp | ISO8601 timestamp of operation |
Body: This section is in JSON format and represents the twin of the created module identity. For example,
148
-
149
-
```json
150
-
{
151
-
"deviceId":"11576-ailn-test-0-67333793211",
152
-
"moduleId":"tempSensor",
153
-
"etag":"AAAAAAAAAAE=",
154
-
"properties": {
155
-
"desired": {
156
-
"$metadata": {
157
-
"$lastUpdated": "2016-02-30T16:24:48.789Z"
158
-
},
159
-
"$version": 1
160
-
},
161
-
"reported": {
162
-
"$metadata": {
163
-
"$lastUpdated": "2016-02-30T16:24:48.789Z"
164
-
},
165
-
"$version": 1
166
-
}
167
-
}
168
-
}
169
-
```
93
+
IoT Hub can notify your IoT solution when a device identity is created or deleted by sending lifecycle notifications. To do so, your IoT solution needs to create a route and to set the Data Source equal to *DeviceLifecycleEvents*. By default, no lifecycle notifications are sent, that is, no such routes pre-exist. By creating a route with Data Source equal to *DeviceLifecycleEvents*, lifecycle events will be sent for both device identities and module identities; however, the message contents will differ depending on whether the events are generated for module identities or device identities. It should be noted that for IoT Edge modules, the module identity creation flow is different than for other modules, as a result for IoT Edge modules the create notification is only sent if the corresponding IoT Edge Device for the updated IoT Edge module identity is running. For all other modules, lifecycle notifications are sent whenever the module identity is updated on the IoT Hub side. To learn more about the properties and body returned in the notification message, see [Non-telemetry event schemas](iot-hub-non-telemetry-event-schema.md).
Copy file name to clipboardExpand all lines: articles/iot-hub/iot-hub-devguide-messages-construct.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -163,4 +163,6 @@ The **iothub-connection-auth-method** property contains a JSON serialized object
163
163
164
164
* For information about message size limits in IoT Hub, see [IoT Hub quotas and throttling](iot-hub-devguide-quotas-throttling.md).
165
165
166
-
* To learn how to create and read IoT Hub messages in various programming languages, see the [Quickstarts](../iot-develop/quickstart-send-telemetry-iot-hub.md?pivots=programming-language-nodejs).
166
+
* To learn how to create and read IoT Hub messages in various programming languages, see the [Quickstarts](../iot-develop/quickstart-send-telemetry-iot-hub.md?pivots=programming-language-nodejs).
167
+
168
+
* To learn about the structure of non-telemetry events generated by IoT Hub, see [IoT Hub non-telemetry event schemas](iot-hub-non-telemetry-event-schema.md).
Copy file name to clipboardExpand all lines: articles/iot-hub/iot-hub-devguide-module-twins.md
+1-41Lines changed: 1 addition & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -169,47 +169,7 @@ The solution back end operates on the module twin using the following atomic ope
169
169
170
170
* **Replace tags**. This operation enables the solution back end to completely overwrite all existing tags and substitute a new JSON document for `tags`.
171
171
172
-
* **Receive twin notifications**. This operation allows the solution back end to be notified when the twin is modified. To do so, your IoT solution needs to create a route and to set the Data Source equal to *twinChangeEvents*. By default, no twin notifications are sent, that is, no such routes pre-exist. If the rate of change is too high, or for other reasons such as internal failures, the IoT Hub might send only one notification that contains all changes. Therefore, if your application needs reliable auditing and logging of all intermediate states, you should use device-to-cloud messages. The twin notification message includes properties and body.
173
-
174
-
- Properties
175
-
176
-
| Name | Value |
177
-
| --- | --- |
178
-
$content-type | application/json |
179
-
$iothub-enqueuedtime | Time when the notification was sent |
180
-
$iothub-message-source | twinChangeEvents |
181
-
$content-encoding | utf-8 |
182
-
deviceId | ID of the device |
183
-
moduleId | ID of the module |
184
-
hubName | Name of IoT Hub |
185
-
operationTimestamp | [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of operation |
186
-
iothub-message-schema | twinChangeNotification |
187
-
opType | "replaceTwin" or "updateTwin" |
188
-
189
-
Message system properties are prefixed with the `$` symbol.
190
-
191
-
- Body
192
-
193
-
This section includes all the twin changes in a JSON format. It uses the same format as a patch, with the difference that it can contain all twin sections: tags, properties.reported, properties.desired, and that it contains the “$metadata” elements. For example,
194
-
195
-
```json
196
-
{
197
-
"properties": {
198
-
"desired": {
199
-
"$metadata": {
200
-
"$lastUpdated": "2016-02-30T16:24:48.789Z"
201
-
},
202
-
"$version": 1
203
-
},
204
-
"reported": {
205
-
"$metadata": {
206
-
"$lastUpdated": "2016-02-30T16:24:48.789Z"
207
-
},
208
-
"$version": 1
209
-
}
210
-
}
211
-
}
212
-
```
172
+
* **Receive twin notifications**. This operation allows the solution back end to be notified when the twin is modified. To do so, your IoT solution needs to create a route and to set the Data Source equal to *twinChangeEvents*. By default, no such route exists, so no twin notifications are sent. If the rate of change is too high, or for other reasons such as internal failures, the IoT Hub might send only one notification that contains all changes. Therefore, if your application needs reliable auditing and logging of all intermediate states, you should use device-to-cloud messages. To learn more about the properties and body returned in the twin notification message, see [Non-telemetry event schemas](iot-hub-non-telemetry-event-schema.md).
213
173
214
174
All the preceding operations support [Optimistic concurrency](iot-hub-devguide-device-twins.md#optimistic-concurrency) and require the **ServiceConnect** permission, as defined in the [Control Access to IoT Hub](iot-hub-devguide-security.md) article.
0 commit comments