az iot ops dataflowgraph

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 dataflowgraph command. Learn more about extensions.

DataflowGraph management.

Commands

Name Description Type Status
az iot ops dataflowgraph apply

Create or replace a DataflowGraph associated with a dataflow profile.

Extension GA
az iot ops dataflowgraph delete

Delete a DataflowGraph associated with a dataflow profile.

Extension GA
az iot ops dataflowgraph list

List DataflowGraphs associated with a dataflow profile.

Extension GA
az iot ops dataflowgraph show

Show details of a DataflowGraph associated with a dataflow profile.

Extension GA

az iot ops dataflowgraph apply

Create or replace a DataflowGraph associated with a dataflow profile.

An example of the config file format is as follows:

{
  "mode": "Enabled",
  "nodes": [
    {
      "name": "source-mqtt",
      "nodeType": "Source",
      "sourceSettings": {
        "endpointRef": "default-broker",
        "dataSources": ["sensors/temperature/#"]
      }
    },
    {
      "name": "dest-broker",
      "nodeType": "Destination",
      "destinationSettings": {
        "endpointRef": "my-kafka-endpoint",
        "dataDestination": "telemetry/temperature"
      }
    },
    {
      "name": "dest-otel",
      "nodeType": "Destination",
      "destinationSettings": {
        "endpointRef": "my-otel-endpoint",
        "dataDestination": "telemetry/all"
      }
    },
    {
      "name": "graph-processor",
      "nodeType": "Graph",
      "graphSettings": {
        "registryEndpointRef": "my-registry-endpoint",
        "artifact": "my-processing-module:1.0.0",
        "configuration": [
          { "key": "paramName", "value": "paramValue" },
          { "key": "anotherParam", "value": "anotherValue" }
        ]
      }
    }
  ],
  "nodeConnections": [
    { "from": { "name": "source-mqtt" }, "to": { "name": "graph-processor" } },
    { "from": { "name": "graph-processor" }, "to": { "name": "dest-broker" } },
    { "from": { "name": "graph-processor" }, "to": { "name": "dest-otel" } }
  ]
}

The above example defines a graph with an MQTT source flowing through a Graph processing node that fans out to a Kafka destination and an OpenTelemetry destination. Graph nodes reference an artifact (format: <name>:<version>) from a registry endpoint. The example above includes graphSettings.configuration only to illustrate the format when an artifact requires configuration parameters; in that case, supply them as a list of {"key", "value"} string pairs. Omit graphSettings.configuration entirely when no configuration is needed. Supported nodeTypes are: Source, Destination, and Graph. Data flow graphs support only MQTT, Kafka, and OpenTelemetry endpoints. The file can also be the full ARM resource wrapper (properties is auto-extracted). extendedLocation is always auto-populated from --instance and -g and must not be included in the file.

When used with apply the above content will create or replace a target DataflowGraph resource.

az iot ops dataflowgraph apply --config-file
                               --instance
                               --name
                               --resource-group
                               [--acquire-policy-token]
                               [--change-reference]
                               [--profile]

Examples

Create or replace a DataflowGraph 'mygraph' associated with a profile 'myprofile' using a config file.

az iot ops dataflowgraph apply -n mygraph -p myprofile -i myinstance -g myresourcegroup --config-file /path/to/graph/config.json

Required Parameters

--config-file

Path to a JSON file containing the dataflowgraph properties.

Property Value
Parameter group: Config Arguments
--instance -i

IoT Operations instance name.

--name -n

DataflowGraph name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

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
--profile -p

Dataflow profile name. Default: 'default'.

Property Value
Default value: default
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 dataflowgraph delete

Delete a DataflowGraph associated with a dataflow profile.

az iot ops dataflowgraph delete --instance
                                --name
                                --resource-group
                                [--acquire-policy-token]
                                [--change-reference]
                                [--profile]
                                [--yes {false, true}]

Examples

Delete a DataflowGraph 'mygraph' associated with a profile 'myprofile'.

az iot ops dataflowgraph delete -n mygraph -p myprofile -i mycluster-ops-instance -g myresourcegroup

Delete a DataflowGraph 'mygraph' without a confirmation prompt.

az iot ops dataflowgraph delete -n mygraph -p myprofile -i mycluster-ops-instance -g myresourcegroup -y

Required Parameters

--instance -i

IoT Operations instance name.

--name -n

DataflowGraph name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

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
--profile -p

Dataflow profile name. Default: 'default'.

Property Value
Default value: default
--yes -y

Confirm [y]es without a prompt. Useful for CI and automation scenarios.

Property Value
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 dataflowgraph list

List DataflowGraphs associated with a dataflow profile.

az iot ops dataflowgraph list --instance
                              --resource-group
                              [--profile]

Examples

Enumerate DataflowGraphs associated with the profile 'myprofile'.

az iot ops dataflowgraph list -p myprofile -i mycluster-ops-instance -g myresourcegroup

Required Parameters

--instance -i

IoT Operations instance name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--profile -p

Dataflow profile name. Default: 'default'.

Property Value
Default value: default
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 dataflowgraph show

Show details of a DataflowGraph associated with a dataflow profile.

az iot ops dataflowgraph show --instance
                              --name
                              --resource-group
                              [--profile]

Examples

Show details of a DataflowGraph 'mygraph' associated with a profile 'myprofile'.

az iot ops dataflowgraph show -n mygraph -p myprofile -i mycluster-ops-instance -g myresourcegroup

Required Parameters

--instance -i

IoT Operations instance name.

--name -n

DataflowGraph name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--profile -p

Dataflow profile name. Default: 'default'.

Property Value
Default value: default
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