You can call the DescribeRegions operation to query the details about the regions that are available to ApsaraDB RDS.

Before you call the CreateDBInstance operation to create an instance, you can call the DescribeRegions operation to query the available regions and zones.

Note If a zone supports the multi-zone deployment method, the value of the ZoneId parameter for the zone contains an MAZ part. Examples: cn-hangzhou-MAZ6(b,f) and cn-hangzhou-MAZ5(b,e,f).

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeRegions

The operation that you want to perform. Set the value to DescribeRegions.

AcceptLanguage String No en-US

The language that is used for the return value of the LocalName parameter. Valid values:

  • zh-CN: Chinese
  • en-US: English

Default value: en-US.

Response parameters

Parameter Type Example Description
Regions Array of RDSRegion

An array that consists of the available regions and zones.

RDSRegion
RegionId String cn-hangzhou

The ID of the region.

ZoneId String cn-hangzhou-b

The ID of the zone.

LocalName String China (Hangzhou)

The name of the region.

Note

The return value of the LocalName parameter is in the language that is specified by the AcceptLanguage parameter.

  • If the value of the AcceptLanguage parameter is zh-CN, the region name returned is in Chinese.
  • If the value of the AcceptLanguage parameter is en-US, the region name returned is in English.
RegionEndpoint String rds.aliyuncs.com

The endpoint that is used to connect to Alibaba Cloud services in the region. For more information, see Request structure.

RequestId String 1AD222E9-E606-4A42-BF6D-8A4442913CEF

The ID of the request.

Examples

Sample requests

https://rds.aliyuncs.com/?Action=DescribeRegions
&<Common request parameters>

Sample success response

XML format

<DescribeRegionsResponse>
  <RequestId>1CE1DC20-7EFC-464F-9583-0AB8915C5697</RequestId>
  <Regions>
        <RDSRegion>
              <ZoneId>cn-hangzhou-h</ZoneId>
              <RegionId>cn-hangzhou</RegionId>
              <LocalName>China (Hangzhou)</LocalName>
              <RegionEndpoint>rds.aliyuncs.com</RegionEndpoint>
        </RDSRegion>
        <RDSRegion>
              <ZoneId>cn-hangzhou-MAZ10(h,i)</ZoneId>
              <RegionId>cn-hangzhou</RegionId>
              <LocalName>China (Hangzhou)</LocalName>
              <RegionEndpoint>rds.aliyuncs.com</RegionEndpoint>
        </RDSRegion>
        <RDSRegion>
              <ZoneId>cn-hangzhou-MAZ8(f,g)</ZoneId>
              <RegionId>cn-hangzhou</RegionId>
              <LocalName>China (Hangzhou)</LocalName>
              <RegionEndpoint>rds.aliyuncs.com</RegionEndpoint>
        </RDSRegion>
  </Regions>
</DescribeRegionsResponse>

JSON format

{
  "RequestId": "1CE1DC20-7EFC-464F-9583-0AB8915C5697",
  "Regions": {
    "RDSRegion": [
      {
        "ZoneId": "cn-hangzhou-h",
        "RegionId": "cn-hangzhou",
        "LocalName": "China (Hangzhou)",
        "RegionEndpoint": "rds.aliyuncs.com"
      },
      {
        "ZoneId": "cn-hangzhou-MAZ10(h,i)",
        "RegionId": "cn-hangzhou",
        "LocalName": "China (Hangzhou)",
        "RegionEndpoint": "rds.aliyuncs.com"
      },
      {
        "ZoneId": "cn-hangzhou-MAZ8(f,g)",
        "RegionId": "cn-hangzhou",
        "LocalName": "China (Hangzhou)",
        "RegionEndpoint": "rds.aliyuncs.com"
      }
    ]
  }
}

Error codes

HTTP status code Error code Error message Description
404 InvalidAcceptLanguage.NotFound Only Chinese (zh-CN) and English (en-US) are allowed. The error message returned because the value that you specify for the AcceptLanguage parameter is invalid. The valid values of this parameter are zh-CN and en-US.

For a list of error codes, visit the API Error Center.