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/module-twin-getstarted-cli.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ This article shows you how to create an Azure CLI session in which you:
34
34
35
35
* An IoT Hub. Create one with the [CLI](iot-hub-create-using-cli.md) or the [Azure portal](iot-hub-create-through-portal.md).
36
36
37
-
* Make sure that port 8883 is open in your firewall. The device sample in this article uses MQTT protocol, which communicates over port 8883. This port can be blocked in some corporate and educational network environments. For more information and ways to work around this issue, see [Connecting to IoT Hub (MQTT)](iot-hub-mqtt-support.md#connecting-to-iot-hub).
37
+
* Make sure that port 8883 is open in your firewall. The samples in this article use MQTT protocol, which communicates over port 8883. This port can be blocked in some corporate and educational network environments. For more information and ways to work around this issue, see [Connecting to IoT Hub (MQTT)](iot-hub-mqtt-support.md#connecting-to-iot-hub).
38
38
39
39
## Prepare the Cloud Shell
40
40
@@ -91,23 +91,24 @@ To create a device identity and module identity:
az iot hub module-identity create --device-id {DeviceName} --hub-name {HubName} \
98
+
--module-id {ModuleName}
98
99
```
99
100
100
101
## Update the module twin
101
102
102
-
Once a module identity is created, a module twin is implicitly created in IoT Hub. In this section, you use the CLI session to update a set of desired properties for the module twin associated with the module identity you created in the previous section.
103
+
Once a module identity is created, a module twin is implicitly created in IoT Hub. In this section, you use the CLI session to update a set of desired properties on the module twin associated with the module identity you created in the previous section.
103
104
104
-
1. In the CLI session, run the [az iot hub module-twin update](/cli/azure/iot/hub#az-iot-hub-module-twin-update) command, replacing the following placeholders with their corresponding values. In this example, we're updating multiple desired properties.
105
+
1. In the CLI session, run the [az iot hub module-twin update](/cli/azure/iot/hub#az-iot-hub-module-twin-update) command, replacing the following placeholders with their corresponding values. In this example, we're updating multiple desired properties on the module twin for the module identity we created in the previous section.
105
106
106
107
*{DeviceName}*. The name of your device.
107
108
108
109
*{HubName}*. The name of your IoT hub.
109
110
110
-
*{ModuleName}*. The name of your module.
111
+
*{ModuleName}*. The name of your device's module.
111
112
112
113
```azurecli
113
114
az iot hub module-twin update --device-id {DeviceName} --hub-name {HubName} \
0 commit comments