You can call the DescribeAvailableResource operation to query the resources that are available to a region.

Note You can call this operation up to 20 times within 1 minute.

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 DescribeAvailableResource

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

InstanceChargeType String Yes Postpaid

The billing method to query. Valid values:

  • Prepaid: subscription
  • Postpaid: pay-as-you-go
RegionId String No cn-hangzhou

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

ZoneId String No cn-hangzhou-b

The ID of the zone to query. If you specify more than one zone ID, separate these zone IDs with colons (:).

Engine String No MySQL

The database engine to query. Valid values:

  • MySQL
  • SQLServer
  • PostgreSQL
  • PPAS
  • MariaDB
EngineVersion String No 5.7

The database engine version to query. Valid values:

  • MySQL: 5.5, 5.6, 5.7, and 8.0
  • SQL Server: 2008r2, 2012, 2012_ent_ha, 2012_std_ha, 2012_web, 2014_std_ha, 2016_ent_ha, 2016_std_ha, 2016_web, and 2017_ent
  • PostgreSQL: 9.4 and 10.0
  • PPAS: 9.3 and 10.0
  • MariaDB: 10.3
DBInstanceClass String No rds.mysql.s1.small

The instance type to query. For more information, see Primary instance types.

OrderType String No BUY

The type of order to query. Set the value to BUY.

DBInstanceStorageType String No local_ssd

The type of storage media to query. Valid values:

  • local_ssd or ephemeral_ssd: local SSD
  • cloud_ssd: standard SSD
  • cloud_essd: enhanced SSD
Category String No Basic

The RDS edition to query. Valid values:

  • Basic: Basic Edition
  • HighAvailability: High-availability Edition
  • AlwaysOn: Cluster Edition
  • Finance: Enterprise Edition
DispenseMode Integer No 0

Specifies whether to return the zones that support the single-zone deployment method. Valid values:

  • 1: specifies to return the zones that support the single-zone deployment method.
  • 0: specifies not to return the zones that support the single-zone deployment method.

Default value: 0.

Note The single-zone deployment method allows you to deploy an instance that runs the Enterprise Edition in a single zone.

Response parameters

Parameter Type Example Description
AvailableZones Array of AvailableZone

An array that consists of zones that provide available resources.

AvailableZone
RegionId String cn-hangzhou

The ID of the region.

Status String Enable

Indicates whether the resources in the region can be purchased. Valid values:

  • Enable: The resources in the region can be purchased.
  • Disable: The resources in the region cannot be purchased.
SupportedEngines Array of SupportedEngine

An array that consists of available database engines.

SupportedEngine
Engine String MySQL

The database engine that is available.

SupportedEngineVersions Array of SupportedEngineVersion

An array that consists of available database engine versions.

SupportedEngineVersion
SupportedCategorys Array of SupportedCategory

An array that consists of available RDS editions.

SupportedCategory
Category String HighAvailability

The RDS edition that is available.

SupportedStorageTypes Array of SupportedStorageType

An array that consists of available storage types.

SupportedStorageType
AvailableResources Array of AvailableResource

An array that consists of available resources.

AvailableResource
DBInstanceClass String rds.mysql.s1.small

The instance type that is available.

DBInstanceStorageRange Struct

An array that consists of available storage capacity ranges.

Max Integer 2000

The maximum storage capacity that is available. Unit: GB.

Min Integer 5

The minimum storage capacity that is available. Unit: GB.

Step Integer 5

The incremental step of storage capacity. Unit: GB.

StorageRange String "{\"values\":[{\"max\":2000,\"min\":5,\"step\":5}]}"

The storage capacity range that is available. The range includes the maximum storage capacity, the minimum storage capacity, and the incremental step.

StorageType String local_ssd

The storage type that is available.

Version String 5.7

The database engine version that is available.

ZoneId String cn-hangzhou-b

The ID of the zone.

RequestId String A32E046E-2643-4B65-828D-23FEED4853A3

The ID of the request.

Examples

Sample requests

http(s)://rds.aliyuncs.com/? Action=DescribeAvailableResource
&InstanceChargeType=Postpaid
&<Common request parameters>

Sample success responses

XML format

<DescribeAvailableResourceResponse>
  <RequestId>A32E046E-2643-4B65-828D-23FEED4853A3</RequestId>
	  <AvailableZones>
		    <AvailableZone>
			      <Status>Enable</Status>
			      <RegionId>cn-hangzhou</RegionId>
			      <ZoneId>cn-hangzhou-b</ZoneId>
			      <SupportedEngines>
				        <SupportedEngine>
					          <SupportedEngineVersions>
						            <SupportedEngineVersion>
							              <Version>5.6</Version>
							              <SupportedCategorys>
								                <SupportedCategory>
									                  <Category>HighAvailability</Category>
									                  <SupportedStorageTypes>
										                    <SupportedStorageType>
											                      <AvailableResources>
												                        <AvailableResource>
													                          <StorageRange>{"values":[{"max":2000,"min":5,"step":5}]}</StorageRange>
													                          <DBInstanceClass>rds.mysql.s1.small</DBInstanceClass>
													                          <DBInstanceStorageRange>
														                            <Step>5</Step>
														                            <Max>2000</Max>
														                            <Min>5</Min>
													                          </DBInstanceStorageRange>
												                        </AvailableResource>
											                      </AvailableResources>
											                      <StorageType>local_ssd</StorageType>
										                    </SupportedStorageType>
									                  </SupportedStorageTypes>
								                </SupportedCategory>
							              </SupportedCategorys>
						            </SupportedEngineVersion>
					          </SupportedEngineVersions>
					          <Engine>MySQL</Engine>
				        </SupportedEngine>
			      </SupportedEngines>
		    </AvailableZone>
	  </AvailableZones>
</DescribeAvailableResourceResponse>

JSON format

{
	"RequestId": "A32E046E-2643-4B65-828D-23FEED4853A3",
	"AvailableZones": {
		"AvailableZone": [
			{
				"Status": "Enable",
				"RegionId": "cn-hangzhou",
				"ZoneId": "cn-hangzhou-b",
				"SupportedEngines": {
					"SupportedEngine": [
						{
							"SupportedEngineVersions": {
								"SupportedEngineVersion": [
									{
										"Version": "5.6",
										"SupportedCategorys": {
											"SupportedCategory": [
												{
													"Category": "HighAvailability",
													"SupportedStorageTypes": {
														"SupportedStorageType": [
															{
																"AvailableResources": {
																	"AvailableResource": [
																		{
																			"StorageRange": "{\"values\":[{\"max\":2000,\"min\":5,\"step\":5}]}",
																			"DBInstanceClass": "rds.mysql.s1.small",
																			"DBInstanceStorageRange": {
																				"Step": 5,
																				"Max": 2000,
																				"Min": 5
																			}
																		}
																	]
																},
																"StorageType": "local_ssd"
															}
														]
													}
												}
											]
										}
									}
								]
							},
							"Engine": "MySQL"
						}
					]
				}
			}
		]
	}
}

Error codes

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