阿里云的区域帮助页面为您提供了完整的区域列表。这很有帮助。它们告诉您每个区域中有多少可用区也很有帮助。
没有帮助的是他们没有列出每个可用区的名称。二十分钟的谷歌搜索时间太长了,不能花在这上面。阿里云/阿里云可用区的完整列表在哪里?
阿里云的区域帮助页面为您提供了完整的区域列表。这很有帮助。它们告诉您每个区域中有多少可用区也很有帮助。
没有帮助的是他们没有列出每个可用区的名称。二十分钟的谷歌搜索时间太长了,不能花在这上面。阿里云/阿里云可用区的完整列表在哪里?
在撰写本文时,似乎还没有一个易于访问的阿里云按区域列出的所有可用区列表。要获取完整列表,您需要使用他们的Ali Cloud CLI 工具将其拉下。
它会吐出一堵 JSON 墙,所以在 *nix 上使用jq 工具也很有帮助。
鉴于这一切,您所需要的只是这个简短的 shell 脚本:
#!/usr/bin/env bash
for region in $( aliyun ecs DescribeRegions | jq '.Regions.Region[].RegionId' )
do
echo $region
reg=$( echo $region | sed s/\"//g )
echo '---'
for zone in $( aliyun ecs DescribeZones --RegionId $reg | jq '.Zones.Zone[].ZoneId' | sort )
do
echo $zone
done
echo ''
done
其输出如下。
"cn-qingdao"
---
"cn-qingdao-b"
"cn-qingdao-c"
"cn-beijing"
---
"cn-beijing-a"
"cn-beijing-b"
"cn-beijing-c"
"cn-beijing-d"
"cn-beijing-e"
"cn-beijing-f"
"cn-beijing-g"
"cn-zhangjiakou"
---
"cn-zhangjiakou-a"
"cn-zhangjiakou-b"
"cn-huhehaote"
---
"cn-huhehaote-a"
"cn-huhehaote-b"
"cn-hangzhou"
---
"cn-hangzhou-b"
"cn-hangzhou-c"
"cn-hangzhou-d"
"cn-hangzhou-e"
"cn-hangzhou-f"
"cn-hangzhou-g"
"cn-hangzhou-h"
"cn-shanghai"
---
"cn-shanghai-a"
"cn-shanghai-b"
"cn-shanghai-c"
"cn-shanghai-d"
"cn-shanghai-e"
"cn-shanghai-f"
"cn-shenzhen"
---
"cn-shenzhen-a"
"cn-shenzhen-b"
"cn-shenzhen-c"
"cn-shenzhen-d"
"cn-hongkong"
---
"cn-hongkong-a"
"cn-hongkong-b"
"cn-hongkong-c"
"ap-northeast-1"
---
"ap-northeast-1a"
"ap-southeast-1"
---
"ap-southeast-1a"
"ap-southeast-1b"
"ap-southeast-1c"
"ap-southeast-2"
---
"ap-southeast-2a"
"ap-southeast-2b"
"ap-southeast-3"
---
"ap-southeast-3a"
"ap-southeast-3b"
"ap-southeast-5"
---
"ap-southeast-5a"
"ap-south-1"
---
"ap-south-1a"
"ap-south-1b"
"us-east-1"
---
"us-east-1a"
"us-east-1b"
"us-west-1"
---
"us-west-1a"
"us-west-1b"
"eu-west-1"
---
"eu-west-1a"
"eu-west-1b"
"me-east-1"
---
"me-east-1a"
"eu-central-1"
---
"eu-central-1a"
"eu-central-1b"
阿里云在其网站本身中确实有关于“每个区域下可用区域的数量和该特定区域中可用的服务”的详细信息。请查看阿里云网站。