На момент написания этой статьи, кажется, нет легкодоступного списка всех зон доступности по регионам для Aliyun.Чтобы получить полный список, вам нужно будет свернуть его с помощью инструмента Ali Cloud CLI .
. Он выплюнет стену JSON, поэтому также полезно быть на * nix.и иметь доступный инструмент jq .
Учитывая все это, все, что вам нужно, это короткий скрипт оболочки:
#!/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"