Skip to content

Commit 777745c

Browse files
committed
Add asset import export sections.
1 parent d9f83d9 commit 777745c

File tree

3 files changed

+95
-0
lines changed

3 files changed

+95
-0
lines changed

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

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,41 @@ To use the `UsernamePassword` authentication mode, complete the following steps:
156156
157157
---
158158
159+
### Import and export asset endpoints
160+
161+
Use the **Import** and **Export** buttons to import or export an asset endpoint in the operations experience:
162+
163+
:::image type="content" source="media/howto-manage-assets-remotely/export-import-asset-endpoints.png" alt-text="Screenshot showing the options to import and export an asset endpoint.":::
164+
165+
The JSON file that you export contains the asset endpoint definition. You can use this file to import the asset endpoint into another instance of Azure IoT Operations or modify it to create a new asset endpoint in the current instance:
166+
167+
```yml
168+
{
169+
"name": "<your asset endpoint name>",
170+
"type": "microsoft.deviceregistry/assetendpointprofiles",
171+
"location": "<your location>",
172+
"extendedLocation": {
173+
"type": "CustomLocation",
174+
"name": "/subscriptions/<your subscription id>/resourceGroups/<your resource group>/providers/Microsoft.ExtendedLocation/customLocations/<your custom location>"
175+
},
176+
"properties": {
177+
"targetAddress": "<your target address>",
178+
"endpointProfileType": "Microsoft.OpcUa",
179+
"additionalConfiguration": "{\"runAssetDiscovery\":true}",
180+
"authentication": {
181+
"method": "Anonymous"
182+
}
183+
},
184+
"apiVersion": "2024-11-01"
185+
}
186+
```
187+
188+
> [!TIP]
189+
> Export an existing asset endpoint to discover the `extendedLocation Name` value.
190+
191+
> [!TIP]
192+
> You can also use the `az iot ops asset endpoint show` and `az iot ops asset endpoint create` commands to view and create asset endpoints.
193+
159194
## Add an asset, tags, and events
160195

161196
# [Operations experience](#tab/portal)
@@ -441,6 +476,66 @@ az iot ops asset delete --name thermostat -g {your resource group name}
441476

442477
---
443478

479+
## Import and export assets
480+
481+
Use the **Import** and **Export** buttons to import or export an asset in the operations experience:
482+
483+
:::image type="content" source="media/howto-manage-assets-remotely/export-import-assets.png" alt-text="Screenshot showing the options to import and export an asset.":::
484+
485+
The JSON file that you export contains the asset definition. You can use this file to import the asset into another instance of Azure IoT Operations or modify it to create a new asset in the current instance. The following JSON example shows an example import file to use to create a thermostat asset:
486+
487+
```yml
488+
{
489+
"name": "thermostat",
490+
"type": "microsoft.deviceregistry/assets",
491+
"location": "<your location>",
492+
"extendedLocation": {
493+
"type": "CustomLocation",
494+
"name": "/subscriptions/<your subscription id>/resourceGroups/<your resource group>/providers/Microsoft.ExtendedLocation/customLocations/<your custom location>"
495+
},
496+
"properties": {
497+
"enabled": true,
498+
"displayName": "thermostat",
499+
"description": "A simulated thermostat asset",
500+
"assetEndpointProfileRef": "opc-ua-connector-1",
501+
"version": 1,
502+
"attributes": {
503+
"batch": "102",
504+
"customer": "Contoso",
505+
"equipment": "Boiler",
506+
"isSpare": "true",
507+
"location": "Seattle"
508+
},
509+
"defaultDatasetsConfiguration": "{\"publishingInterval\":1000,\"samplingInterval\":1000,\"queueSize\":1}",
510+
"defaultEventsConfiguration": "{\"publishingInterval\":1000,\"queueSize\":1}",
511+
"defaultTopic": {
512+
"path": "azure-iot-operations/data/thermostat",
513+
"retain": "Never"
514+
},
515+
"datasets": [
516+
{
517+
"name": "default",
518+
"dataPoints": [
519+
{
520+
"name": "temperature",
521+
"dataSource": "ns=3;s=SpikeData",
522+
"observabilityMode": "None",
523+
"dataPointConfiguration": "{}"
524+
}
525+
]
526+
}
527+
]
528+
},
529+
"apiVersion": "2024-11-01"
530+
}
531+
```
532+
533+
> [!TIP]
534+
> Export an existing asset endpoint to discover the `extendedLocation Name` value.
535+
536+
> [!TIP]
537+
> You can also use the `az iot ops asset show` and `az iot ops asset create` commands to view and create asset endpoints.
538+
444539
## Notifications
445540

446541
Whenever you make a change to asset in the operations experience, you see a notification that reports the status of the operation:
Loading
52 KB
Loading

0 commit comments

Comments
 (0)