調(diào)用DescribeRegions接口獲取地域列表。
調(diào)試
您可以在OpenAPI Explorer中直接運(yùn)行該接口,免去您計算簽名的困擾。運(yùn)行成功后,OpenAPI Explorer可以自動生成SDK代碼示例。
請求參數(shù)
名稱 | 類型 | 是否必選 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeRegions |
系統(tǒng)規(guī)定參數(shù)。取值:DescribeRegions。 |
返回數(shù)據(jù)
名稱 | 類型 | 示例值 | 描述 |
---|---|---|---|
Code | Integer | 200 |
錯誤代碼。 |
Message | String | success |
錯誤信息。 |
RequestId | String | C458B1E8-1683-3645-B154-6BA32080EEA |
請求ID。 |
Success | Boolean | true |
請求是否成功。 |
ErrorCode | Integer | 200 |
錯誤代碼。 |
Regions | Array of Region |
區(qū)域列表。 |
|
Region | |||
SupportPolarx10 | Boolean | true |
支持polardb-x 1.0版本。 |
SupportPolarx20 | Boolean | true |
支持polardb-x 2.0版本。 |
RegionId | String | ch-hangzhou |
實例ID。 |
Zones | Array of Zone |
可用區(qū)列表。 |
|
Zone | |||
ZoneId | String | cn-hangzhou-a |
可用區(qū)。 |
VpcEnabled | Boolean | true |
是否支持vpc。 |
示例
請求示例
http(s)://[Endpoint]/?Action=DescribeRegions
&公共請求參數(shù)
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeRegionsResponse>
<Code>200</Code>
<Message>success</Message>
<RequestId>C458B1E8-1683-3645-B154-6BA32080EEA</RequestId>
<Success>true</Success>
<ErrorCode>200</ErrorCode>
<Regions>
<SupportPolarx10>true</SupportPolarx10>
<SupportPolarx20>true</SupportPolarx20>
<RegionId>ch-hangzhou</RegionId>
<Zones>
<ZoneId>cn-hangzhou-a</ZoneId>
<VpcEnabled>true</VpcEnabled>
</Zones>
</Regions>
</DescribeRegionsResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"Code" : 200,
"Message" : "success",
"RequestId" : "C458B1E8-1683-3645-B154-6BA32080EEA",
"Success" : true,
"ErrorCode" : 200,
"Regions" : [ {
"SupportPolarx10" : true,
"SupportPolarx20" : true,
"RegionId" : "ch-hangzhou",
"Zones" : [ {
"ZoneId" : "cn-hangzhou-a",
"VpcEnabled" : true
} ]
} ]
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。