2017-01-19 15:08:56 +01:00
|
|
|
package common
|
|
|
|
|
|
|
|
// Region represents ECS region
|
|
|
|
type Region string
|
|
|
|
|
|
|
|
// Constants of region definition
|
|
|
|
const (
|
2017-03-24 12:04:56 +01:00
|
|
|
Hangzhou = Region("cn-hangzhou")
|
|
|
|
Qingdao = Region("cn-qingdao")
|
|
|
|
Beijing = Region("cn-beijing")
|
|
|
|
Hongkong = Region("cn-hongkong")
|
|
|
|
Shenzhen = Region("cn-shenzhen")
|
|
|
|
Shanghai = Region("cn-shanghai")
|
|
|
|
Zhangjiakou = Region("cn-zhangjiakou")
|
|
|
|
|
2017-01-19 15:08:56 +01:00
|
|
|
APSouthEast1 = Region("ap-southeast-1")
|
|
|
|
APNorthEast1 = Region("ap-northeast-1")
|
|
|
|
APSouthEast2 = Region("ap-southeast-2")
|
2017-03-24 12:04:56 +01:00
|
|
|
|
|
|
|
USWest1 = Region("us-west-1")
|
|
|
|
USEast1 = Region("us-east-1")
|
|
|
|
|
|
|
|
MEEast1 = Region("me-east-1")
|
|
|
|
|
|
|
|
EUCentral1 = Region("eu-central-1")
|
2017-01-19 15:08:56 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
var ValidRegions = []Region{
|
2017-03-24 12:04:56 +01:00
|
|
|
Hangzhou, Qingdao, Beijing, Shenzhen, Hongkong, Shanghai, Zhangjiakou,
|
2017-01-19 15:08:56 +01:00
|
|
|
USWest1, USEast1,
|
|
|
|
APNorthEast1, APSouthEast1, APSouthEast2,
|
|
|
|
MEEast1,
|
|
|
|
EUCentral1,
|
|
|
|
}
|