Skip to content

Commit 7376fc9

Browse files
committed
CLI updates for assets
1 parent dd44df4 commit 7376fc9

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

articles/iot-operations/discover-manage-assets/howto-manage-assets-remotely.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ To sign in to the operations experience, go to the [operations experience](https
5656

5757
## Select your site
5858

59-
After you sign in, the web UI displays a list of sites. Each site is a collection of Azure IoT Operations instances where you can configure and manage your assets. A site typically represents a physical location where you have physical assets deployed. Sites make it easier for you to locate and manage assets. Your [IT administrator is responsible for grouping instances in to sites](/azure/azure-arc/site-manager/overview). Any Azure IoT Operations instances that aren't assigned to a site appear in the **Unassigned instances** node. Select the site that you want to use:
59+
After you sign in, the operations experience displays a list of sites. Each site is a collection of Azure IoT Operations instances where you can configure and manage your assets. A site typically represents a physical location where you have physical assets deployed. Sites make it easier for you to locate and manage assets. Your [IT administrator is responsible for grouping instances in to sites](/azure/azure-arc/site-manager/overview). Any Azure IoT Operations instances that aren't assigned to a site appear in the **Unassigned instances** node. Select the site that you want to use:
6060

6161
:::image type="content" source="media/howto-manage-assets-remotely/site-list.png" alt-text="Screenshot that shows a list of sites in the operations experience.":::
6262

@@ -116,7 +116,7 @@ An Azure IoT Operations deployment can include an optional built-in OPC PLC simu
116116
Run the following command:
117117

118118
```azurecli
119-
az iot ops asset endpoint create --name opc-ua-connector-0 --target-address opc.tcp://opcplc-000000:50000 -g {your resource group name} --cluster {your cluster name}
119+
az iot ops asset endpoint opcua create --name opc-ua-connector-0 --target-address opc.tcp://opcplc-000000:50000 -g {your resource group name} --instance {your instance name}
120120
```
121121

122122
> [!TIP]
@@ -153,7 +153,7 @@ To use the `UsernamePassword` authentication mode, complete the following steps:
153153
1. Use a command like the following example to create your asset endpoint:
154154

155155
```azurecli
156-
az iot ops asset endpoint create --name opc-ua-connector-0 --target-address opc.tcp://opcplc-000000:50000 -g {your resource group name} --cluster {your cluster name} --username-ref "aio-opc-ua-broker-user-authentication/username" --password-ref "aio-opc-ua-broker-user-authentication/password"
156+
az iot ops asset endpoint opcua create --name opc-ua-connector-0 --target-address opc.tcp://opcplc-000000:50000 -g {your resource group name} --instance {your instance name} --username-ref "aio-opc-ua-broker-user-authentication/username" --password-ref "aio-opc-ua-broker-user-authentication/password"
157157
```
158158
159159
---
@@ -261,15 +261,23 @@ You can import up to 1000 OPC UA tags at a time from a CSV file:
261261
262262
# [Azure CLI](#tab/cli)
263263
264-
Use the following command to add a "thermostat" asset by using the Azure CLI. The command adds two tags to the asset by using the `--data` parameter:
264+
Use the following commands to add a "thermostat" asset by using the Azure CLI. The commands add two tags/datapoints to the asset by using the `point add` command:
265265
266266
```azurecli
267-
az iot ops asset create --name thermostat -g {your resource group name} --cluster {your cluster name} --endpoint opc-ua-connector-0 --description 'A simulated thermostat asset' --data data_source='ns=3;s=FastUInt10', name=temperature --data data_source='ns=3;s=FastUInt100', name='Tag 10'
267+
# Create the asset
268+
az iot ops asset create --name thermostat -g {your resource group name} --instance {your instance name} --endpoint opc-ua-connector-0 --description 'A simulated thermostat asset'
269+
270+
# Add the datapoints
271+
az iot ops asset dataset point add --asset thermostat -g {your resource group name} --dataset default --data-source 'ns=3;s=FastUInt10' --name temperature
272+
az iot ops asset dataset point add --asset thermostat -g {your resource group name} --dataset default --data-source 'ns=3;s=FastUInt100' --name 'Tag 10'
273+
274+
# Show the datapoints
275+
az iot ops asset dataset show --asset thermostat -n default -g {your resource group name}
268276
```
269277

270278
When you create an asset by using the Azure CLI, you can define:
271279

272-
- Multiple tags by using the `--data` parameter multiple times.
280+
- Multiple datapoints/tags by using the `point add` command multiple times.
273281
- Multiple events by using the `--event` parameter multiple times.
274282
- Optional information for the asset such as:
275283
- Manufacturer
@@ -281,7 +289,7 @@ When you create an asset by using the Azure CLI, you can define:
281289
- Serial number
282290
- Documentation URI
283291
- Default values for sampling interval, publishing interval, and queue size.
284-
- Tag specific values for sampling interval, publishing interval, and queue size.
292+
- Datapoint specific values for sampling interval, publishing interval, and queue size.
285293
- Event specific values for sampling publishing interval, and queue size.
286294
- The observability mode for each tag and event
287295

@@ -330,7 +338,7 @@ Review your asset and OPC UA tag and event details and make any adjustments you
330338

331339
# [Azure CLI](#tab/cli)
332340

333-
When you create an asset by using the Azure CLI, you can define multiple events by using the `--event` parameter multiple times. The syntax for the `--event` parameter is similar to the `--data` parameter:
341+
When you create an asset by using the Azure CLI, you can define multiple events by using the `--event` parameter multiple times:
334342

335343
```azurecli
336344
az iot ops asset create --name thermostat -g {your resource group name} --cluster {your cluster name} --endpoint opc-ua-connector-0 --description 'A simulated thermostat asset' --event event_notifier='ns=3;s=FastUInt12', name=warning
@@ -343,6 +351,8 @@ For each event that you define, you can specify the:
343351
- Observability mode.
344352
- Queue size.
345353

354+
You can also use the a[z iot ops asset event](/cli/azure/iot/ops/asset/event) commands to add and remove events from an asset.
355+
346356
---
347357

348358
## Update an asset
@@ -393,7 +403,7 @@ az iot ops asset update --name thermostat --description 'A simulated thermostat
393403
To list the thermostat asset's tags, use the following command:
394404

395405
```azurecli
396-
az iot ops asset data-point list --asset thermostat -g {your resource group}
406+
az iot ops asset dataset show --asset thermostat --name default -g {your resource group}
397407
```
398408

399409
To list the thermostat asset's events, use the following command:
@@ -405,10 +415,10 @@ az iot ops asset event list --asset thermostat -g {your resource group}
405415
To add a new tag to the thermostat asset, use a command like the following example:
406416

407417
```azurecli
408-
az iot ops asset data-point add --asset thermostat -g {your resource group} --data-source 'ns=3;s=FastUInt1002' --name 'humidity'
418+
az iot ops asset dataset point add --asset thermostat -g {your resource group name} --dataset default --data-source 'ns=3;s=FastUInt1002' --name 'humidity'
409419
```
410420

411-
To delete a tag, use the `az iot ops asset data-point remove` command.
421+
To delete a tag, use the `az iot ops asset dataset point remove` command.
412422

413423
You can manage an asset's events by using the `az iot ops asset event` commands.
414424

15.1 KB
Loading

0 commit comments

Comments
 (0)