az iot ops identity
Note
此參考是 Azure CLI 的 azure-iot-ops 延伸模組的一部分(2.67.0 版或更高版本)。 擴充功能會在您第一次執行 az iot ops identity 命令時自動安裝
實例身分識別管理。
命令
| 名稱 | Description | 類型 | 狀態 |
|---|---|---|---|
| az iot ops identity assign |
使用 實例指派使用者指派的受控識別。 |
Extension | GA |
| az iot ops identity remove |
從實例中移除使用者指派的受控識別。 |
Extension | GA |
| az iot ops identity show |
顯示實例身分識別。 |
Extension | GA |
az iot ops identity assign
使用 實例指派使用者指派的受控識別。
此作業包含身分識別的同盟,以達到適用目的。
當 --usage 'schema' 存在時,如果預期的角色不存在,就會對實例架構登錄進行身分識別的角色指派。
az iot ops identity assign --mi-user-assigned
--name
--resource-group
[--custom-sr-role-id]
[--fc]
[--self-hosted-issuer {false, true}]
[--skip-sr-ra {false, true}]
[--usage {dataflow, schema, wasm-graph}]
範例
指派並同盟所需的使用者指派受控識別,以搭配數據流使用。
az iot ops identity assign --name myinstance -g myresourcegroup --mi-user-assigned $UA_MI_RESOURCE_ID
指派並同盟所需的使用者指派受控識別,以搭配架構登錄使用。
az iot ops identity assign --name myinstance -g myresourcegroup --mi-user-assigned $UA_MI_RESOURCE_ID --usage schema
指派並同盟所需的使用者指派受控識別,以搭配架構登錄搭配要用於身分識別角色指派的自定義角色。
az iot ops identity assign --name myinstance -g myresourcegroup --mi-user-assigned $UA_MI_RESOURCE_ID --usage schema --custom-sr-role-id $CUSTOM_ROLE_ID
指派並同盟所需的使用者指派受控識別,以搭配架構登錄使用,但略過作業的角色指派步驟。
az iot ops identity assign --name myinstance -g myresourcegroup --mi-user-assigned $UA_MI_RESOURCE_ID --usage schema --skip-sr-ra
必要參數
要與實例搭配使用之所需使用者指派受控識別的資源標識碼。
IoT 作業實例名稱。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
完整角色定義標識符的格式如下:/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/roleDefinitions/{roleId}。 只有在 --usage 設定為 'schema' 時才適用。
同盟認證名稱。
使用自我裝載的 oidc 簽發者進行同盟。
| 屬性 | 值 |
|---|---|
| 接受的值: | false, true |
使用時,將會略過作業的角色指派步驟。 只有在 --usage 設定為 'schema' 時才適用。
| 屬性 | 值 |
|---|---|
| 接受的值: | false, true |
指出相關聯身分識別的使用類型。
| 屬性 | 值 |
|---|---|
| 預設值: | dataflow |
| 接受的值: | dataflow, schema, wasm-graph |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | 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 ops identity remove
從實例中移除使用者指派的受控識別。
az iot ops identity remove --mi-user-assigned
--name
--resource-group
[--fc]
範例
從實例中移除所需的使用者指派受控識別。
az iot ops identity remove --name myinstance -g myresourcegroup --mi-user-assigned $UA_MI_RESOURCE_ID
必要參數
要與實例搭配使用之所需使用者指派受控識別的資源標識碼。
IoT 作業實例名稱。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
同盟認證名稱。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | 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 ops identity show
顯示實例身分識別。
az iot ops identity show --name
--resource-group
範例
顯示與目標實例相關聯的身分識別。
az iot ops identity show --name myinstance -g myresourcegroup
必要參數
IoT 作業實例名稱。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |