Skip to content

Commit 4df5ebc

Browse files
committed
edit pass: tutorial-message-enrichments
1 parent 6d94e6d commit 4df5ebc

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

articles/iot-hub/tutorial-message-enrichments.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ In this tutorial, you see two ways to create and configure the resources that ar
1919

2020
* The second method is to use an Azure Resource Manager template to create both the resources *and* the configurations for the message routing and message enrichments.
2121

22-
After the configurations for the message routing and message enrichments are finished, you use an application to send messages to the IoT hub. The hub then routes them to both storage containers. Only the messages sent to the endpoint for the enriched storage container are enriched.
22+
After the configurations for the message routing and message enrichments are finished, you use an application to send messages to the IoT hub. The hub then routes them to both storage containers. Only the messages sent to the endpoint for the **enriched** storage container are enriched.
2323

2424
Here are the tasks you perform to complete this tutorial:
2525

@@ -41,8 +41,8 @@ Here are the tasks you perform to complete this tutorial:
4141

4242
Download the [IoT C# samples](https://github.com/Azure-Samples/azure-iot-samples-csharp/archive/master.zip) from GitHub and unzip them. This repository has several applications, scripts, and Resource Manager templates in it. The ones to be used for this tutorial are as follows:
4343

44-
* For the manual method, there's a CLI script that's used to create the resources. This script is in /azure-iot-samples-csharp/iot-hub/Tutorials/Routing/SimulatedDevice/resources/iothub_msgenrichment_cli.azcli. This script creates the resources and configures the message routing. After you run this script, create the message enrichments manually by using the [Azure portal](https://portal.azure.com). Then run the Device Simulation app to see the enrichments working.
45-
* For the automated method, there's an Azure Resource Manager template. The template is in /azure-iot-samples-csharp/iot-hub/Tutorials/Routing/SimulatedDevice/resources/template_msgenrichments.json. This template creates the resources, configures the message routing, and then configures the message enrichments. After you load this template, run the Device Simulation app to see the enrichments working.
44+
* For the manual method, there's a CLI script that's used to create the resources. This script is in /azure-iot-samples-csharp/iot-hub/Tutorials/Routing/SimulatedDevice/resources/iothub_msgenrichment_cli.azcli. This script creates the resources and configures the message routing. After you run this script, create the message enrichments manually by using the [Azure portal](https://portal.azure.com).
45+
* For the automated method, there's an Azure Resource Manager template. The template is in /azure-iot-samples-csharp/iot-hub/Tutorials/Routing/SimulatedDevice/resources/template_msgenrichments.json. This template creates the resources, configures the message routing, and then configures the message enrichments.
4646
* The third application you use is the Device Simulation app, which you use to send messages to the IoT hub and test the message enrichments.
4747

4848
## Manually set up and configure by using the Azure CLI
@@ -82,16 +82,16 @@ Here are the resources created by the script. *Enriched* means that the resource
8282
| route Name 2 | ContosoStorageRouteEnriched |
8383

8484
```azurecli-interactive
85-
# This command retrieves the subscription ID of the current Azure account.
86-
# This field is used when you set up the routing queries.
85+
# This command retrieves the subscription id of the current Azure account.
86+
# This field is used when setting up the routing queries.
8787
subscriptionID=$(az account show --query id -o tsv)
8888
8989
# Concatenate this number onto the resources that have to be globally unique.
9090
# You can set this to "" or to a specific value if you don't want it to be random.
9191
# This retrieves a random value.
9292
randomValue=$RANDOM
9393
94-
# This command installs the IoT extension for the Azure CLI.
94+
# This command installs the IOT Extension for Azure CLI.
9595
# You only need to install this the first time.
9696
# You need it to create the device identity.
9797
az extension add --name azure-cli-iot-ext
@@ -120,7 +120,7 @@ az iot hub create --name $iotHubName \
120120
--sku S1 --location $location
121121
122122
# You need a storage account that will have two containers
123-
# --one for the original messages and
123+
# -- one for the original messages and
124124
# one for the enriched messages.
125125
# The storage account name must be globally unique,
126126
# so add a random value to the end.
@@ -134,7 +134,7 @@ az storage account create --name $storageAccountName \
134134
--sku Standard_LRS
135135
136136
# Get the primary storage account key.
137-
# You need this key to create the containers.
137+
# You need this to create the containers.
138138
storageAccountKey=$(az storage account keys list \
139139
--resource-group $resourceGroup \
140140
--account-name $storageAccountName \
@@ -158,9 +158,9 @@ az storage container create --name $containerName2 \
158158
az iot hub device-identity create --device-id $iotDeviceName \
159159
--hub-name $iotHubName
160160
161-
# Retrieve the information about the device identity, and then copy the primary key to
162-
# Notepad. You need this key to run the device simulation during the testing phase.
163-
# If you're using Cloud Shell, you can scroll the window back up to retrieve this value.
161+
# Retrieve the information about the device identity, then copy the primary key to
162+
# Notepad. You need this to run the device simulation during the testing phase.
163+
# If you are using Cloud Shell, you can scroll the window back up to retrieve this value.
164164
az iot hub device-identity show --device-id $iotDeviceName \
165165
--hub-name $iotHubName
166166
@@ -169,7 +169,7 @@ az iot hub device-identity show --device-id $iotDeviceName \
169169
# You're going to have two routes and two endpoints.
170170
# One route points to the first container ("original") in the storage account
171171
# and includes the original messages.
172-
# The other route points to the second container ("enriched") in the same storage account
172+
# The other points to the second container ("enriched") in the same storage account
173173
# and includes the enriched versions of the messages.
174174
175175
endpointType="azurestoragecontainer"
@@ -178,18 +178,18 @@ endpointName2="ContosoStorageEndpointEnriched"
178178
routeName1="ContosoStorageRouteOriginal"
179179
routeName2="ContosoStorageRouteEnriched"
180180
181-
# For both endpoints, retrieve the messages going to storage.
181+
# for both endpoints, retrieve the messages going to storage
182182
condition='level="storage"'
183183
184184
# Get the connection string for the storage account.
185-
# Adding "-o tsv" makes it be returned without the default double quotation marks around it.
185+
# Adding the "-o tsv" makes it be returned without the default double quotes around it.
186186
storageConnectionString=$(az storage account show-connection-string \
187187
--name $storageAccountName --query connectionString -o tsv)
188188
189189
# Create the routing endpoints and routes.
190190
# Set the encoding format to either avro or json.
191191
192-
# This is the endpoint for the first container, for endpoint messages that aren't enriched.
192+
# This is the endpoint for the first container, for endpoint messages that are not enriched.
193193
az iot hub routing-endpoint create \
194194
--connection-string $storageConnectionString \
195195
--endpoint-name $endpointName1 \
@@ -213,7 +213,7 @@ az iot hub routing-endpoint create \
213213
--resource-group $resourceGroup \
214214
--encoding json
215215
216-
# This is the route for messages that aren't enriched.
216+
# This is the route for messages that are not enriched.
217217
# Create the route for the first storage endpoint.
218218
az iot hub route create \
219219
--name $routeName1 \
@@ -236,7 +236,7 @@ az iot hub route create \
236236
--condition $condition
237237
```
238238

239-
At this point, the resources are all set up and the message routing is configured. You can view the message routing configuration in the portal and set up the message enrichments for messages going to the enriched storage container.
239+
At this point, the resources are all set up and the message routing is configured. You can view the message routing configuration in the portal and set up the message enrichments for messages going to the **enriched** storage container.
240240

241241
### Manually configure the message enrichments by using the Azure portal
242242

@@ -284,9 +284,9 @@ You can use a Resource Manager template to create and configure the resources, m
284284

285285
1. Select **Open** to load the template file from the local machine. It loads and appears in the edit pane.
286286

287-
This template is set up to use a globally unique IoT hub name and storage account name by adding a random value to the end of the default names. You can use the template without making any changes to it.
287+
This template is set up to use a globally unique IoT hub name and storage account name by adding a random value to the end of the default names, so you can use the template without making any changes to it.
288288

289-
Here are the resources created by loading the template. *Enriched* means that the resource is for messages with enrichments. *Original* means that the resource is for messages that aren't enriched. These are the same values used in the Azure CLI script.
289+
Here are the resources created by loading the template. **Enriched** means that the resource is for messages with enrichments. **Original** means that the resource is for messages that aren't enriched. These are the same values used in the Azure CLI script.
290290

291291
| Name | Value |
292292
|-----|-----|

0 commit comments

Comments
 (0)