Skip to content

Commit 6cda466

Browse files
committed
added CLI commands. Removed PowerShell per Phil
1 parent 25fb642 commit 6cda466

File tree

1 file changed

+29
-5
lines changed

1 file changed

+29
-5
lines changed

articles/iot-hub/iot-hub-devguide-messages-c2d.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,23 +133,47 @@ Each IoT hub exposes the following configuration options for cloud-to-device mes
133133
| maxDeliveryCount | Maximum delivery count for cloud-to-device per-device queues | 1 to 100; default: 10 |
134134
| feedback.ttlAsIso8601 | Retention for service-bound feedback messages | ISO_8601 interval up to 2 days (minimum 1 minute); default: 1 hour |
135135
| feedback.maxDeliveryCount | Maximum delivery count for the feedback queue | 1 to 100; default: 100 |
136+
| feedback.lockDurationAsIso8601 | Maximum delivery count for the feedback queue | 5 to 300 seconds (minimum 5 seconds); default: 60 seconds. |
136137

137138
You can set the configuration options in one of the following ways:
138139

139140
* **Azure portal**: Under **Settings** on your IoT hub, select **Built-in endpoints** and expand **Cloud to device messaging**. (Setting the **feedback.maxDeliveryCount** property is not currently supported in Azure portal.)
140141

141-
* **Azure CLI**: Use the `c2d-ttl`, `c2d-max-delivery-count`, `feedback-ttl`, and `feedback-max-delivery-count` parameters in the [az iot hub update](https://docs.microsoft.com/cli/azure/iot/hub?view=azure-cli-latest#az-iot-hub-update) command. For example, the following command sets the **feedback.maxDeliveryCount** property:
142+
* **Azure CLI**: Use the [az iot hub update](https://docs.microsoft.com/cli/azure/iot/hub?view=azure-cli-latest#az-iot-hub-update) command:
142143

143144
```azurecli
144-
az iot hub update --name <your IoT hub name> --feedback-max-delivery-count 9
145+
az iot hub update --name {your IoT hub name} --c2d-ttl PT1H0M0S
146+
147+
az iot hub update --name {your IoT hub name} --c2d-max-delivery-count 10
148+
149+
az iot hub update --name {your IoT hub name} --feedback-ttl PT1H0M0S
150+
151+
az iot hub update --name {your IoT hub name} --feedback-max-delivery-count 100
152+
153+
az iot hub update --name {your IoT hub name} --feedback-lock-duration 60
145154
```
146155
147-
* **PowerShell**: Use the `-CloudToDevice` parameter in the [Set-AzIoTHub](https://docs.microsoft.com/powershell/module/az.iothub/set-aziothub) command. For example, the following command sets the **feedback.maxDeliveryCount** property:
156+
You can also use the generic `set` parameter to set configuration options:
157+
158+
```azurecli
159+
az iot hub update --name {your IoT hub name} \
160+
--set properties.cloudToDevice.defaultTtlAsIso8601 PT1H0M0S
148161
149-
```azurepowershell
150-
162+
az iot hub update --name {your IoT hub name} \
163+
--set properties.cloudToDevice.maxDeliveryCount 10
164+
165+
az iot hub update --name {your IoT hub name} \
166+
--set properties.cloudToDevice.feedback.ttlAsIso8601 PT1H0M0S
167+
168+
az iot hub update --name {your IoT hub name} \
169+
--set properties.cloudToDevice.feedback.maxDeliveryCount 100
170+
171+
az iot hub update --name {your IoT hub name} \
172+
--set properties.cloudToDevice.feedback.lockDurationAsIso8601 60
151173
```
152174
175+
176+
153177
## Next steps
154178
155179
For information about the SDKs that you can use to receive cloud-to-device messages, see [Azure IoT SDKs](iot-hub-devguide-sdks.md).

0 commit comments

Comments
 (0)