az iot hub topic-group

Note

This reference is part of the azure-iot extension for the Azure CLI (version 2.73.0 or higher). The extension will automatically install the first time you run an az iot hub topic-group command. Learn more about extensions.

This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage MQTT 5 topic groups for an IoT Hub.

Topic groups are supported only for IoT Hubs using the MqttV5 connection profile.

Commands

Name Description Type Status
az iot hub topic-group create

Create an MQTT 5 topic group.

Extension Preview
az iot hub topic-group delete

Delete one or all MQTT 5 topic groups.

Extension Preview
az iot hub topic-group list

List MQTT 5 topic groups.

Extension Preview
az iot hub topic-group show

Show an MQTT 5 topic group.

Extension Preview
az iot hub topic-group update

Replace the topic templates of an MQTT 5 topic group.

Extension Preview

az iot hub topic-group create

Preview

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

Create an MQTT 5 topic group.

az iot hub topic-group create --hub-name
                              --topic-group-id
                              --topic-templates
                              [--acquire-policy-token]
                              [--change-reference]
                              [--resource-group]

Examples

Create a topic group with multiple topic templates.

az iot hub topic-group create -n {iothub_name} --topic-group-id {topic_group_id} --topic-templates {topic_template_1} {topic_template_2}

Required Parameters

--hub-name -n

IoT Hub name.

--topic-group-id

Customer-defined identifier of the topic group.

--topic-templates

Provide one or more space-separated topic templates.

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

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 hub topic-group delete

Preview

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

Delete one or all MQTT 5 topic groups.

az iot hub topic-group delete [--acquire-policy-token]
                              [--all]
                              [--change-reference]
                              [--hub-name]
                              [--ids]
                              [--resource-group]
                              [--subscription]
                              [--topic-group-id]
                              [--yes {false, true}]

Examples

Delete a topic group.

az iot hub topic-group delete -n {iothub_name} --topic-group-id {topic_group_id}

Delete all topic groups without prompting.

az iot hub topic-group delete -n {iothub_name} --all --yes

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

Delete all topic groups.

Property Value
Default value: False
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--hub-name -n

IoT Hub name.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--topic-group-id

Customer-defined identifier of the topic group.

--yes -y

Do not prompt for confirmation when deleting all topic groups.

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.

--verbose

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

Property Value
Default value: False

az iot hub topic-group list

Preview

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

List MQTT 5 topic groups.

az iot hub topic-group list [--hub-name]
                            [--ids]
                            [--resource-group]
                            [--subscription]

Examples

List all topic groups.

az iot hub topic-group list -n {iothub_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.

--hub-name -n

IoT Hub name.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id 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.

--verbose

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

Property Value
Default value: False

az iot hub topic-group show

Preview

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

Show an MQTT 5 topic group.

az iot hub topic-group show --topic-group-id
                            [--hub-name]
                            [--ids]
                            [--resource-group]
                            [--subscription]

Examples

Show a topic group.

az iot hub topic-group show -n {iothub_name} --topic-group-id {topic_group_id}

Required Parameters

--topic-group-id

Customer-defined identifier of the topic group.

Optional Parameters

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

--hub-name -n

IoT Hub name.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id 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.

--verbose

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

Property Value
Default value: False

az iot hub topic-group update

Preview

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

Replace the topic templates of an MQTT 5 topic group.

az iot hub topic-group update --topic-group-id
                              --topic-templates
                              [--acquire-policy-token]
                              [--change-reference]
                              [--hub-name]
                              [--ids]
                              [--resource-group]
                              [--subscription]

Examples

Replace the templates of a topic group.

az iot hub topic-group update -n {iothub_name} --topic-group-id {topic_group_id} --topic-templates {topic_template_1} {topic_template_2}

Required Parameters

--topic-group-id

Customer-defined identifier of the topic group.

--topic-templates

Provide one or more space-separated topic templates.

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
--hub-name -n

IoT Hub name.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id 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.

--verbose

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

Property Value
Default value: False