az iot du instance
Note
此參考是 Azure CLI 的 azure-iot 延伸模組的一部分 (2.67.0 版或更新版本)。 擴充功能會在您第一次執行 az iot du instance 命令時自動安裝。 深入了解擴充功能。
裝置更新實例管理。
命令
| 名稱 | Description | 類型 | 狀態 |
|---|---|---|---|
| az iot du instance create |
建立裝置更新實例。 |
Extension | GA |
| az iot du instance delete |
刪除裝置更新實例。 |
Extension | GA |
| az iot du instance list |
列出裝置更新實例。 |
Extension | GA |
| az iot du instance show |
顯示裝置更新實例。 |
Extension | GA |
| az iot du instance update |
更新裝置更新實例。 |
Extension | GA |
| az iot du instance wait |
封鎖直到符合所需的實例資源狀態為止。 |
Extension | GA |
az iot du instance create
建立裝置更新實例。
此命令也可以用來更新現有實例的狀態。
az iot du instance create --account
--instance
--iothub-ids
[--diagnostics-storage-id]
[--enable-diagnostics {false, true}]
[--no-wait]
[--resource-group]
[--tags]
範例
建立具有最小組態的實例。
az iot du instance create -n {account_name} -i {instance_name} --iothub-ids {iothub_resource_id}
建立已啟用診斷的實例,並與使用者提供的記憶體帳戶配對。 包含標籤。
az iot du instance create -n {account_name} -i {instance_name} --iothub-ids {iothub_resource_id} --enable-diagnostics --diagnostics-storage-id {storage_account_resource_id} --tags a=b
必要參數
裝置更新帳戶名稱。 您可以使用 az config set defaults.adu_account={name}來設定預設帳戶名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Account Identifier Arguments |
裝置更新實例名稱。 您可以使用 az config set defaults.adu_instance={name}來設定預設實例名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Account Identifier Arguments |
以空間分隔的IoT中樞資源標識碼。
| 屬性 | 值 |
|---|---|
| 參數群組: | IoT Hub Arguments |
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
使用者提供的記憶體帳戶資源標識碼可用於診斷記錄收集。
| 屬性 | 值 |
|---|---|
| 參數群組: | Storage Arguments |
啟用診斷記錄收集。
| 屬性 | 值 |
|---|---|
| 接受的值: | false, true |
請勿等候長時間執行的作業完成。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
裝置更新帳戶資源組名。 您可以使用 az config set defaults.adu_group={name}來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Account Identifier Arguments |
資源標籤。 索引鍵/值組中的屬性包,格式如下:a=b c=d。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az iot du instance delete
刪除裝置更新實例。
az iot du instance delete --account
--instance
[--no-wait]
[--resource-group]
[--yes {false, true}]
範例
刪除與目標帳戶相關聯的實例。
az iot du instance delete -n {account_name} -i {instance_name}
刪除與目標帳戶相關聯的實例,並略過確認提示。
az iot du instance delete -n {account_name} -i {instance_name} -y
必要參數
裝置更新帳戶名稱。 您可以使用 az config set defaults.adu_account={name}來設定預設帳戶名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Account Identifier Arguments |
裝置更新實例名稱。 您可以使用 az config set defaults.adu_instance={name}來設定預設實例名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Account Identifier Arguments |
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
請勿等候長時間執行的作業完成。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
裝置更新帳戶資源組名。 您可以使用 az config set defaults.adu_group={name}來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Account Identifier Arguments |
略過使用者提示。 表示接受動作。 主要用於自動化案例。 預設:false。
| 屬性 | 值 |
|---|---|
| 接受的值: | false, true |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az iot du instance list
列出裝置更新實例。
az iot du instance list --account
[--resource-group]
範例
列出與目標帳戶相關聯的實例。
az iot du instance list -n {account_name}
必要參數
裝置更新帳戶名稱。 您可以使用 az config set defaults.adu_account={name}來設定預設帳戶名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Account Identifier Arguments |
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
裝置更新帳戶資源組名。 您可以使用 az config set defaults.adu_group={name}來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Account Identifier Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az iot du instance show
顯示裝置更新實例。
az iot du instance show --account
--instance
[--resource-group]
範例
顯示與目標帳戶相關聯的實例詳細數據。
az iot du instance show -n {account_name} -i {instance_name}
必要參數
裝置更新帳戶名稱。 您可以使用 az config set defaults.adu_account={name}來設定預設帳戶名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Account Identifier Arguments |
裝置更新實例名稱。 您可以使用 az config set defaults.adu_instance={name}來設定預設實例名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Account Identifier Arguments |
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
裝置更新帳戶資源組名。 您可以使用 az config set defaults.adu_group={name}來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Account Identifier Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az iot du instance update
更新裝置更新實例。
目前可以更新下列實例屬性 - iotHubs、enableDiagnostics、diagnosticStorageProperties 和標記。
az iot du instance update --account
--instance
[--add]
[--force-string]
[--no-wait]
[--remove]
[--resource-group]
[--set]
範例
設定特定的實例標籤屬性。
az iot du instance update -n {account_name} -i {instance_name} --set tags.env='test'
啟用診斷並設定記錄收集的記憶體帳戶。
az iot du instance update -n {account_name} -i {instance_name} --set enableDiagnostics=true diagnosticStorageProperties.resourceId={storage_account_resource_id}
必要參數
裝置更新帳戶名稱。 您可以使用 az config set defaults.adu_account={name}來設定預設帳戶名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Account Identifier Arguments |
裝置更新實例名稱。 您可以使用 az config set defaults.adu_instance={name}來設定預設實例名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Account Identifier Arguments |
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
藉由指定路徑和索引鍵值組,將物件加入物件清單。 範例: --add property.listProperty <key=value, string or JSON string>.
| 屬性 | 值 |
|---|---|
| 參數群組: | Generic Update Arguments |
| 預設值: | [] |
使用 'set' 或 'add' 時,請保留字串常值,而不是嘗試轉換成 JSON。
| 屬性 | 值 |
|---|---|
| 參數群組: | Generic Update Arguments |
| 預設值: | False |
請勿等候長時間執行的作業完成。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
從清單中移除屬性或專案。 範例: --remove property.list <indexToRemove> 或 --remove propertyToRemove。
| 屬性 | 值 |
|---|---|
| 參數群組: | Generic Update Arguments |
| 預設值: | [] |
裝置更新帳戶資源組名。 您可以使用 az config set defaults.adu_group={name}來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Account Identifier Arguments |
指定要設定的屬性路徑和值,以更新物件。 範例: --set property1.property2=<value>.
| 屬性 | 值 |
|---|---|
| 參數群組: | Generic Update Arguments |
| 預設值: | [] |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az iot du instance wait
封鎖直到符合所需的實例資源狀態為止。
az iot du instance wait --account
--instance
[--created]
[--custom]
[--deleted]
[--exists]
[--interval]
[--resource-group]
[--timeout]
[--updated]
範例
封鎖,直到目標實例已刪除為止。
az iot du instance wait -n {account_name} -i {instance_name} --deleted
必要參數
裝置更新帳戶名稱。 您可以使用 az config set defaults.adu_account={name}來設定預設帳戶名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Account Identifier Arguments |
裝置更新實例名稱。 您可以使用 az config set defaults.adu_instance={name}來設定預設實例名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Account Identifier Arguments |
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
請等候在 'Succeeded' 使用 'provisioningState' 建立。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
| 預設值: | False |
等到條件符合自定義 JMESPath 查詢為止。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
等到刪除為止。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
| 預設值: | False |
等候資源存在。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
| 預設值: | False |
輪詢間隔以秒為單位。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
| 預設值: | 30 |
裝置更新帳戶資源組名。 您可以使用 az config set defaults.adu_group={name}來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Account Identifier Arguments |
以秒為單位的等候上限。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
| 預設值: | 3600 |
等到 provisioningState 更新為 'Succeeded'。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
| 預設值: | False |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |