Share via


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 -a

Asset name.

--instance -i

The name of the Azure IoT Operations instance.

--name

Dataset name.

--resource-group -g

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.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--data-source --ds

Data source for the dataset.

--dest --destination

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

Replace the dataset if another dataset with the same name is already present.

Property Value
Default value: False
Accepted values: false, true
--tr --type-ref

Type definition ID or URI.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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 -a

Asset name.

--instance -i

The name of the Azure IoT Operations instance.

--resource-group -g

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.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--format -f

Export file format.

Property Value
Default value: json
Accepted values: csv, json, yaml
--od --output-dir

Output directory for export.

Property Value
Default value: .
--replace

Replace the dataset if another dataset with the same name is already present.

Property Value
Default value: False
Accepted values: false, true
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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 -a

Asset name.

--if --input-file

Path to import file (JSON or YAML).

--instance -i

The name of the Azure IoT Operations instance.

--resource-group -g

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.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--replace

Replace the dataset if another dataset with the same name is already present.

Property Value
Default value: False
Accepted values: false, true
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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 -a

Asset name.

--instance -i

The name of the Azure IoT Operations instance.

--resource-group -g

The resource group of the Azure IoT Operations instance.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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 -a

Asset name.

--instance -i

The name of the Azure IoT Operations instance.

--name

Dataset name.

--resource-group -g

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.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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 -a

Asset name.

--instance -i

The name of the Azure IoT Operations instance.

--name

Dataset name.

--resource-group -g

The resource group of the Azure IoT Operations instance.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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 -a

Asset name.

--instance -i

The name of the Azure IoT Operations instance.

--name

Dataset name.

--resource-group -g

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.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--dest --destination

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
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False