You can call the DescribeAvailableZones operation to query the zones and resources 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 on the instance. Valid values:

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

The zone ID of the instance. If you use the multi-zone deployment method, the value of this parameter contains an MAZ part, such as cn-hangzhou-MAZ(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 on the instance. Valid values:

  • MySQL: 5.5, 5.6, 5.7, and 8.0
  • SQL Server: 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
  • PostgreSQL: 9.4, 10.0, 11.0, and 12.0
  • PPAS: 9.3 and 10.0
  • 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 primary instance that is billed on a pay-as-you-go basis. This value is available on the China site (aliyun.com).
  • rds: The instance is a primary instance that is billed on a subscription basis. This value is available on the China site (aliyun.com).
  • rords: The instance is a read-only instance that is billed on a pay-as-you-go basis. This value is available on the China site (aliyun.com).
  • rds_rordspre_public_cn: The instance is a read-only instance that is billed on a subscription basis. This value is available on the China site (aliyun.com).
  • bards_intl: The instance is a primary instance that is billed on a pay-as-you-go basis. This value is available on the International site (alibabacloud.com).
  • rds_intl: The instance is a primary instance that is billed on a subscription basis. This value is available on the International site (alibabacloud.com).
  • rords_intl: The instance is a read-only instance that is billed on a pay-as-you-go basis. This value is available on the International site (alibabacloud.com).
  • rds_rordspre_public_intl: The instance is a read-only instance that is billed on a subscription basis. 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 in which the single-zone deployment method is supported.
  • 0: returns the zones in which the single-zone deployment method is supported.

    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 instance. If you want to query the read-only instance resources 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

Response parameters

Parameter Type Example Description
AvailableZones Array of AvailableZone

An array that consists of available zones and resources available in the zones.

RegionId String cn-hangzhou

The region ID of the zone.

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 on the instance.

SupportedEngineVersions Array of SupportedEngineVersion

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

SupportedCategorys Array of SupportedCategory

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

Category String HighAvailability

The RDS edition that is run on the instances.

SupportedStorageTypes Array of SupportedStorageType

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

StorageType String local_ssd

The type of storage media that is used for the instance.

Version String 8.0

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

ZoneId String cn-hangzhou-e

The ID of the zone.

RequestId String 4256E149-C3C4-4FA7-BDEA-13CA415E8763

The ID of the request.

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

<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

{
	"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.