az iot hub route
This command group has been deprecated and will be removed in a future release. Use 'IoT Extension (azure-iot) message-route command group (az iot hub message-route)' instead.
Manage routes of an IoT hub.
Commands
Name | Description | Type | Status |
---|---|---|---|
az iot hub route create |
Create a route in IoT Hub. |
Core | Deprecated |
az iot hub route delete |
Delete all or mentioned route for your IoT Hub. |
Core | Deprecated |
az iot hub route list |
Get all the routes in IoT Hub. |
Core | Deprecated |
az iot hub route show |
Get information about the route in IoT Hub. |
Core | Deprecated |
az iot hub route test |
Test all routes or mentioned route in IoT Hub. |
Core | Deprecated |
az iot hub route update |
Update a route in IoT Hub. |
Core | Deprecated |
az iot hub route create
This command is implicitly deprecated because command group 'iot hub route' is deprecated and will be removed in a future release. Use 'IoT Extension (azure-iot) message-route command group (az iot hub message-route)' instead.
Create a route in IoT Hub.
Create a route to send specific data source and condition to a desired endpoint.
az iot hub route create --en
--hub-name
--name
--source {deviceconnectionstateevents, devicejoblifecycleevents, devicelifecycleevents, devicemessages, digitaltwinchangeevents, invalid, twinchangeevents}
[--condition]
[--enabled {false, true}]
[--resource-group]
Examples
Create a new route "R1".
az iot hub route create -g MyResourceGroup --hub-name MyIotHub --endpoint-name E2 --source DeviceMessages --route-name R1
Create a new route "R1" with all parameters.
az iot hub route create -g MyResourceGroup --hub-name MyIotHub --endpoint-name E2 --source DeviceMessages --route-name R1 --condition true --enabled true
Required Parameters
Name of the routing endpoint.
IoT Hub name.
Name of the Route.
Source of the route.
Optional Parameters
Condition that is evaluated to apply the routing rule.
A boolean indicating whether to enable route to the Iot hub.
Name of resource group. You can configure the default group using az configure --defaults group=<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 hub route delete
This command is implicitly deprecated because command group 'iot hub route' is deprecated and will be removed in a future release. Use 'IoT Extension (azure-iot) message-route command group (az iot hub message-route)' instead.
Delete all or mentioned route for your IoT Hub.
Delete a route or all routes for your IoT Hub.
az iot hub route delete [--hub-name]
[--ids]
[--name]
[--resource-group]
[--source {deviceconnectionstateevents, devicejoblifecycleevents, devicelifecycleevents, devicemessages, digitaltwinchangeevents, invalid, twinchangeevents}]
[--subscription]
Examples
Delete route "R1" from "MyIotHub" IoT Hub.
az iot hub route delete -g MyResourceGroup --hub-name MyIotHub --route-name R1
Delete all the routes of source type "DeviceMessages" from "MyIotHub" IoT Hub.
az iot hub route delete -g MyResourceGroup --hub-name MyIotHub --source DeviceMessages
Delete all the routes from "MyIotHub" IoT Hub.
az iot hub route delete -g MyResourceGroup --hub-name MyIotHub
Optional Parameters
IoT Hub name.
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.
Name of the Route.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Source of the route.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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 hub route list
This command is implicitly deprecated because command group 'iot hub route' is deprecated and will be removed in a future release. Use 'IoT Extension (azure-iot) message-route command group (az iot hub message-route)' instead.
Get all the routes in IoT Hub.
Get information on all routes from an IoT Hub.
az iot hub route list [--hub-name]
[--ids]
[--resource-group]
[--source {deviceconnectionstateevents, devicejoblifecycleevents, devicelifecycleevents, devicemessages, digitaltwinchangeevents, invalid, twinchangeevents}]
[--subscription]
Examples
Get all route from "MyIotHub" IoT Hub.
az iot hub route list -g MyResourceGroup --hub-name MyIotHub
Get all the routes of source type "DeviceMessages" from "MyIotHub" IoT Hub.
az iot hub route list -g MyResourceGroup --hub-name MyIotHub --source DeviceMessages
Optional Parameters
IoT Hub name.
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.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Source of the route.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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 hub route show
This command is implicitly deprecated because command group 'iot hub route' is deprecated and will be removed in a future release. Use 'IoT Extension (azure-iot) message-route command group (az iot hub message-route)' instead.
Get information about the route in IoT Hub.
Get information on a specific route in your IoT Hub.
az iot hub route show --name
[--hub-name]
[--ids]
[--resource-group]
[--subscription]
Examples
Get an route information from "MyIotHub" IoT Hub.
az iot hub route show -g MyResourceGroup --hub-name MyIotHub --route-name {routeName}
Required Parameters
Name of the Route.
Optional Parameters
IoT Hub name.
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.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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 hub route test
This command is implicitly deprecated because command group 'iot hub route' is deprecated and will be removed in a future release. Use 'IoT Extension (azure-iot) message-route command group (az iot hub message-route)' instead.
Test all routes or mentioned route in IoT Hub.
Test all existing routes or mentioned route in your IoT Hub. You can provide a sample message to test your routes.
az iot hub route test [--ap]
[--body]
[--hub-name]
[--ids]
[--name]
[--resource-group]
[--source {deviceconnectionstateevents, devicejoblifecycleevents, devicelifecycleevents, devicemessages, digitaltwinchangeevents, invalid, twinchangeevents}]
[--sp]
[--subscription]
Examples
Test the route "R1" from "MyIotHub" IoT Hub.
az iot hub route test -g MyResourceGroup --hub-name MyIotHub --route-name R1
Test all the route of source type "DeviceMessages" from "MyIotHub" IoT Hub.
az iot hub route test -g MyResourceGroup --hub-name MyIotHub --source DeviceMessages
Optional Parameters
App properties of the route message.
Body of the route message.
IoT Hub name.
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.
Name of the Route.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Source of the route.
System properties of the route message.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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 hub route update
This command is implicitly deprecated because command group 'iot hub route' is deprecated and will be removed in a future release. Use 'IoT Extension (azure-iot) message-route command group (az iot hub message-route)' instead.
Update a route in IoT Hub.
Updates a route in IoT Hub. You can change the source, endpoint or query on the route.
az iot hub route update --name
[--condition]
[--en]
[--enabled {false, true}]
[--hub-name]
[--ids]
[--resource-group]
[--source {deviceconnectionstateevents, devicejoblifecycleevents, devicelifecycleevents, devicemessages, digitaltwinchangeevents, invalid, twinchangeevents}]
[--subscription]
Examples
Update source type of route "R1" from "MyIotHub" IoT Hub.
az iot hub route update -g MyResourceGroup --hub-name MyIotHub --source DeviceMessages --route-name R1
Required Parameters
Name of the Route.
Optional Parameters
Condition that is evaluated to apply the routing rule.
Name of the routing endpoint.
A boolean indicating whether to enable route to the Iot hub.
IoT Hub name.
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.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Source of the route.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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.
Azure CLI