You can call this API to query the zones where ApsaraDB for Redis instances can be created.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. You can use OpenAPI Explorer to search for APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeZones

The operation that you want to perform. Set this parameter to DescribeZones.

AcceptLanguage String No en-US

The language used for the value to return. Valid values:

  • zh-CN: Chinese.
  • en-US: English.
  • ja: Japanese.
Note Default value: zh-CN.
AccessKeyId String No Lxxxxxxxxxxxxxxw

The AccessKey ID that Alibaba Cloud provides for you to access services.

Response parameters

Parameter Type Example Description
Zones

The zones that were returned.

└IsRds Boolean true

Indicates whether the zone is managed by Relational Database Service (RDS). The value of this parameter is true for ApsaraDB for Redis.

└RegionId String cn-huhehaote

The ID of the region to which the zone belongs.

└SwitchNetwork Boolean true

Indicates whether the zone allows you to switch the network type of an ApsaraDB for Redis instance from classic network to Virtual Private Cloud (VPC). Valid values:

  • true
  • false
└ZoneId String cn-huhehaote-b

The ID of the zone.

└ZoneName String Hohhot Zone B

The name of the zone.

RequestId String 1D42F072-72FE-4DC4-BB8E-64B1D298182E

The ID of the request.

Examples

Sample request


https://r-kvstore.aliyuncs.com/
? Action=DescribeZones
&<Common request parameters>

Sample success response

XML format

<DescribeZonesResponse>
  <RequestId>1D42F072-72FE-4DC4-BB8E-64B1D298182E</RequestId>
  <Zones>
    <KVStoreZone>
      <ZoneName>Hohhot Zone B</ZoneName>
      <IsRds>true</IsRds>
      <Disabled>false</Disabled>
      <RegionId>cn-huhehaote</RegionId>
      <ZoneId>cn-huhehaote-b</ZoneId>
      <SwitchNetwork>true</SwitchNetwork>
    </KVStoreZone>
    <KVStoreZone>
      <ZoneName>Hohhot Zone A</ZoneName>
      <IsRds>true</IsRds>
      <Disabled>false</Disabled>
      <RegionId>cn-huhehaote</RegionId>
      <ZoneId>cn-huhehaote-a</ZoneId>
      <SwitchNetwork>true</SwitchNetwork>
    </KVStoreZone>
  </Zones>
</DescribeZonesResponse>

JSON format

{
	"RequestId":"1D42F072-72FE-4DC4-BB8E-64B1D298182E",
	"Zones":{
		"KVStoreZone":[
			{
				"ZoneName":"Hohhot Zone B",
				"IsRds":true,
				"RegionId":"cn-huhehaote",
				"Disabled":false,
				"ZoneId":"cn-huhehaote-b",
				"SwitchNetwork":true
			},
			{
				"ZoneName":"Hohhot Zone A",
				"IsRds":true,
				"RegionId":"cn-huhehaote",
				"Disabled":false,
				"ZoneId":"cn-huhehaote-a",
				"SwitchNetwork":true
			}
		]
	}
}

Error codes

For more information, see Error codes.