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/how-to-routing-azure-cli.md
+31-1Lines changed: 31 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -282,7 +282,7 @@ References used in the following commands:
282
282
1. Create your custom endpoint. Use the connection string in this command that you copied in the last step. The `endpoint-type` must be `eventhub`, otherwise all other values should be your own.
> If you are using managed identities instead of connection string, you have to use the following command to authenticate your identity to the CosmosDB account.
@@ -418,7 +418,37 @@ In IoT Hub, you can create a route to send messages or capture events. Each rout
418
418
"source": "DeviceConnectionStateEvents"
419
419
}
420
420
```
421
+
# [Cosmos DB](#tab/cosmosdb)
422
+
423
+
1. With your existing Cosmos DB endpoint, create a new IoT Hub route, using that endpoint. Use the endpoint name for `endpoint`. Use a unique name for `route-name`.
424
+
425
+
The default fallback route in IoT Hub collects messages from `DeviceMessages`, so let's choose another option for our custom route, such as `DeviceConnectionStateEvents`. For more source options, see [az iot hub route](/cli/azure/iot/hub/route#az-iot-hub-route-create-required-parameters).
0 commit comments