You can call the DescribeAvailableZones operation to query the zones that are available to an instance.
Debugging
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 of the instance. Valid values:
|
| ZoneId | String | No | cn-hangzhou-e | The zone ID of the instance. If the instance spans more than one zone, the value of this parameter contains an |
| EngineVersion | String | No | 8.0 | The database engine version of the instance. Valid values:
|
| 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:
|
| DispenseMode | String | No | 0 | Specifies whether to return the zones in which the single-zone deployment method is supported. Valid values:
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 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:
|
| Category | String | No | HighAvailability | The RDS edition of the instance. Valid values:
|
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 in the region. |
|
| ZoneId | String | cn-hangzhou-e | The zone ID of the instance. |
| 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 of the instance. |
| SupportedEngineVersions | Array of SupportedEngineVersion | An array that consists of the database engine versions available in the zone. |
|
| Version | String | 8.0 | The database engine version of 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
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | ArticleNotFound | Article not found | The error message returned because no relevant articles are found. |
For a list of error codes, see Service error codes.