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

Deprecated

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

--en --endpoint --endpoint-name

Name of the routing endpoint.

--hub-name

IoT Hub name.

--name --route-name -n

Name of the Route.

--source --source-type --type -s

Source of the route.

accepted values: deviceconnectionstateevents, devicejoblifecycleevents, devicelifecycleevents, devicemessages, digitaltwinchangeevents, invalid, twinchangeevents

Optional Parameters

--condition -c

Condition that is evaluated to apply the routing rule.

--enabled -e

A boolean indicating whether to enable route to the Iot hub.

accepted values: false, true
--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 hub route delete

Deprecated

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

--hub-name

IoT Hub name.

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

--name --route-name -n

Name of the Route.

--resource-group -g

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

--source --source-type --type -s

Source of the route.

accepted values: deviceconnectionstateevents, devicejoblifecycleevents, devicelifecycleevents, devicemessages, digitaltwinchangeevents, invalid, twinchangeevents
--subscription

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

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 hub route list

Deprecated

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

--hub-name

IoT Hub name.

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

--resource-group -g

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

--source --source-type --type -s

Source of the route.

accepted values: deviceconnectionstateevents, devicejoblifecycleevents, devicelifecycleevents, devicemessages, digitaltwinchangeevents, invalid, twinchangeevents
--subscription

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

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 hub route show

Deprecated

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

Name of the Route.

Optional Parameters

--hub-name

IoT Hub name.

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

--resource-group -g

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

--subscription

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

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 hub route test

Deprecated

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

--ap --app-properties

App properties of the route message.

--body -b

Body of the route message.

--hub-name

IoT Hub name.

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

--name --route-name -n

Name of the Route.

--resource-group -g

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

--source --source-type --type -s

Source of the route.

accepted values: deviceconnectionstateevents, devicejoblifecycleevents, devicelifecycleevents, devicemessages, digitaltwinchangeevents, invalid, twinchangeevents
--sp --system-properties

System properties of the route message.

--subscription

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

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 hub route update

Deprecated

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

Name of the Route.

Optional Parameters

--condition -c

Condition that is evaluated to apply the routing rule.

--en --endpoint --endpoint-name

Name of the routing endpoint.

--enabled -e

A boolean indicating whether to enable route to the Iot hub.

accepted values: false, true
--hub-name

IoT Hub name.

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

--resource-group -g

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

--source --source-type --type -s

Source of the route.

accepted values: deviceconnectionstateevents, devicejoblifecycleevents, devicelifecycleevents, devicemessages, digitaltwinchangeevents, invalid, twinchangeevents
--subscription

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

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.