az iot ops asset
Note
This reference is part of the azure-iot-ops extension for the Azure CLI (version 2.53.0 or higher). The extension will automatically install the first time you run an az iot ops asset command. Learn more about extensions.
Command group 'iot ops' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Asset management.
For more information on asset management, please see aka.ms/asset-overview.
Name | Description | Type | Status |
---|---|---|---|
az iot ops asset create |
Create an asset. |
Extension | Preview |
az iot ops asset dataset |
Manage datasets in an asset. |
Extension | Preview |
az iot ops asset dataset list |
List datasets within an asset. |
Extension | Preview |
az iot ops asset dataset point |
Manage data-points in an asset dataset. |
Extension | Preview |
az iot ops asset dataset point add |
Add a data point to an asset dataset. |
Extension | Preview |
az iot ops asset dataset point export |
Export data-points in an asset dataset. |
Extension | Preview |
az iot ops asset dataset point import |
Import data-points in an asset dataset. |
Extension | Preview |
az iot ops asset dataset point list |
List data-points in an asset dataset. |
Extension | Preview |
az iot ops asset dataset point remove |
Remove a data point in an asset dataset. |
Extension | Preview |
az iot ops asset dataset show |
Show a dataset within an asset. |
Extension | Preview |
az iot ops asset delete |
Delete an asset. |
Extension | Preview |
az iot ops asset endpoint |
Manage asset endpoint profiles. |
Extension | Preview |
az iot ops asset endpoint create |
Create asset endpoint profiles. |
Extension | Preview |
az iot ops asset endpoint create opcua |
Create an asset endpoint profile with an OPCUA connector. |
Extension | Preview |
az iot ops asset endpoint delete |
Delete an asset endpoint profile. |
Extension | Preview |
az iot ops asset endpoint query |
Query the Resource Graph for asset endpoint profiles. |
Extension | Preview |
az iot ops asset endpoint show |
Show an asset endpoint profile. |
Extension | Preview |
az iot ops asset endpoint update |
Update an asset endpoint profile. |
Extension | Preview |
az iot ops asset event |
Manage events in an asset. |
Extension | Preview |
az iot ops asset event add |
Add an event to an asset. |
Extension | Preview |
az iot ops asset event export |
Export events in an asset. |
Extension | Preview |
az iot ops asset event import |
Import events in an asset. |
Extension | Preview |
az iot ops asset event list |
List events in an asset. |
Extension | Preview |
az iot ops asset event remove |
Remove an event in an asset. |
Extension | Preview |
az iot ops asset query |
Query the Resource Graph for assets. |
Extension | Preview |
az iot ops asset show |
Show an asset. |
Extension | Preview |
az iot ops asset update |
Update an asset. |
Extension | Preview |
Command group 'iot ops' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Create an asset.
For examples of file formats, please see aka.ms/aziotops-assets.
az iot ops asset create --endpoint-profile
--instance
--name
--resource-group
[--attr]
[--dataset-publish-int]
[--dataset-queue-size]
[--dataset-sample-int]
[--description]
[--disable {false, true}]
[--display-name]
[--documentation-uri]
[--eai]
[--ef]
[--epi]
[--eqs]
[--esi]
[--event]
[--hardware-revision]
[--ig]
[--instance-subscription]
[--location]
[--manufacturer]
[--manufacturer-uri]
[--model]
[--pc]
[--serial-number]
[--software-revision]
[--tags]
[--topic-path]
[--topic-retain {Keep, Never}]
Create an asset using the given instance in the same resource group.
az iot ops asset create --name myasset -g myresourcegroup --endpoint-profile myassetendpoint --instance myinstance
Create an asset using the given instance in a different resource group but same subscription. Note that the Digital Operations Experience may not display the asset if it is in a different subscription from the instance.
az iot ops asset create --name myasset -g myresourcegroup --endpoint-profile myassetendpoint --instance myinstance --instance-resource-group myinstanceresourcegroup
Create a disabled asset using a file containing events.
az iot ops asset create --name myasset -g myresourcegroup --endpoint-profile myassetendpoint --instance myinstance --event-file /path/to/myasset_events.csv --disable
Create an asset with the given pre-filled values.
az iot ops asset create --name myasset -g myresourcegroup --endpoint-profile myassetendpoint --instance myinstance --event event_notifier=EventNotifier1 name=myEvent1 observability_mode=log sampling_interval=10 queue_size=2 --event event_notifier=EventNotifier2 name=myEvent2 --dataset-publish-int 1250 --dataset-queue-size 2 --dataset-sample-int 30 --event-publish-int 750 --event-queue-size 3 --event-sample-int 50 --description 'Description for a test asset.' --documentation-uri www.contoso.com --external-asset-id 000-000-1234 --hardware-revision 10.0 --product-code XXX100 --software-revision 0.1 --manufacturer Contoso --manufacturer-uri constoso.com --model AssetModel --serial-number 000-000-ABC10 --custom-attribute work_location=factory
Asset endpoint profile name.
Instance name to associate the created asset with.
Asset name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Space-separated key=value pairs corresponding to additional custom attributes for the asset. This parameter can be used more than once.
Default publishing interval for datasets.
Default queue size for datasets.
Default sampling interval (in milliseconds) for datasets.
Description.
Disable an asset.
Display name.
Documentation URI.
External asset Id.
File path for the file containing the events. The following file types are supported: json, csv, yaml.
Default publishing interval for events.
Default queue size for events.
Default sampling interval (in milliseconds) for events.
Space-separated key=value pairs corresponding to properties of the event to create. The following key values are supported: event_notifier
(required), name
(required), observability_mode
(none or log), sampling_interval
(int), queue_size
(int). --event can be used 1 or more times. Review help examples for full parameter usage.
Hardware revision.
Instance resource group. If not provided, asset resource group will be used.
Argument 'instance_subscription' has been deprecated and will be removed in a future release.
Instance subscription id. If not provided, asset subscription id will be used.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Manufacturer.
Manufacturer URI.
Model.
Product code.
Serial number.
Software revision.
Asset resource tags. Property bag in key-value pairs with the following format: a=b c=d.
Default topic path.
Default topic retain policy.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Command group 'iot ops' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Delete an asset.
az iot ops asset delete --name
--resource-group
Delete an asset.
az iot ops asset delete --name myasset -g myresourcegroup
Asset name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Command group 'iot ops' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Query the Resource Graph for assets.
az iot ops asset query [--cq]
[--description]
[--disabled {false, true}]
[--display-name]
[--documentation-uri]
[--eai]
[--endpoint-profile]
[--hardware-revision]
[--ig]
[--instance]
[--location]
[--manufacturer]
[--manufacturer-uri]
[--model]
[--name]
[--pc]
[--resource-group]
[--serial-number]
[--software-revision]
[--topic-path]
[--topic-retain {Keep, Never}]
Query for assets that are disabled within a given resource group.
az iot ops asset query -g myresourcegroup --disabled
Query for assets that have the given model, manufacturer, and serial number.
az iot ops asset query --model model1 --manufacturer contoso --serial-number 000-000-ABC10
Custom query to use. All other query arguments will be ignored.
Description.
State of asset.
Display name.
Documentation URI.
External asset Id.
Asset endpoint profile name.
Hardware revision.
Instance resource group. If not provided, asset resource group will be used.
Instance name to associate the created asset with.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Manufacturer.
Manufacturer URI.
Model.
Asset name.
Product code.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Serial number.
Software revision.
Default topic path.
Default topic retain policy.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Command group 'iot ops' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Show an asset.
az iot ops asset show --name
--resource-group
Show the details of an asset.
az iot ops asset show --name myasset -g myresourcegroup
Asset name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Command group 'iot ops' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Update an asset.
To update datasets and events, please use the command groups az iot ops asset dataset
and az iot ops asset event
respectively.
az iot ops asset update --name
--resource-group
[--attr]
[--dataset-publish-int]
[--dataset-queue-size]
[--dataset-sample-int]
[--description]
[--disable {false, true}]
[--display-name]
[--documentation-uri]
[--epi]
[--eqs]
[--esi]
[--hardware-revision]
[--manufacturer]
[--manufacturer-uri]
[--model]
[--pc]
[--serial-number]
[--software-revision]
[--tags]
[--topic-path]
[--topic-retain {Keep, Never}]
Update an asset's dataset and event defaults.
az iot ops asset update --name myasset -g myresourcegroup --dataset-publish-int 1250 --dataset-queue-size 2 --dataset-sample-int 30 --event-publish-int 750 --event-queue-size 3 --event-sample-int 50
Update an asset's description, documentation uri, hardware revision, product code, and software revision.
az iot ops asset update --name myasset -g myresourcegroup --description "Updated test asset description." --documentation-uri www.contoso.com --hardware-revision 11.0 --product-code XXX102 --software-revision 0.2
Update an asset's manufacturer, manufacturer uri, model, serial number, and custom attribute.
az iot ops asset update --name myasset -g myresourcegroup --manufacturer Contoso --manufacturer-uri constoso2.com --model NewAssetModel --serial-number 000-000-ABC11 --custom-attribute work_location=new_factory --custom-attribute secondary_work_location=factory
Disable an asset and remove a custom attribute called "work_site".
az iot ops asset update --name myasset -g myresourcegroup --disable --custom-attribute work_site=""
Asset name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Space-separated key=value pairs corresponding to additional custom attributes for the asset. This parameter can be used more than once.To remove a custom attribute, please set the attribute's value to "".
Default publishing interval for datasets.
Default queue size for datasets.
Default sampling interval (in milliseconds) for datasets.
Description.
Disable an asset.
Display name.
Documentation URI.
Default publishing interval for events.
Default queue size for events.
Default sampling interval (in milliseconds) for events.
Hardware revision.
Manufacturer.
Manufacturer URI.
Model.
Product code.
Serial number.
Software revision.
Asset resource tags. Property bag in key-value pairs with the following format: a=b c=d.
Default topic path.
Default topic retain policy.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Azure CLI feedback
Azure CLI is an open source project. Select a link to provide feedback: