Share via


az iot ops broker

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

Command group 'iot ops' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Mqtt broker management.

Commands

Name Description Type Status
az iot ops broker authn

Broker authentication management.

Extension Preview
az iot ops broker authn delete

Delete an mqtt broker authentication resource.

Extension Preview
az iot ops broker authn list

List mqtt broker authentication resources associated with an instance.

Extension Preview
az iot ops broker authn show

Show details of an mqtt broker authentication resource.

Extension Preview
az iot ops broker authz

Broker authorization management.

Extension Preview
az iot ops broker authz delete

Delete an mqtt broker authorization resource.

Extension Preview
az iot ops broker authz list

List mqtt broker authorization resources associated with an instance.

Extension Preview
az iot ops broker authz show

Show details of an mqtt broker authorization resource.

Extension Preview
az iot ops broker delete

Delete an mqtt broker.

Extension Preview
az iot ops broker list

List mqtt brokers associated with an instance.

Extension Preview
az iot ops broker listener

Broker listener management.

Extension Preview
az iot ops broker listener delete

Delete an mqtt broker listener.

Extension Preview
az iot ops broker listener list

List mqtt broker listeners associated with a broker.

Extension Preview
az iot ops broker listener show

Show details of an mqtt broker listener.

Extension Preview
az iot ops broker show

Show details of an mqtt broker.

Extension Preview
az iot ops broker stats

Show dmqtt running statistics.

Extension Preview

az iot ops broker delete

Preview

Command group 'iot ops' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete an mqtt broker.

az iot ops broker delete --instance
                         --name
                         --resource-group
                         [--yes {false, true}]

Examples

Delete the broker called 'broker' in the instance 'mycluster-ops-instance'.

az iot ops broker delete -n broker --in mycluster-ops-instance -g myresourcegroup

Same as prior example but skipping the confirmation prompt.

az iot ops broker delete -n broker --in mycluster-ops-instance -g myresourcegroup -y

Required Parameters

--instance -i

IoT Operations instance name.

--name -n

Mqtt broker name.

--resource-group -g

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

Optional Parameters

--yes -y

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

Accepted values: false, true
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az iot ops broker list

Preview

Command group 'iot ops' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List mqtt brokers associated with an instance.

az iot ops broker list --instance
                       --resource-group

Examples

Enumerate all brokers in the instance 'mycluster-ops-instance'.

az iot ops broker list --in 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>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az iot ops broker show

Preview

Command group 'iot ops' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Show details of an mqtt broker.

az iot ops broker show --instance
                       --name
                       --resource-group

Examples

Show details of the default broker 'broker' in the instance 'mycluster-ops-instance'.

az iot ops broker show -n broker --in mycluster-ops-instance -g myresourcegroup

Required Parameters

--instance -i

IoT Operations instance name.

--name -n

Mqtt broker name.

--resource-group -g

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az iot ops broker stats

Preview

Command group 'iot ops' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Show dmqtt running statistics.

{Supported service APIs}

  • mqttbroker.iotoperations.azure.com/v1beta1.
az iot ops broker stats [--context]
                        [--metrics-port]
                        [--namespace]
                        [--protobuf-port]
                        [--raw {false, true}]
                        [--refresh]
                        [--trace-dir]
                        [--trace-ids]
                        [--watch {false, true}]

Examples

Fetch key performance indicators from the diagnostics Prometheus metrics endpoint.

az iot ops broker stats

Same as prior example except with a dynamic display that refreshes periodically.

az iot ops broker stats --watch

Return the raw output of the metrics endpoint with minimum processing.

az iot ops broker stats --raw

Fetch all available mqtt broker traces from the diagnostics Protobuf endpoint. This will produce a `.zip` with both `Otel` and Grafana `tempo` file formats. A trace files last modified attribute will match the trace timestamp.

az iot ops broker stats --trace-dir .

Fetch traces by trace Ids provided in space-separated hex format. Only `Otel` format is shown.

az iot ops broker stats --trace-ids 4e84000155a98627cdac7de46f53055d

Optional Parameters

--context

Kubeconfig context name to use for k8s cluster communication. If no context is provided current_context is used.

--metrics-port

Diagnostic service metrics API port.

Default value: 9600
--namespace -n

K8s cluster namespace the command should operate against. If no namespace is provided the kubeconfig current_context namespace will be used. If not defined, the fallback value azure-iot-operations will be used.

--protobuf-port

Diagnostic service protobuf API port.

Default value: 9800
--raw

Return raw output from the metrics API.

Accepted values: false, true
--refresh

Number of seconds between a stats refresh. Applicable with --watch.

Default value: 10
--trace-dir

Local directory where traces will be bundled and stored at.

--trace-ids

Space-separated trace ids in hex format.

--watch

The operation blocks and dynamically updates a stats table.

Accepted values: false, true
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.