You can call the DescribeAvailableZones operation to query the zones that are available to an ApsaraDB RDS instance.

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 DescribeAvailableZones

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

RegionId String Yes cn-hangzhou

The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list.

Engine String Yes MySQL

The database engine that is run by the instance. Valid values:

  • MySQL
  • SQLServer
  • PostgreSQL
  • MariaDB
ZoneId String No cn-hangzhou-e

The ID of the zone in which the instance is located. If the instance spans more than one zone, the value of this parameter contains an MAZ part, such as cn-hangzhou-MAZ6(b,f) and cn-hangzhou-MAZ5(b,e,f). You can call the DescribeRegions operation to query the most recent zone list.

EngineVersion String No 8.0

The version of the database engine that is run by the instance. Valid values:

  • Valid values when you set the Engine parameter to MySQL: 5.5, 5.6, 5.7, and 8.0
  • Valid values when you set the Engine parameter to SQLServer: 2008r2, 08r2_ent_ha, 2012, 2012_ent_ha, 2012_std_ha, 2012_web, 2014_std_ha, 2016_ent_ha, 2016_std_ha, 2016_web, 2017_std_ha, 2017_ent, 2019_std_ha, and 2019_ent
  • Valid values when you set the Engine parameter to PostgreSQL: 9.4, 10.0, 11.0, 12.0, 13.0 and 14.0
  • Valid values when you set the Engine parameter to MariaDB: 10.3
CommodityCode String No bards

The commodity code of the instance. This operation can return the resources that you can purchase based on the specified commodity code. Valid values:

  • bards: The instance is a pay-as-you-go primary instance. This value is available on the China site (aliyun.com).
  • rds: The instance is a subscription primary instance. This value is available on the China site (aliyun.com).
  • rords: The instance is a pay-as-you-go read-only instance. This value is available on the China site (aliyun.com).
  • rds_rordspre_public_cn: The instance is a subscription read-only instance. This value is available on the China site (aliyun.com).
  • bards_intl: The instance is a pay-as-you-go primary instance. This value is available on the International site (alibabacloud.com).
  • rds_intl: The instance is a subscription primary instance. This value is available on the International site (alibabacloud.com).
  • rords_intl: The instance is a pay-as-you-go read-only instance. This value is available on the International site (alibabacloud.com).
  • rds_rordspre_public_intl: The instance is a subscription read-only instance. This value is available on the International site (alibabacloud.com).
DispenseMode String No 0

Specifies whether to return the zones in which the single-zone deployment method is supported. Valid values:

  • 1: returns the zones.
  • 0: does not return the zones.

    Default value: 0.

Note The single-zone deployment method allows you to deploy an instance that runs RDS Enterprise Edition in a single zone.
DBInstanceName String No rm-uf6wjk5xxxxxxx

The ID of the primary RDS instance. If you want to query the read-only instances that you can purchase for a primary instance, you can specify this parameter.

If you set the CommodityCode parameter to one of the following values, you must specify this parameter:

  • rords_intl
  • rds_rordspre_public_intl
  • rords
  • rds_rordspre_public_cn
Category String No HighAvailability

The RDS edition of the instance. Valid values:

  • Basic: RDS Basic Edition
  • HighAvailability: RDS High-availability Edition
  • AlwaysOn: RDS Cluster Edition
  • Finance: RDS Enterprise Edition

Response parameters

Parameter Type Example Description
RequestId String 4256E149-C3C4-4FA7-BDEA-13CA415E8763

The ID of the request.

AvailableZones Array of AvailableZone

An array that consists of available zones.

ZoneId String cn-hangzhou-e

The ID of the zone in which the instance is located.

RegionId String cn-hangzhou

The region ID of the instance.

SupportedEngines Array of SupportedEngine

An array that consists of the database engines available in the zone.

Engine String MySQL

The database engine that is run by the instance.

SupportedEngineVersions Array of SupportedEngineVersion

An array that consists of the database engine versions available in the zone.

Version String 8.0

The version of the database engine that is run by the instance.

SupportedCategorys Array of SupportedCategory

An array that consists of the RDS editions available in the zone.

Category String HighAvailability

The RDS edition of the instance.

SupportedStorageTypes Array of SupportedStorageType

An array that consists of the storage types available in the zone.

StorageType String local_ssd

The storage type of the instance.

Examples

Sample requests

http(s)://rds.aliyuncs.com/?Action=DescribeAvailableZones
&RegionId=cn-hangzhou
&Engine=MySQL
&ZoneId=cn-hangzhou-e
&EngineVersion=8.0
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeAvailableZonesResponse>
<RequestId>4256E149-C3C4-4FA7-BDEA-13CA415E8763</RequestId>
<AvailableZones>
    <ZoneId>cn-hangzhou-e</ZoneId>
    <RegionId>cn-hangzhou</RegionId>
    <SupportedEngines>
        <SupportedEngineVersions>
            <Version>8.0</Version>
            <SupportedCategorys>
                <Category>HighAvailability</Category>
                <SupportedStorageTypes>
                    <StorageType>local_ssd</StorageType>
                </SupportedStorageTypes>
                <SupportedStorageTypes>
                    <StorageType>cloud_ssd</StorageType>
                </SupportedStorageTypes>
            </SupportedCategorys>
            <SupportedCategorys>
                <Category>Basic</Category>
                <SupportedStorageTypes>
                    <StorageType>cloud_ssd</StorageType>
                </SupportedStorageTypes>
            </SupportedCategorys>
        </SupportedEngineVersions>
        <Engine>MySQL</Engine>
    </SupportedEngines>
</AvailableZones>
</DescribeAvailableZonesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "4256E149-C3C4-4FA7-BDEA-13CA415E8763",
  "AvailableZones" : [ {
    "ZoneId" : "cn-hangzhou-e",
    "RegionId" : "cn-hangzhou",
    "SupportedEngines" : [ {
      "SupportedEngineVersions" : [ {
        "Version" : "8.0",
        "SupportedCategorys" : [ {
          "Category" : "HighAvailability",
          "SupportedStorageTypes" : [ {
            "StorageType" : "local_ssd"
          }, {
            "StorageType" : "cloud_ssd"
          } ]
        }, {
          "Category" : "Basic",
          "SupportedStorageTypes" : [ {
            "StorageType" : "cloud_ssd"
          } ]
        } ]
      } ],
      "Engine" : "MySQL"
    } ]
  } ]
}

Error codes

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