共用方式為


az iot central device telemetry

Note

This reference is part of the azure-iot extension for the Azure CLI (version 2.59.0 or higher). 擴充功能會在您第一次執行 az iot central device telemetry 命令時自動安裝。 Learn more about extensions.

查詢IoT Central裝置上一個遙測值。

命令

名稱 Description 類型 狀態
az iot central device telemetry show

從裝置取得最後一個遙測值。

Extension GA

az iot central device telemetry show

從裝置取得最後一個遙測值。

az iot central device telemetry show --app-id
                                     --device-id
                                     --telemetry-name--tn
                                     [--api-version --av {2022-06-30-preview, 2022-07-31}]
                                     [--central-api-uri --central-dns-suffix]
                                     [--co --component-name]
                                     [--mn --module-name]
                                     [--token]

範例

取得裝置遙測值。

az iot central device telemetry show --app-id {appid} --device-id {deviceid} --telemetry-name {telemetryname}

取得裝置元件遙測值。

az iot central device telemetry show --app-id {appid} --device-id {deviceid} --component-name {componentname} --telemetry-name {telemetryname}

取得裝置模組元件遙測值。

az iot central device telemetry show --app-id {appid} --device-id {deviceid} --module-name {modulename} --component-name {componentname} --telemetry-name {telemetryname}

必要參數

--app-id -n

您要管理的 IoT Central 應用程式的應用程式識別碼。 您可以在應用程式[關於] 頁面的 [說明] 選單下找到應用程式識別碼。

--device-id -d

目標裝置的裝置識別碼。按兩下 [裝置詳細資料] 頁面上的 [連線] 按鈕,即可找到裝置標識碼。

--telemetry-name--tn

裝置遙測的名稱。

選擇性參數

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

--api-version --av
已被取代

自變數 'api_version' 已被取代,並將在未來版本中移除。

此命令參數已被取代,將會忽略。在未來版本中,我們只會支援最新 GA 版本的 IoT Central API。如果任何 API 尚未正式運作,我們將呼叫最新的預覽版本。

屬性
預設值: 2022-07-31
接受的值: 2022-06-30-preview, 2022-07-31
--central-api-uri --central-dns-suffix

與您的應用程式相關聯的IoT Central DNS後綴。

屬性
預設值: azureiotcentral.com
--co --component-name

裝置元件的名稱。

--mn --module-name

裝置模組的名稱。

--token

如果您想要提交要求而不向 Azure CLI 進行驗證,您可以指定有效的使用者令牌來驗證您的要求。 您必須將金鑰類型指定為要求的一部分。 了解更多資訊,請至 https://aka.ms/iotcentraldocsapi

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

Output format.

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False