是否有API列出所有Azure区域? [英] Is there an API to list all Azure Regions?

查看:74
本文介绍了是否有API列出所有Azure区域?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过某个API列出所有Azure位置(我需要为每个区域生成一些配置文件,并使用Azure所做的确切命名以避免输入错误).我发现了这个问题,但它仅列出了特定区域订阅有权使用.

I would like to list all Azure locations via some API (I need to generate some config files for every region, and use the exact naming that Azure does to avoid typos). I found this question, but it only lists regions a particular subscription is authorized to use.

我想列出所有存在的区域,无论我的订阅是否可以访问.

I want to list all regions that exist whether my subscription has access or not.

推荐答案

Get-AzureRMLocation将为您提供针对其运行的帐户/租户/订阅的位置列表.

Get-AzureRMLocation will give you the list of locations for your account/tenant/subscription that you run it against.

从下面的答案中,这与Azure PS的较新版本完美配合!

From the answer below, this works perfectly with the newer version of Azure PS!

Get-AzLocation | select DisplayName, Location | Format-Table

这篇关于是否有API列出所有Azure区域?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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