共用方式為


az webapp identity

管理 Web 應用程式的受控識別。

命令

名稱 Description 類型 狀態
az webapp identity assign

將受控識別指派給 Web 應用程式。

Core GA
az webapp identity remove

停用 Web 應用程式的受控識別。

Core GA
az webapp identity show

顯示 Web 應用程式的受控識別。

Core GA

az webapp identity assign

將受控識別指派給 Web 應用程式。

az webapp identity assign [--identities]
                          [--ids]
                          [--name]
                          [--resource-group]
                          [--role]
                          [--scope]
                          [--slot]
                          [--subscription]

範例

指派本機身分識別,並將讀取者角色指派給目前的資源群組。

az webapp identity assign -g MyResourceGroup -n MyUniqueApp --role reader --scope /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/MyResourceGroup

啟用 Web 應用程式的身分識別。

az webapp identity assign -g MyResourceGroup -n MyUniqueApp

將本機身分識別和使用者指派的身分識別指派給 Webapp。

az webapp identity assign -g MyResourceGroup -n MyUniqueApp --identities [system] myAssignedId

選擇性參數

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

--identities

要指派的空間分隔身分識別。 使用 '[system]' 來參考系統指派的身分識別。 Default: '[system]'.

--ids

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

屬性
Parameter group: Resource Id Arguments
--name -n

Web 應用程式的名稱。 如果未指定,則會隨機產生名稱。 您可以使用 來設定預設值 az configure --defaults web=<name>

屬性
Parameter group: Resource Id Arguments
--resource-group -g

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

屬性
Parameter group: Resource Id Arguments
--role

將指派受控識別的角色名稱或標識碼。

屬性
預設值: Contributor
--scope

受控識別可存取的範圍。

--slot -s

位置的名稱。 如果未指定,則預設為生產位置。

--subscription

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

屬性
Parameter group: Resource Id Arguments
全域參數
--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/

--verbose

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

屬性
預設值: False

az webapp identity remove

停用 Web 應用程式的受控識別。

az webapp identity remove [--identities]
                          [--ids]
                          [--name]
                          [--resource-group]
                          [--slot]
                          [--subscription]

範例

停用 Web 應用程式的系統受控識別

az webapp identity remove --name MyWebApp --resource-group MyResourceGroup

停用 Web 應用程式的系統受控識別和使用者受控識別

az webapp identity remove --name MyWebApp --resource-group MyResourceGroup --identities [system] myAssignedId

選擇性參數

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

--identities

要指派的空間分隔身分識別。 使用 '[system]' 來參考系統指派的身分識別。 Default: '[system]'.

--ids

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

屬性
Parameter group: Resource Id Arguments
--name -n

Web 應用程式的名稱。 如果未指定,則會隨機產生名稱。 您可以使用 來設定預設值 az configure --defaults web=<name>

屬性
Parameter group: Resource Id Arguments
--resource-group -g

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

屬性
Parameter group: Resource Id Arguments
--slot -s

位置的名稱。 如果未指定,則預設為生產位置。

--subscription

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

屬性
Parameter group: Resource Id Arguments
全域參數
--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/

--verbose

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

屬性
預設值: False

az webapp identity show

顯示 Web 應用程式的受控識別。

az webapp identity show [--ids]
                        [--name]
                        [--resource-group]
                        [--slot]
                        [--subscription]

範例

顯示 Webapp 的受控識別 (自動產生)

az webapp identity show --name MyWebapp --resource-group MyResourceGroup

選擇性參數

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

--ids

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

屬性
Parameter group: Resource Id Arguments
--name -n

Web 應用程式的名稱。 如果未指定,則會隨機產生名稱。 您可以使用 來設定預設值 az configure --defaults web=<name>

屬性
Parameter group: Resource Id Arguments
--resource-group -g

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

屬性
Parameter group: Resource Id Arguments
--slot -s

位置的名稱。 如果未指定,則預設為生產位置。

--subscription

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

屬性
Parameter group: Resource Id Arguments
全域參數
--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/

--verbose

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

屬性
預設值: False