Skip to content

Commit 42de540

Browse files
Merge pull request #274933 from kgremban/may9-clideprecated
Remove deprecated cli commands
2 parents b28c2a5 + 9878d2a commit 42de540

File tree

4 files changed

+17
-23
lines changed

4 files changed

+17
-23
lines changed

articles/iot-dps/quick-setup-auto-provision-cli.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ az iot dps create --name my-sample-dps --resource-group my-sample-resource-group
6464
6565
## Get the connection string for the IoT hub
6666

67-
You need your IoT hub's connection string to link it with the Device Provisioning Service. Use the [az iot hub show-connection-string](/cli/azure/iot/hub#az-iot-hub-show-connection-string) command to get the connection string and use its output to set a variable that's used later, when you link the two resources.
67+
You need your IoT hub's connection string to link it with the Device Provisioning Service. Use the [az iot hub connection-string show](/cli/azure/iot/hub/connection-string#az-iot-hub-connection-string-show) command to get the connection string and use its output to set a variable that's used later, when you link the two resources.
6868

6969
The following example sets the *hubConnectionString* variable to the value of the connection string for the primary key of the hub's *iothubowner* policy (the `--policy-name` parameter can be used to specify a different policy). Trade out *my-sample-hub* for the unique IoT hub name you chose earlier. The command uses the Azure CLI [query](/cli/azure/query-azure-cli) and [output](/cli/azure/format-output-azure-cli#tsv-output-format) options to extract the connection string from the command output.
7070

7171
```azurecli-interactive
72-
hubConnectionString=$(az iot hub show-connection-string --name my-sample-hub --key primary --query connectionString -o tsv)
72+
hubConnectionString=$(az iot hub connection-string show --name my-sample-hub --key primary --query connectionString -o tsv)
7373
```
7474

7575
You can use the `echo` command to see the connection string.
@@ -80,7 +80,7 @@ echo $hubConnectionString
8080

8181
> [!NOTE]
8282
> These two commands are valid for a host running under Bash.
83-
>
83+
>
8484
> If you're using a local Windows/CMD shell or a PowerShell host, modify the commands to use the correct syntax for that environment.
8585
>
8686
> If you're using Azure Cloud Shell, check that the environment drop-down on the left side of the shell window says **Bash**.

