az iot ops ns asset datapoint
Note
This reference is part of the azure-iot-ops extension for the Azure CLI (version 2.70.0 or higher). The extension will automatically install the first time you run an az iot ops ns asset datapoint command. Learn more about extensions.
Manage data points for asset datasets in IoT Operations namespaces.
The connector type is detected automatically from the existing asset. For connector-specific parameters use --datapoint-config (inline JSON or file). Use --show-template to discover the supported configuration schema for the asset's connector type.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az iot ops ns asset datapoint add |
Add a datapoint to an asset dataset in an IoT Operations namespace. |
Extension | Preview |
| az iot ops ns asset datapoint export |
Export datapoints to file. |
Extension | Preview |
| az iot ops ns asset datapoint import |
Import datapoints from file. |
Extension | Preview |
| az iot ops ns asset datapoint list |
List data points for an asset dataset in an IoT Operations namespace. |
Extension | Preview |
| az iot ops ns asset datapoint remove |
Remove a datapoint from an asset dataset in an IoT Operations namespace. |
Extension | Preview |
az iot ops ns asset datapoint add
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Add a datapoint to an asset dataset in an IoT Operations namespace.
The connector type is detected from the asset's device endpoint. Connector-specific configuration (queue size, sampling interval, etc.) can be supplied via --datapoint-config. Use --show-template to discover the supported config schema. For non-OPC UA connectors, a connector template must exist in the instance.
az iot ops ns asset datapoint add --asset
--data-source --ds
--dataset
--instance
--name
--resource-group
[--acquire-policy-token]
[--change-reference]
[--datapoint-config --dpc]
[--replace {false, true}]
[--show-template {config, schema}]
[--tr --type-ref]
Examples
Add a basic datapoint to any asset type
az iot ops ns asset datapoint add --asset myasset --instance myInstance -g myInstanceResourceGroup --dataset default --name temp1 --data-source "ns=2;s=Temp1"
Show the datapoint config template for the asset's connector type
az iot ops ns asset datapoint add --asset myasset --instance myInstance -g myInstanceResourceGroup --dataset default --name temp1 --data-source "ns=2;s=Temp1" --show-template config
Add a datapoint with connector-specific configuration from inline JSON
az iot ops ns asset datapoint add --asset myasset --instance myInstance -g myInstanceResourceGroup --dataset default --name temp1 --data-source "ns=2;s=Temp1" --datapoint-config '{"datapointConfiguration": {"samplingInterval": 1000, "queueSize": 5}}'
Add a datapoint with configuration from a file
az iot ops ns asset datapoint add --asset myasset --instance myInstance -g myInstanceResourceGroup --dataset default --name temp1 --data-source "ns=2;s=Temp1" --datapoint-config ./datapoint_config.json
Replace an existing datapoint
az iot ops ns asset datapoint add --asset myasset --instance myInstance -g myInstanceResourceGroup --dataset default --name temp1 --data-source "ns=3;s=NewTemp" --replace
Required Parameters
Asset name.
Data source for the data point.
Dataset name.
The name of the Azure IoT Operations instance.
Data point name.
The resource group of the Azure IoT Operations instance.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Inline JSON string or path to a JSON/YAML file (.json, .yaml, .yml) containing connector-specific datapoint configuration. Accepted key is 'datapointConfiguration' (connector-specific config object). Use --show-template to discover the supported keys and schema for the asset's connector type. Cannot be combined with --show-template. For non-OPC UA connectors, a connector template must exist in the instance.
Replace the data point if another point with the same name is already present.
| Property | Value |
|---|---|
| Default value: | False |
| Accepted values: | false, true |
Show a starter datapoint configuration template for the asset's connector type and exit without modifying the datapoint. The connector type is read from the existing asset. config: fields shown with their default values (null if no default); output is directly usable as --datapoint-config input. schema: every field includes type, default, and constraints (min, max, enum, pattern). Draft-07 $ref pointers (#/definitions/...) are resolved inline in both modes.
| Property | Value |
|---|---|
| Accepted values: | config, schema |
Type definition ID or URI.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
| Property | Value |
|---|---|
| Default value: | False |
az iot ops ns asset datapoint export
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Export datapoints to file.
az iot ops ns asset datapoint export --asset
--dataset
--instance
--resource-group
[--acquire-policy-token]
[--change-reference]
[--format {csv, json, yaml}]
[--od --output-dir]
[--replace {false, true}]
Examples
Export datapoints to JSON
az iot ops ns asset datapoint export --asset myasset --instance myInstance -g myInstanceResourceGroup --dataset default
Required Parameters
Asset name.
Dataset name.
The name of the Azure IoT Operations instance.
The resource group of the Azure IoT Operations instance.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Export file format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | csv, json, yaml |
Output directory for export.
| Property | Value |
|---|---|
| Default value: | . |
Replace the local file if present.
| Property | Value |
|---|---|
| Default value: | False |
| Accepted values: | false, true |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
| Property | Value |
|---|---|
| Default value: | False |
az iot ops ns asset datapoint import
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Import datapoints from file.
az iot ops ns asset datapoint import --asset
--dataset
--if --input-file
--instance
--resource-group
[--acquire-policy-token]
[--change-reference]
[--replace {false, true}]
Examples
Import datapoints from a JSON file
az iot ops ns asset datapoint import --asset myasset --instance myInstance -g myInstanceResourceGroup --dataset default --input-file ./datapoints.json
Required Parameters
Asset name.
Dataset name.
Path to import file (JSON, YAML, or CSV).
The name of the Azure IoT Operations instance.
The resource group of the Azure IoT Operations instance.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Replace existing data points that share a name with an imported data point.
| Property | Value |
|---|---|
| Default value: | False |
| Accepted values: | false, true |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
| Property | Value |
|---|---|
| Default value: | False |
az iot ops ns asset datapoint list
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List data points for an asset dataset in an IoT Operations namespace.
az iot ops ns asset datapoint list --asset
--dataset
--instance
--resource-group
Examples
List all data points for a dataset
az iot ops ns asset datapoint list --asset myasset --instance myInstance -g myInstanceResourceGroup --dataset default
Required Parameters
Asset name.
Dataset name.
The name of the Azure IoT Operations instance.
The resource group of the Azure IoT Operations instance.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
| Property | Value |
|---|---|
| Default value: | False |
az iot ops ns asset datapoint remove
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Remove a datapoint from an asset dataset in an IoT Operations namespace.
az iot ops ns asset datapoint remove --asset
--dataset
--instance
--name
--resource-group
[--acquire-policy-token]
[--change-reference]
Examples
Remove a datapoint from a dataset
az iot ops ns asset datapoint remove --asset myasset --instance myInstance -g myInstanceResourceGroup --dataset default --name temp1
Required Parameters
Asset name.
Dataset name.
The name of the Azure IoT Operations instance.
Data point name.
The resource group of the Azure IoT Operations instance.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
| Property | Value |
|---|---|
| Default value: | False |