az iot ops ns asset mqtt dataset
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 mqtt dataset command. Learn more about extensions.
Manage datasets for MQTT namespaced assets.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az iot ops ns asset mqtt dataset add |
Add a dataset to an MQTT namespaced asset in an IoT Operations instance. |
Extension | GA |
| az iot ops ns asset mqtt dataset export |
Export datasets to file. |
Extension | GA |
| az iot ops ns asset mqtt dataset import |
Import datasets from file. |
Extension | GA |
| az iot ops ns asset mqtt dataset list |
List datasets for an MQTT namespaced asset in an IoT Operations instance. |
Extension | GA |
| az iot ops ns asset mqtt dataset remove |
Remove a dataset from an MQTT namespaced asset in an IoT Operations instance. |
Extension | GA |
| az iot ops ns asset mqtt dataset show |
Show details of a dataset for an MQTT namespaced asset in an IoT Operations instance. |
Extension | GA |
| az iot ops ns asset mqtt dataset update |
Update a dataset for an MQTT namespaced asset in an IoT Operations instance. |
Extension | GA |
az iot ops ns asset mqtt dataset add
Add a dataset to an MQTT namespaced asset in an IoT Operations instance.
az iot ops ns asset mqtt dataset add --asset
--instance
--name
--resource-group
[--acquire-policy-token]
[--change-reference]
[--data-source --ds]
[--dest --destination]
[--replace {false, true}]
[--tr --type-ref]
Examples
Add a dataset to an MQTT asset with MQTT topic
az iot ops ns asset mqtt dataset add --asset myMqttAsset --instance myInstance -g myInstanceResourceGroup --name sensorData --data-source "some/mqtt/topic" --dest topic="factory/processed/data" retain=Keep qos=Qos1 ttl=3600
Add a dataset with BrokerStateStore destination
az iot ops ns asset mqtt dataset add --asset myMqttAsset --instance myInstance -g myInstanceResourceGroup --name sensorData --data-source "some/mqtt/topic" --dest key="mqtt-data-store"
Required Parameters
Asset name.
The name of the Azure IoT Operations instance.
Dataset 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 |
Data source for the dataset.
Key=value pairs representing the destination for datasets. Allowed arguments include: key for BrokerStateStore or topic, retain, qos, and ttl for MQTT. Allowed values for retain are Keep and Never and allowed values for qos are Qos0 and Qos1.
Replace the dataset if another dataset with the same name is already present.
| Property | Value |
|---|---|
| Default value: | False |
| Accepted values: | false, true |
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 mqtt dataset export
Export datasets to file.
Export all datasets from an asset to JSON or YAML format.
az iot ops ns asset mqtt dataset export --asset
--instance
--resource-group
[--acquire-policy-token]
[--change-reference]
[--format {csv, json, yaml}]
[--od --output-dir]
[--replace {false, true}]
Required Parameters
Asset 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 dataset if another dataset with the same name is already 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 mqtt dataset import
Import datasets from file.
Import datasets from JSON or YAML file. Use --replace to merge with overwrite.
az iot ops ns asset mqtt dataset import --asset
--if --input-file
--instance
--resource-group
[--acquire-policy-token]
[--change-reference]
[--replace {false, true}]
Required Parameters
Asset name.
Path to import file (JSON or YAML).
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 the dataset if another dataset with the same name is already 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 mqtt dataset list
List datasets for an MQTT namespaced asset in an IoT Operations instance.
az iot ops ns asset mqtt dataset list --asset
--instance
--resource-group
Examples
List all datasets for an MQTT asset
az iot ops ns asset mqtt dataset list --asset myMqttAsset --instance myInstance -g myInstanceResourceGroup
Required Parameters
Asset 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 mqtt dataset remove
Remove a dataset from an MQTT namespaced asset in an IoT Operations instance.
az iot ops ns asset mqtt dataset remove --asset
--instance
--name
--resource-group
[--acquire-policy-token]
[--change-reference]
Examples
Remove a dataset from an MQTT asset
az iot ops ns asset mqtt dataset remove --asset myMqttAsset --instance myInstance -g myInstanceResourceGroup --name sensorData
Required Parameters
Asset name.
The name of the Azure IoT Operations instance.
Dataset 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 |
az iot ops ns asset mqtt dataset show
Show details of a dataset for an MQTT namespaced asset in an IoT Operations instance.
az iot ops ns asset mqtt dataset show --asset
--instance
--name
--resource-group
Examples
Show dataset details
az iot ops ns asset mqtt dataset show --asset myMqttAsset --instance myInstance -g myInstanceResourceGroup --name sensorData
Required Parameters
Asset name.
The name of the Azure IoT Operations instance.
Dataset name.
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 mqtt dataset update
Update a dataset for an MQTT namespaced asset in an IoT Operations instance.
az iot ops ns asset mqtt dataset update --asset
--instance
--name
--resource-group
[--acquire-policy-token]
[--change-reference]
[--dest --destination]
Examples
Update MQTT dataset destination
az iot ops ns asset mqtt dataset update --asset myMqttAsset --instance myInstance -g myInstanceResourceGroup --name sensorData --dest topic="updated/mqtt/topic" retain=Never qos=Qos0 ttl=1800
Required Parameters
Asset name.
The name of the Azure IoT Operations instance.
Dataset 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 |
Key=value pairs representing the destination for datasets. Allowed arguments include: key for BrokerStateStore or topic, retain, qos, and ttl for MQTT. Allowed values for retain are Keep and Never and allowed values for qos are Qos0 and Qos1.
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 |