articles/iot-dps/tutorial-custom-allocation-policies.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ For the example in this tutorial, use the following two device registration IDs
370370
* **breakroom499-contoso-tstrsd-007**
371371
* **mainbuilding167-contoso-hpsd-088**
372372
373-
The IoT extension for the Azure CLI provides the [`iot dps enrollment-group compute-device-key`](/cli/azure/iot/dps/enrollment-group#az-iot-dps-enrollment-group-compute-device-key) command for generating derived device keys. This command can be used on Windows-based or Linux systems, from PowerShell or a Bash shell.
373+
The IoT extension for the Azure CLI provides the [iot dps enrollment-group compute-device-key](/cli/azure/iot/dps/enrollment-group#az-iot-dps-enrollment-group-compute-device-key) command for generating derived device keys. This command can be used on Windows-based or Linux systems, from PowerShell or a Bash shell.
374374
375375
Replace the value of `--key` argument with the **Primary Key** from your enrollment group.
376376
@@ -379,7 +379,7 @@ az iot dps enrollment-group compute-device-key --key <ENROLLMENT_GROUP_KEY> --re
379379
```
380380

381381
```azurecli
382-
az iot dps compute-device-key --key <ENROLLMENT_GROUP_KEY> --registration-id mainbuilding167-contoso-hpsd-088
382+
az iot dps enrollment-group compute-device-key --key <ENROLLMENT_GROUP_KEY> --registration-id mainbuilding167-contoso-hpsd-088
383383
```
384384

385385
> [!NOTE]

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

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -145,29 +145,26 @@ Create a second endpoint and route for the enriched messages.
145145
routeName=ContosoStorageRouteEnriched
146146
```
147147

148-
1. Use the [az iot hub routing-endpoint create](/cli/azure/iot/hub/routing-endpoint#az-iot-hub-routing-endpoint-create) command to create a custom endpoint that points to the storage container you made in the previous section.
148+
1. Use the [az iot hub message-endpoint create](/cli/azure/iot/hub/message-endpoint#az-iot-hub-message-endpoint-create-storage-container) command to create a custom endpoint that points to the storage container you made in the previous section.
149149

150150
```azurecli-interactive
151-
az iot hub routing-endpoint create \
151+
az iot hub message-endpoint create \
152152
--connection-string $(az storage account show-connection-string --name $storageName --query connectionString -o tsv) \
153153
--endpoint-name $endpointName \
154-
--endpoint-resource-group $resourceGroup \
155-
--endpoint-subscription-id $(az account show --query id -o tsv) \
156-
--endpoint-type azurestoragecontainer
157154
--hub-name $hubName \
158155
--container $containerName \
159156
--resource-group $resourceGroup \
160157
--encoding json
161158
```
162159

163-
1. Use the [az iot hub route create](/cli/azure/iot/hub/route#az-iot-hub-route-create) command to create a route that passes any message where `level=storage` to the storage container endpoint.
160+
1. Use the [az iot hub message-route create](/cli/azure/iot/hub/message-route#az-iot-hub-message-route-create) command to create a route that passes any message where `level=storage` to the storage container endpoint.
164161

165162
```azurecli-interactive
166-
az iot hub route create \
167-
--name $routeName \
163+
az iot hub message-route create \
164+
--route-name $routeName \
168165
--hub-name $hubName \
169166
--resource-group $resourceGroup \
170-
--source devicemessages \
167+
--source-type devicemessages \
171168
--endpoint-name $endpointName \
172169
--enabled true \
173170
--condition 'level="storage"'

articles/iot-hub/tutorial-routing.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -302,29 +302,26 @@ Now set up the routing for the storage account. In this section you define a new
302302
routeName=ROUTE_NAME
303303
```
304304

305-
1. Use the [az iot hub routing-endpoint create](/cli/azure/iot/hub/routing-endpoint#az-iot-hub-routing-endpoint-create) command to create a custom endpoint that points to the storage container you made in the previous section.
305+
1. Use the [az iot hub message-endpoint create](/cli/azure/iot/hub/message-endpoint/create#az-iot-hub-message-endpoint-create-storage-container) command to create a custom endpoint that points to the storage container you made in the previous section.
306306

307307
```azurecli-interactive
308-
az iot hub routing-endpoint create \
308+
az iot hub message-endpoint create storage-container \
309309
--connection-string $(az storage account show-connection-string --name $storageName --query connectionString -o tsv) \
310310
--endpoint-name $endpointName \
311-
--endpoint-resource-group $resourceGroup \
312-
--endpoint-subscription-id $(az account show --query id -o tsv) \
313-
--endpoint-type azurestoragecontainer
314311
--hub-name $hubName \
315312
--container $containerName \
316313
--resource-group $resourceGroup \
317314
--encoding json
318315
```
319316

320-
1. Use the [az iot hub route create](/cli/azure/iot/hub/route#az-iot-hub-route-create) command to create a route that passes any message where `level=storage` to the storage container endpoint.
317+
1. Use the [az iot hub message-route create](/cli/azure/iot/hub/message-route#az-iot-hub-message-route-create) command to create a route that passes any message where `level=storage` to the storage container endpoint.
321318

322319
```azurecli-interactive
323-
az iot hub route create \
324-
--name $routeName \
320+
az iot hub message-route create \
321+
--route-name $routeName \
325322
--hub-name $hubName \
326323
--resource-group $resourceGroup \
327-
--source devicemessages \
324+
--source-type devicemessages \
328325
--endpoint-name $endpointName \
329326
--enabled true \
330327
--condition 'level="storage"'

0 commit comments

Comments
 (0)