共用方式為


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

必要參數

--account -n

裝置更新帳戶名稱。 您可以使用 az config set defaults.adu_account={name}來設定預設帳戶名稱。

屬性
參數群組: Account Identifier Arguments
--instance -i

裝置更新實例名稱。 您可以使用 az config set defaults.adu_instance={name}來設定預設實例名稱。

屬性
參數群組: Account Identifier Arguments
--iothub-ids

以空間分隔的IoT中樞資源標識碼。

屬性
參數群組: IoT Hub Arguments

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--diagnostics-storage-id

使用者提供的記憶體帳戶資源標識碼可用於診斷記錄收集。

屬性
參數群組: Storage Arguments
--enable-diagnostics

啟用診斷記錄收集。

屬性
接受的值: false, true
--no-wait

請勿等候長時間執行的作業完成。

屬性
預設值: False
--resource-group -g

裝置更新帳戶資源組名。 您可以使用 az config set defaults.adu_group={name}來設定預設群組。

屬性
參數群組: Account Identifier Arguments
--tags

資源標籤。 索引鍵/值組中的屬性包,格式如下:a=b c=d。

全域參數
--debug

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

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

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

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

輸出格式。

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --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

必要參數

--account -n

裝置更新帳戶名稱。 您可以使用 az config set defaults.adu_account={name}來設定預設帳戶名稱。

屬性
參數群組: Account Identifier Arguments
--instance -i

裝置更新實例名稱。 您可以使用 az config set defaults.adu_instance={name}來設定預設實例名稱。

屬性
參數群組: Account Identifier Arguments

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--no-wait

請勿等候長時間執行的作業完成。

屬性
預設值: False
--resource-group -g

裝置更新帳戶資源組名。 您可以使用 az config set defaults.adu_group={name}來設定預設群組。

屬性
參數群組: Account Identifier Arguments
--yes -y

略過使用者提示。 表示接受動作。 主要用於自動化案例。 預設:false。

屬性
接受的值: false, true
全域參數
--debug

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

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

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

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

輸出格式。

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

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

--subscription

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

--verbose

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

屬性
預設值: False

az iot du instance list

列出裝置更新實例。

az iot du instance list --account
                        [--resource-group]

範例

列出與目標帳戶相關聯的實例。

az iot du instance list -n {account_name}

必要參數

--account -n

裝置更新帳戶名稱。 您可以使用 az config set defaults.adu_account={name}來設定預設帳戶名稱。

屬性
參數群組: Account Identifier Arguments

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--resource-group -g

裝置更新帳戶資源組名。 您可以使用 az config set defaults.adu_group={name}來設定預設群組。

屬性
參數群組: Account Identifier Arguments
全域參數
--debug

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

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

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

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

輸出格式。

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --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}

必要參數

--account -n

裝置更新帳戶名稱。 您可以使用 az config set defaults.adu_account={name}來設定預設帳戶名稱。

屬性
參數群組: Account Identifier Arguments
--instance -i

裝置更新實例名稱。 您可以使用 az config set defaults.adu_instance={name}來設定預設實例名稱。

屬性
參數群組: Account Identifier Arguments

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--resource-group -g

裝置更新帳戶資源組名。 您可以使用 az config set defaults.adu_group={name}來設定預設群組。

屬性
參數群組: Account Identifier Arguments
全域參數
--debug

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

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

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

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

輸出格式。

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --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}

必要參數

--account -n

裝置更新帳戶名稱。 您可以使用 az config set defaults.adu_account={name}來設定預設帳戶名稱。

屬性
參數群組: Account Identifier Arguments
--instance -i

裝置更新實例名稱。 您可以使用 az config set defaults.adu_instance={name}來設定預設實例名稱。

屬性
參數群組: Account Identifier Arguments

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--add

藉由指定路徑和索引鍵值組,將物件加入物件清單。 範例: --add property.listProperty <key=value, string or JSON string>.

屬性
參數群組: Generic Update Arguments
預設值: []
--force-string

使用 'set' 或 'add' 時,請保留字串常值,而不是嘗試轉換成 JSON。

屬性
參數群組: Generic Update Arguments
預設值: False
--no-wait

請勿等候長時間執行的作業完成。

屬性
預設值: False
--remove

從清單中移除屬性或專案。 範例: --remove property.list <indexToRemove>--remove propertyToRemove

屬性
參數群組: Generic Update Arguments
預設值: []
--resource-group -g

裝置更新帳戶資源組名。 您可以使用 az config set defaults.adu_group={name}來設定預設群組。

屬性
參數群組: Account Identifier Arguments
--set

指定要設定的屬性路徑和值,以更新物件。 範例: --set property1.property2=<value>.

屬性
參數群組: Generic Update Arguments
預設值: []
全域參數
--debug

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

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

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

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

輸出格式。

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --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

必要參數

--account -n

裝置更新帳戶名稱。 您可以使用 az config set defaults.adu_account={name}來設定預設帳戶名稱。

屬性
參數群組: Account Identifier Arguments
--instance -i

裝置更新實例名稱。 您可以使用 az config set defaults.adu_instance={name}來設定預設實例名稱。

屬性
參數群組: Account Identifier Arguments

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--created

請等候在 'Succeeded' 使用 'provisioningState' 建立。

屬性
參數群組: Wait Condition Arguments
預設值: False
--custom

等到條件符合自定義 JMESPath 查詢為止。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。

屬性
參數群組: Wait Condition Arguments
--deleted

等到刪除為止。

屬性
參數群組: Wait Condition Arguments
預設值: False
--exists

等候資源存在。

屬性
參數群組: Wait Condition Arguments
預設值: False
--interval

輪詢間隔以秒為單位。

屬性
參數群組: Wait Condition Arguments
預設值: 30
--resource-group -g

裝置更新帳戶資源組名。 您可以使用 az config set defaults.adu_group={name}來設定預設群組。

屬性
參數群組: Account Identifier Arguments
--timeout

以秒為單位的等候上限。

屬性
參數群組: Wait Condition Arguments
預設值: 3600
--updated

等到 provisioningState 更新為 'Succeeded'。

屬性
參數群組: Wait Condition Arguments
預設值: False
全域參數
--debug

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

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

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

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

輸出格式。

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

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

--subscription

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

--verbose

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

屬性
預設值: False