az iot hub route

此命令群組已被取代,將在未來的版本中移除。 請改用 'IoT Extension (azure-iot) message-route 命令群組 (az iot hub message-route)'。

管理 IoT 中樞的路由。

命令

名稱 Description 類型 狀態
az iot hub route create

在 IoT 中樞 中建立路由。

核心 已取代
az iot hub route delete

刪除IoT 中樞的所有或提及路由。

核心 已取代
az iot hub route list

取得IoT 中樞中的所有路由。

核心 已取代
az iot hub route show

取得 IoT 中樞 中路由的相關資訊。

核心 已取代
az iot hub route test

在 IoT 中樞 中測試所有路由或提及的路由。

核心 已取代
az iot hub route update

更新 IoT 中樞 中的路由。

核心 已取代

az iot hub route create

已被取代

此命令已隱含取代,因為命令群組 'iot 中樞路由' 已被取代,且將在未來的版本中移除。 請改用 'IoT Extension (azure-iot) message-route 命令群組 (az iot hub message-route)'。

在 IoT 中樞 中建立路由。

建立路由以將特定資料來源和條件傳送至所需的端點。

az iot hub route create --en
                        --hub-name
                        --name
                        --source {deviceconnectionstateevents, devicejoblifecycleevents, devicelifecycleevents, devicemessages, digitaltwinchangeevents, invalid, twinchangeevents}
                        [--condition]
                        [--enabled {false, true}]
                        [--resource-group]

範例

建立新的路由 「R1」。

az iot hub route create -g MyResourceGroup --hub-name MyIotHub --endpoint-name E2 --source DeviceMessages --route-name R1

使用所有參數建立新的路由 「R1」。

az iot hub route create -g MyResourceGroup --hub-name MyIotHub --endpoint-name E2 --source DeviceMessages --route-name R1 --condition true --enabled true

必要參數

--en --endpoint --endpoint-name

路由端點的名稱。

--hub-name

IoT 中樞名稱。

--name --route-name -n

路由的名稱。

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

路由的來源。

接受的值: deviceconnectionstateevents, devicejoblifecycleevents, devicelifecycleevents, devicemessages, digitaltwinchangeevents, invalid, twinchangeevents

選擇性參數

--condition -c

評估為套用路由規則的條件。

--enabled -e

布林值,指出是否要啟用 Iot 中樞的路由。

接受的值: false, true
--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az iot hub route delete

已被取代

此命令已隱含取代,因為命令群組 'iot 中樞路由' 已被取代,且將在未來的版本中移除。 請改用 'IoT Extension (azure-iot) message-route 命令群組 (az iot hub message-route)'。

刪除IoT 中樞的所有或提及路由。

刪除IoT 中樞的路由或所有路由。

az iot hub route delete [--hub-name]
                        [--ids]
                        [--name]
                        [--resource-group]
                        [--source {deviceconnectionstateevents, devicejoblifecycleevents, devicelifecycleevents, devicemessages, digitaltwinchangeevents, invalid, twinchangeevents}]
                        [--subscription]

範例

從 「MyIotHub」 刪除路由 「R1」 IoT 中樞。

az iot hub route delete -g MyResourceGroup --hub-name MyIotHub --route-name R1

從 「MyIotHub」 IoT 中樞中刪除來源類型 「DeviceMessages」 的所有路由。

az iot hub route delete -g MyResourceGroup --hub-name MyIotHub --source DeviceMessages

從 「MyIotHub」 IoT 中樞中刪除所有路由。

az iot hub route delete -g MyResourceGroup --hub-name MyIotHub

選擇性參數

--hub-name

IoT 中樞名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--name --route-name -n

路由的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

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

路由的來源。

接受的值: deviceconnectionstateevents, devicejoblifecycleevents, devicelifecycleevents, devicemessages, digitaltwinchangeevents, invalid, twinchangeevents
--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az iot hub route list

已被取代

此命令已隱含取代,因為命令群組 'iot 中樞路由' 已被取代,且將在未來的版本中移除。 請改用 'IoT Extension (azure-iot) message-route 命令群組 (az iot hub message-route)'。

取得IoT 中樞中的所有路由。

從IoT 中樞取得所有路由的相關資訊。

az iot hub route list [--hub-name]
                      [--ids]
                      [--resource-group]
                      [--source {deviceconnectionstateevents, devicejoblifecycleevents, devicelifecycleevents, devicemessages, digitaltwinchangeevents, invalid, twinchangeevents}]
                      [--subscription]

範例

從 「MyIotHub」 取得所有路由IoT 中樞。

az iot hub route list -g MyResourceGroup --hub-name MyIotHub

從 「MyIotHub」 取得來源類型 「DeviceMessages」 的所有路由IoT 中樞。

az iot hub route list -g MyResourceGroup --hub-name MyIotHub --source DeviceMessages

選擇性參數

--hub-name

IoT 中樞名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

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

路由的來源。

接受的值: deviceconnectionstateevents, devicejoblifecycleevents, devicelifecycleevents, devicemessages, digitaltwinchangeevents, invalid, twinchangeevents
--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az iot hub route show

已被取代

此命令已隱含取代,因為命令群組 'iot 中樞路由' 已被取代,且將在未來的版本中移除。 請改用 'IoT Extension (azure-iot) message-route 命令群組 (az iot hub message-route)'。

取得 IoT 中樞 中路由的相關資訊。

取得IoT 中樞中特定路由的相關資訊。

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

範例

從 「MyIotHub」 IoT 中樞取得路由資訊。

az iot hub route show -g MyResourceGroup --hub-name MyIotHub --route-name {routeName}

必要參數

--name --route-name -n

路由的名稱。

選擇性參數

--hub-name

IoT 中樞名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az iot hub route test

已被取代

此命令已隱含取代,因為命令群組 'iot 中樞路由' 已被取代,且將在未來的版本中移除。 請改用 'IoT Extension (azure-iot) message-route 命令群組 (az iot hub message-route)'。

在 IoT 中樞 中測試所有路由或提及的路由。

在IoT 中樞中測試所有現有的路由或提及的路由。 您可以提供範例訊息來測試您的路由。

az iot hub route test [--ap]
                      [--body]
                      [--hub-name]
                      [--ids]
                      [--name]
                      [--resource-group]
                      [--source {deviceconnectionstateevents, devicejoblifecycleevents, devicelifecycleevents, devicemessages, digitaltwinchangeevents, invalid, twinchangeevents}]
                      [--sp]
                      [--subscription]

範例

從 「MyIotHub」 IoT 中樞測試路由 「R1」。

az iot hub route test -g MyResourceGroup --hub-name MyIotHub --route-name R1

從 「MyIotHub」 測試來源類型 「DeviceMessages」 的所有路由IoT 中樞。

az iot hub route test -g MyResourceGroup --hub-name MyIotHub --source DeviceMessages

選擇性參數

--ap --app-properties

路由訊息的應用程式屬性。

--body -b

路由訊息的本文。

--hub-name

IoT 中樞名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--name --route-name -n

路由的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

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

路由的來源。

接受的值: deviceconnectionstateevents, devicejoblifecycleevents, devicelifecycleevents, devicemessages, digitaltwinchangeevents, invalid, twinchangeevents
--sp --system-properties

路由訊息的系統屬性。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az iot hub route update

已被取代

此命令已隱含取代,因為命令群組 'iot 中樞路由' 已被取代,且將在未來的版本中移除。 請改用 'IoT Extension (azure-iot) message-route 命令群組 (az iot hub message-route)'。

更新 IoT 中樞 中的路由。

在 IoT 中樞 中更新路由。 您可以在路由上變更來源、端點或查詢。

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]

範例

從 「MyIotHub」 更新路由 「R1」 的來源類型IoT 中樞。

az iot hub route update -g MyResourceGroup --hub-name MyIotHub --source DeviceMessages --route-name R1

必要參數

--name --route-name -n

路由的名稱。

選擇性參數

--condition -c

評估為套用路由規則的條件。

--en --endpoint --endpoint-name

路由端點的名稱。

--enabled -e

布林值,指出是否要啟用 Iot 中樞的路由。

接受的值: false, true
--hub-name

IoT 中樞名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

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

路由的來源。

接受的值: deviceconnectionstateevents, devicejoblifecycleevents, devicelifecycleevents, devicemessages, digitaltwinchangeevents, invalid, twinchangeevents
--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。