Azure ARM API返回大小写不一致的位置 [英] Azure ARM API returns locations with inconsistent case

查看:76
本文介绍了Azure ARM API返回大小写不一致的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

azure虚拟机列表和azure位置列表命令显示某些地区(例如,加拿大东部)的位置大小写不同(在其他位置也可能发生)

azure vm list and azure location list command shows different capitalization for location for some regions such as CanadaEast (might also happen in other locations)

复制步骤:

在加拿大东部部署虚拟机 运行Azure虚拟机列表 运行天青位置列表... 比较输出时,对于CanadaEast来说,您会得到不同的大写字母,但是在其他较早的地区,例如北欧,则总是小写

Deploy a vm in Canada East Run azure vm list run azure location lists ... When you compare outputs you get different capitalization for CanadaEast but other older regions such as North Europe are always in lowercase

$ azure location list data: data: Location : **canadaeast** data: DisplayName : Canada East data: Providers : Microsoft.ApiManagement, Microsoft.Batch, Microsoft.ClassicCompute, Microsoft.ClassicNetwork...
`

10:55 $ azure vm list
info:    Executing command vm list
+ Getting virtual machines                                                     
data:    ResourceGroupName  Name             ProvisioningState  PowerState  Location     Size       
data:    -----------------  ---------------  -----------------  ----------  -----------  -----------
data:    RG2FAILIMPORT      importmustfail   Succeeded          VM running  northeurope  Standard_A1
data:    ABIQUO-CANADAEAST  abq-8e2f880d-7f  Succeeded          VM running  **CanadaEast**   Basic_A0   
data:    ABIQUO-CANADAEAST  abq-db821ef0-b5  Succeeded          VM running  **CanadaEast**   Basic_A0   
info:    vm list command OK

`

此行为不一致,并且在比较或访问这些区域中的资源时导致第三方工具出现问题.它不仅限于VirtualMachines,还可以与图像和其他资源一起发生

This behavior is inconsistent and causes issues with 3rd party tools when comparing or accessing resources in these regions. It's not limited to VirtualMachines and also happens with Images and other resources

推荐答案

Gleb很有用-ARM不区分大小写,因此您的代码也不应该.

Gleb is spot on - ARM is not case sensitive, so your code should not be either.

这篇关于Azure ARM API返回大小写不一致的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