2020-12-24 01:46:02 +00:00
|
|
|
# coding: utf-8
|
|
|
|
|
2021-01-16 06:42:05 +00:00
|
|
|
import types
|
|
|
|
|
2020-12-24 01:46:02 +00:00
|
|
|
from huaweicloudsdkcore.region.region import Region
|
|
|
|
|
|
|
|
|
|
|
|
class CceRegion:
|
|
|
|
def __init__(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
CN_NORTH_2 = Region(id="cn-north-2", endpoint="https://cce.cn-north-2.myhuaweicloud.com")
|
|
|
|
|
2021-01-16 06:42:05 +00:00
|
|
|
static_fields = types.MappingProxyType({
|
|
|
|
"cn-north-2": CN_NORTH_2,
|
|
|
|
})
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def value_of(region_id, static_fields=static_fields):
|
|
|
|
if region_id is None or len(region_id) == 0:
|
|
|
|
raise KeyError("Unexpected empty parameter: region_id.")
|
|
|
|
if not static_fields.get(region_id):
|
|
|
|
raise KeyError("Unexpected region_id: " + region_id)
|
|
|
|
return static_fields.get(region_id)
|
|
|
|
|
2020-12-24 01:46:02 +00:00
|
|
|
|