简体   繁体   English

Azure CLI 显示资源组位置

[英]Azure CLI Show Resource Group Locations

So i'm trying to let the Azure CLI show all the possible location i can use for making a resource group所以我试图让 Azure CLI 显示我可以用来制作资源组的所有可能位置

I am searching for a command similar to az account list-locations the reason i am not using the account list-location line is because for an example one of the locations is Australiacentral2 which does not exist for making a resource group but does exist for account locations我正在搜索类似于az account list-locations的命令,我不使用 account list-location 行的原因是因为例如其中一个位置是 Australiacentral2,它不存在用于创建资源组但确实存在用于帐户地点

First I need to point out, the Azure CLI command az account list-locations does in fact list all the available areas for your subscription. 首先,我需要指出,Azure CLI命令az account list-locations确实列出了订阅的所有可用区域。 However, some of these regions such as Australia Central 2 or the India regions require you go apply to deploy there. 但是,其中一些区域(如澳大利亚中部2或印度区域)需要您申请在那里部署。

And it seems there is no other command can do better than it as the portal. 似乎没有其他命令比门户更好。 Seems like a gap between the Portal Experience and the CLI experience. 门户体验和CLI体验之间似乎有些差距。

You can bring up this issue directly to the Azure CLI team using this link . 您可以使用此链接直接向Azure CLI团队提出此问题。

You can also use: 您还可以使用:

az provider list

which includes available locations for different resource types for your subscription. 其中包括您订阅的不同资源类型的可用位置。

Best regards, Johan Stenberg 最好的问候,约翰·斯坦伯格

My answer here is just for the history:我在这里的回答只是为了历史:
az provider list --query "[?namespace=='Microsoft.Resources'].[resourceTypes[?resourceType=='resourceGroups'].locations[]][][]"

The output: output:

[
  "Central US",
  "East Asia",
  "Southeast Asia",
  "East US",
  "East US 2",
  "West US",
  "West US 2",
  "North Central US",
  "South Central US",
  "West Central US",
  "North Europe",
  "West Europe",
  "Japan East",
  "Japan West",
  "Brazil South",
  "Australia Southeast",
  "Australia East",
  "West India",
  "South India",
  "Central India",
  "Canada Central",
  "Canada East",
  "UK South",
  "UK West",
  "Korea Central",
  "Korea South",
  "France Central",
  "South Africa North",
  "UAE North",
  "Australia Central",
  "Switzerland North",
  "Germany West Central",
  "Norway East",
  "West US 3",
  "Sweden Central"
]

To pass these regions to the az group create command just remove spaces and lowercase.要将这些区域传递给az group create命令,只需删除空格和小写字母。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure 资源和资源组的工作簿参数 - Azure Workbook parameter for resource and resource group 使用 Bicep 在 Azure 中创建和删除资源组 - Create and Delete Resource Group in Azure using Bicep 获取Azure资源组用户的有效权限 - Get effective permissions for user in Azure Resource Group Azure 索引策略未应用于资源组 - Azure indexed policy not being applied to resource group 获取Azure资源组创建时间 - Get Azure resource group creation time 在 GCP 中,azure 可用性集、azure 磁盘外部、azure.network 接口、azure 资源组的替代方案是什么 - what is an alternative of azure availability set, azure disk external, azure network interface, azure resource group, in GCP 没有足够的核心来为学生部署 Azure 上的资源组错误 - Not enough cores to deploy resource group error on Azure for Students 获取 TSV 文件 output 从 Azure CLI 中的 az 资源列表中排除 2 种资源类型 - Getting TSV file output excluding 2 resource types from the az resource list in Azure CLI 将 ARM 模板部署到 Azure 资源组时出现授权错误 - Authorisation errors when deploying ARM templates to Azure Resource Group 一个 Azure 资源组可能只有一个 SFTP 服务器吗? - Only one SFTP Server for one Azure Resource group possible?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM