Visual Studio Code 的 Azure Resources

Azure Resources 延伸模組可讓您直接在 VS Code 內順暢地檢視及管理您的 Azure 資源。它還提供驗證並管理您的 Azure 帳戶與租用戶的功能。

如何登入您的 Azure 帳戶

Azure Resources 延伸模組使用內建的 VS Code Microsoft 驗證提供者來驗證 Azure。請在 Azure Resources 檢視中選取 [Sign in to Azure…] (登入 Azure...) 項目來進行登入。

Screenshot that shows where to sign in to your Azure account

您也可以使用 Azure Resources 延伸模組提供的 Azure: Sign in (Azure: 登入) 命令來登入。

Screenshot that shows where to sign in to an Azure account from the command palette

如何登出

若要登出,請前往 VS Code 視窗左下方的帳戶選單。

Screenshot that shows where to sign out of an Azure account

篩選訂用帳戶

您可以選取任何訂用帳戶上的篩選圖示,藉此篩選所顯示的訂用帳戶。

Screenshot that shows where to filter your subscriptions

已篩選的訂用帳戶會儲存在 azureResourceGroups.selectedSubscriptions 在 VS Code 中開啟 在 VS Code Insiders 中開啟 設定中。

帳戶與租用戶檢視

在 Azure Resources 延伸模組中,您可以使用「帳戶與租用戶」檢視來管理並驗證帳戶與租用戶。

Screenshot that shows the Accounts & Tenants view

篩選租用戶

您也可以透過勾選或取消勾選租用戶來篩選租用戶。根據在租用戶檢視中勾選或取消勾選的項目,這會導致「資源」檢視與訂用帳戶篩選中的訂用帳戶被篩除。

Accounts & Tenants view

驗證租用戶

在「帳戶與租用戶」檢視中,您可以檢視與您帳戶相關聯的所有租用戶。許多租用戶需要多因素驗證 (MFA) 才能存取。當您將游標懸停在需要多因素驗證的租用戶上時,該租用戶右側會顯示一個登入按鈕。

Screenshot that shows where to authenticate your tenants

您可以前往「帳戶與租用戶」檢視,選取租用戶右側的登入按鈕,或是直接勾選未經驗證的租用戶,以驗證特定的租用戶。

多帳戶支援

透過「帳戶與租用戶」檢視,您可以選取檢視右上角的 + 圖示來登入新的帳戶。

Screenshot that shows where to sign in to multiple Azure Accounts

使用主權雲端

若要連線至主權雲端,您可以選取「帳戶與租用戶」檢視右側的齒輪圖示。 Sovereign Clouds

這會跳出一份可供選擇的主權雲端清單。

Screenshot that shows where to connect to a sovereign cloud

一旦選定, Microsoft-sovereign-cloud.environment 在 VS Code 中開啟 在 VS Code Insiders 中開啟 設定將會自動完成設定。「資源」與「帳戶與租用戶」檢視也會重新整理,讓您可以登入您的主權雲端帳戶。

© . This site is unofficial and not affiliated with Microsoft.