尝试以扩展 VS Code 中的代理模式!

适用于 Visual Studio Code 的 Azure 资源

Azure 资源扩展允许你直接在 VS Code 中无缝查看和管理你的 Azure 资源。它还提供了对 Azure 帐户和租户进行身份验证和管理的功能。

如何登录到你的 Azure 帐户

Azure 资源扩展使用 VS Code 内置的 Microsoft 身份验证提供程序来向 Azure 进行身份验证。通过在 Azure 资源视图中选择“登录到 Azure…”项来登录。

Screenshot that shows where to sign in to your Azure account

你还可以使用 Azure 资源扩展提供的“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 设置中。

帐户和租户视图

在 Azure 资源扩展中,你可以使用“帐户和租户”视图来管理和验证帐户和租户。

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 设置会自动设置。“资源”和“帐户和租户”视图也会刷新,允许你登录到你的主权云帐户。