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
To create a routing endpoint, you'll use [az iot hub routing-endpoint create](/cli/azure/iot/hub/routing-endpoint?view=azure-cli-latest#az-iot-hub-routing-endpoint-create). To create the message route for the endpoint, you'll use [az iot hub route create](/cli/azure/iot/hub/route?view=azure-cli-latest#az-iot-hub-route-create).
146
+
To create a routing endpoint, use [az iot hub routing-endpoint create](/cli/azure/iot/hub/routing-endpoint?view=azure-cli-latest#az-iot-hub-routing-endpoint-create). To create the message route for the endpoint, use [az iot hub route create](/cli/azure/iot/hub/route?view=azure-cli-latest#az-iot-hub-route-create).
First, set up the endpoint for the storage account, then set up the route.
153
153
154
-
These are the variables used:
154
+
These are the variables used by the script that must be set within your Cloud Shell session:
155
155
156
156
**storageConnectionString**: This value is retrieved from the storage account set up in the previous script. It is used by the message routing to access the storage account.
echo "service bus queue connection string = " $sbqConnectionString
254
254
```
255
255
256
-
Now set up the routing endpoint and the message route for the Service Bus queue. These are the variables used:
256
+
Now set up the routing endpoint and the message route for the Service Bus queue. These are the variables used by the script that must be set within your Cloud Shell session:
257
257
258
258
**endpointName**: This field is the name identifying the endpoint.
To create a routing endpoint, you'll use [Add-AzIotHubRoutingEndpoint](/powershell/module/az.iothub/Add-AzIotHubRoutingEndpoint). To create the messaging route for the endpoint, you'll use [Add-AzIotHubRoute](/powershell/module/az.iothub/Add-AzIoTHubRoute).
131
+
To create a routing endpoint, use [Add-AzIotHubRoutingEndpoint](/powershell/module/az.iothub/Add-AzIotHubRoutingEndpoint). To create the messaging route for the endpoint, use [Add-AzIotHubRoute](/powershell/module/az.iothub/Add-AzIoTHubRoute).
132
132
133
133
### Route to a storage account
134
134
135
135
First, set up the endpoint for the storage account, then create the message route.
Now set up the routing endpoint and the message route for the Service Bus queue. These are the variables used:
231
+
Now set up the routing endpoint and the message route for the Service Bus queue. These are the variables used by the script that must be set within your Cloud Shell session:
232
232
233
233
**endpointName**: This field is the name identifying the endpoint.
Copy file name to clipboardExpand all lines: articles/iot-hub/tutorial-routing-config-message-routing-RM-template.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -367,7 +367,7 @@ The files are uploaded to the share used by your Cloud Shell instance.
367
367
368
368
Run the script to perform the deployment. The last line of this script retrieves the variable that was set up to be returned -- the Service Bus queue connection string.
369
369
370
-
These variables are set in this script:
370
+
The script sets and uses these variables:
371
371
372
372
**$RGName** is the resource group name to which to deploy the template. This field is created before deploying the template.
Copy file name to clipboardExpand all lines: articles/iot-hub/tutorial-routing-view-message-routing-results.md
+12-13Lines changed: 12 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,15 +19,15 @@ ms.custom: mvc
19
19
20
20
## Rules for routing the messages
21
21
22
-
These are the rules for the message routing; these were set up in Part 1 of this tutorial, and you'll see them work in this second part.
22
+
These are the rules for the message routing; these were set up in Part 1 of this tutorial, and you see them work in this second part.
23
23
24
24
|Value |Result|
25
25
|------|------|
26
26
|level="storage" |Write to Azure Storage.|
27
27
|level="critical" |Write to a Service Bus queue. A Logic App retrieves the message from the queue and uses Office 365 to e-mail the message.|
28
28
|default |Display this data using Power BI.|
29
29
30
-
Now you'll create the resources to which the messages will be routed, run an app to send messages to the hub, and see the routing in action.
30
+
Now you create the resources to which the messages will be routed, run an app to send messages to the hub, and see the routing in action.
31
31
32
32
## Create a Logic App
33
33
@@ -65,11 +65,11 @@ The Service Bus queue is to be used for receiving messages designated as critica
65
65
66
66

67
67
68
-
Select the Service Bus namespace. This tutorial uses **ContosoSBNamespace5906**. When you select the namespace, the portal queries the Service Bus namespace to retrieve the keys. Select **RootManageSharedAccessKey** and select **Create**.
68
+
Select the Service Bus namespace. This tutorial uses **ContosoSBNamespace**. When you select the namespace, the portal queries the Service Bus namespace to retrieve the keys. Select **RootManageSharedAccessKey** and select **Create**.
69
69
70
70

71
71
72
-
6. On the next screen, select the name of the queue (this tutorial uses **contososbqueue5906**) from the dropdown list. You can use the defaults for the rest of the fields.
72
+
6. On the next screen, select the name of the queue (this tutorial uses **contososbqueue**) from the dropdown list. You can use the defaults for the rest of the fields.
@@ -121,7 +121,7 @@ To see the data in a Power BI visualization, first set up a Stream Analytics job
121
121
122
122
**Subscription**: Select the Azure subscription you're using for this tutorial.
123
123
124
-
**IoT Hub**: Select the IoT hub. This tutorial uses **ContosoTestHub5906**.
124
+
**IoT Hub**: Select the IoT hub. This tutorial uses **ContosoTestHub**.
125
125
126
126
**Endpoint**: Select **Messaging**. (If you select Operations Monitoring, you get the telemetry data about the IoT hub rather than the data you're sending through.)
127
127
@@ -143,8 +143,6 @@ To see the data in a Power BI visualization, first set up a Stream Analytics job
143
143
144
144
**Output alias**: The unique alias for the output. This tutorial uses **contosooutputs**.
145
145
146
-
**Group workspace**: The Power BI workspace to use. You can leave it with "Authorize connection to load workspaces," or select one of your Power BI workspaces from the dropdown.
147
-
148
146
**Dataset name**: Name of the dataset to be used in Power BI. This tutorial uses **contosodataset**.
149
147
150
148
**Table name**: Name of the table to be used in Power BI. This tutorial uses **contosotable**.
@@ -188,7 +186,7 @@ If you didn't download the files from the repository in Part 1 of this tutorial,
188
186
Double-click on the solution file (IoT_SimulatedDevice.sln) to open the code in Visual Studio, then open Program.cs. Substitute `{your hub name}` with the IoT hub host name. The format of the IoT hub host name is **{iot-hub-name}.azure-devices.net**. For this tutorial, the hub host name is **ContosoTestHub.azure-devices.net**. Next, substitute `{your device key}` with the device key you saved earlier when setting up the simulated device.
// This is the primary key for the device. This is in the portal.
194
192
// Find your IoT hub in the portal > IoT devices > select your device > copy the key.
@@ -253,7 +251,7 @@ Now, with the application still running, set up the Power BI visualization to se
253
251
254
252
A line chart is created. The x-axis displays date and time in the UTC time zone. The y-axis displays temperature from the sensor.
255
253
256
-
6. Create another line chart to show real-time humidity over time. To set up the second chart, follow the same process for the first chart, but place**EventEnqueuedUtcTime** on the x-axis (**Axis**) and **humidity** on the y-axis (**Values**).
254
+
6. Create another line chart to show real-time humidity over time. To set up the second chart, follow the same process for the first chart, placing**EventEnqueuedUtcTime** on the x-axis (**Axis**) and **humidity** on the y-axis (**Values**).
257
255
258
256

259
257
@@ -269,7 +267,11 @@ You can refresh the charts to see the most recent data by selecting the Refresh
269
267
270
268
## Clean up resources
271
269
272
-
If you want to remove all of the Azure resources you've created through both parts of this tutorial, delete the resource group. This action deletes all resources contained within the group. In this case, it removes the IoT hub, the Service Bus namespace and queue, the Logic App, the storage account, and the resource group itself. You can delete the resource group in the portal, or with Azure CLI or PowerShell as described below.
270
+
If you want to remove all of the Azure resources you've created through both parts of this tutorial, delete the resource group. This action deletes all resources contained within the group. In this case, it removes the IoT hub, the Service Bus namespace and queue, the Logic App, the storage account, and the resource group itself. You can also remove the Power BI resources and clear the emails sent during the tutorial.
271
+
272
+
### Clean up resources in the Power BI visualization
273
+
274
+
Sign in to your [Power BI](https://powerbi.microsoft.com/) account. Go to your workspace. This tutorial uses **My Workspace**. To remove the Power BI visualization, go to DataSets and select the trash can icon to delete the dataset. This tutorial uses **contosodataset**. When you remove the dataset, the report is removed as well.
273
275
274
276
### Use the Azure CLI to clean up resources
275
277
@@ -286,9 +288,6 @@ To remove the resource group, use the [Remove-AzResourceGroup](https://docs.micr
286
288
```azurepowershell-interactive
287
289
Remove-AzResourceGroup -Name $resourceGroup
288
290
```
289
-
### Clean up resources in the Power BI visualization
290
-
291
-
Sign in to your [Power BI](https://powerbi.microsoft.com/) account. Go to your workspace. This tutorial uses **My Workspace**. To remove the Power BI visualization, go to DataSets and select the trash can icon to delete the dataset. This tutorial uses **contosodataset**. When you remove the dataset, the report is removed as well.
0 commit comments