az iot ops broker listener
Note
This reference is part of the azure-iot-ops extension for the Azure CLI (version 2.62.0 or higher). The extension will automatically install the first time you run an az iot ops broker listener command. Learn more about extensions.
Mqtt broker listener management.
Commands
Name | Description | Type | Status |
---|---|---|---|
az iot ops broker listener apply |
Create or replace an mqtt broker listener service. |
Extension | GA |
az iot ops broker listener delete |
Delete an mqtt broker listener. |
Extension | GA |
az iot ops broker listener list |
List mqtt broker listeners associated with a broker. |
Extension | GA |
az iot ops broker listener port |
Mqtt broker listener port operations. |
Extension | GA |
az iot ops broker listener port add |
Add a tcp port config to an mqtt broker listener service. |
Extension | GA |
az iot ops broker listener port remove |
Remove a tcp port config from an mqtt broker listener service. |
Extension | GA |
az iot ops broker listener show |
Show details of an mqtt broker listener. |
Extension | GA |
az iot ops broker listener apply
Create or replace an mqtt broker listener service.
An example of the config file format is as follows:
{
"serviceType": "LoadBalancer",
"ports": [
{
"port": 1883,
"protocol": "Mqtt"
},
{
"authenticationRef": "default",
"port": 8883,
"protocol": "Mqtt",
"tls": {
"mode": "Automatic",
"certManagerCertificateSpec": {
"issuerRef": {
"name": "azure-iot-operations-aio-certificate-issuer",
"kind": "ClusterIssuer",
"group": "cert-manager.io"
}
}
}
}
]
}
When used with apply the above content will create or replace a target listener with a two port configuration.
az iot ops broker listener apply --config-file
--instance
--name
--resource-group
[--broker]
Examples
Create or replace a listener for the default broker using a config file.
az iot ops broker listener apply -n listener --in myinstance -g myresourcegroup --config-file /path/to/listener/config.json
Required Parameters
Path to a config file containing resource properties in json format. The config file should contain an object with properties compatible with the ARM representation of the resource. The object correlates directly with 'properties:{}' of the ARM resource.
IoT Operations instance name.
Listener name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Broker name.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.
az iot ops broker listener delete
Delete an mqtt broker listener.
az iot ops broker listener delete --instance
--name
--resource-group
[--broker]
[--yes {false, true}]
Examples
Delete an mqtt broker listener associated with the default broker.
az iot ops broker listener delete -n listener --in myinstance -g myresourcegroup
Same as prior example but skipping the confirmation prompt.
az iot ops broker listener delete -n listener --in myinstance -g myresourcegroup -y
Required Parameters
IoT Operations instance name.
Listener name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Broker name.
Confirm [y]es without a prompt. Useful for CI and automation scenarios.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.
az iot ops broker listener list
List mqtt broker listeners associated with a broker.
az iot ops broker listener list --instance
--resource-group
[--broker]
Examples
Enumerate all mqtt broker listeners associated with the default broker.
az iot ops broker listener list --in myinstance -g myresourcegroup
Required Parameters
IoT Operations instance name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Broker name.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.
az iot ops broker listener show
Show details of an mqtt broker listener.
az iot ops broker listener show --instance
--name
--resource-group
[--broker]
Examples
Show details of the default listener associated with the default broker.
az iot ops broker listener show -n default --in myinstance -g myresourcegroup
Required Parameters
IoT Operations instance name.
Listener name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Broker name.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.