Queries available Alibaba Cloud regions.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeRegions |
The operation that you want to perform. Set the value to DescribeRegions. |
InstanceChargeType | String | No | PrePaid |
The billing method of the instance. For more information, see Billing overview. Valid values:
Default value: PostPaid. |
ResourceType | String | No | instance |
The type of the resource. Valid values:
Default value: instance. |
AcceptLanguage | String | No | zh-CN |
The natural language that is used to filter responses. For more information, visit RFC 7231. Valid values:
Default value: zh-CN. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Regions | Array |
Details about the regions. |
|
Region | |||
LocalName | String | China (Qingdao) |
The name of the region. |
RegionEndpoint | String | ecs.aliyuncs.com |
The endpoint of the region. |
RegionId | String | cn-qingdao-et2-bo1 |
The ID of the region. |
Status | String | available |
Indicates whether clusters are sold out. Valid values:
|
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
The ID of the request. |
Examples
Sample requests
https://ecs.aliyuncs.com/?Action=DescribeRegions
&RegionId=cn-qingdao
&InstanceChargeType=PrePaid
&ResourceType=Instance
&AcceptLanguage=en-US
&<Common request parameters>
Sample success responses
XML
format
<DescribeRegionsResponse>
<RequestId>38EC7366-F5A9-46B1-BDB1-0FDC2E296397</RequestId>
<Regions>
<Region>
<RegionId>cn-qingdao-et2-bo1</RegionId>
<RegionEndpoint>ecs.aliyuncs.com</RegionEndpoint>
<LocalName>China (Qingdao)</LocalName>
</Region>
<Region>
<RegionId>cn-qingdao-nebula</RegionId>
<RegionEndpoint>ecs.cn-qingdao-nebula.aliyuncs.com</RegionEndpoint>
<LocalName>cn-qingdao-nebula</LocalName>
</Region>
</Regions>
</DescribeRegionsResponse>
JSON
format
{
"RequestId": "38EC7366-F5A9-46B1-BDB1-0FDC2E296397",
"Regions": {
"Region": [
{
"RegionId": "cn-qingdao-et2-b01",
"RegionEndpoint": "ecs.aliyuncs.com",
"LocalName": "China (Qingdao)"
},
{
"RegionId": "cn-qingdao-nebula",
"RegionEndpoint": "ecs.cn-qingdao-nebula.aliyuncs.com",
"LocalName": "cn-qingdao-nebula"
}
]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
403 | Unauthorized.EmptyRegion | The specified account has no access authority to any region. | The error message returned because you are not authorized to access any regions. Apply for permissions and try again. |
404 | InvalidAcceptLanguage.NotFound | Only Chinese (zh-CN), English (en-US), and Japanese (ja) are allowed. | The error message returned because the specified AcceptLanguage parameter is invalid. Valid values are zh-CN, en-US, and ja. |
404 | InvalidResourceType.NotFound | The ResourceType provided does not exist in our records. | The error message returned because the specified ResourceType parameter does not exist. |
For a list of error codes, visit the API Error Center.