This article introduces how to use DescribeZones to query the availability zones in a region, and focuses on the specific steps. The content of this article is compact, and I hope you can gain something from it.
DescribeZones
Request Parameters
Return Parameters
##Example
Request Example
https://ecs.aliyuncs.com/?Action=DescribeZones &RegionId=cn-hangzhou &<公共请求参数>
Return example
XML format
<DescribeZonesResponse> <Zones> <Zone> <AvailableResourceCreation> <ResourceTypes>Instance</ResourceTypes> <ResourceTypes>Disk</ResourceTypes> </AvailableResourceCreation> <LocalName></LocalName> <ZoneId>cn-hangzhou-d</ZoneId> <AvailableDiskCategories> <DiskCategories>cloud</DiskCategories> </AvailableDiskCategories> </Zone> <Zone> <AvailableResourceCreation> <ResourceTypes>Instance</ResourceTypes> <ResourceTypes>Disk</ResourceTypes> </AvailableResourceCreation> <LocalName></LocalName> <ZoneId>cn-hangzhou-b</ZoneId> <AvailableDiskCategories> <DiskCategories>cloud</DiskCategories> </AvailableDiskCategories> </Zone> </Zones> <RequestId>6DB97BCC-92BA-424D-A7C8-3F6486612BAE</RequestId> </DescribeZonesResponse>
JSON format
{ "RequestId": "A347EF0E-BBCC-4EFA-BD79-27AA3ACFD1BF", "Zones": { "Zone": [ { "AvailableDiskCategories": { "DiskCategories": [ "cloud" ] }, "AvailableResourceCreation": { "ResourceTypes": [ "Instance", "Disk" ] }, "LocalName": "", "ZoneId": "cn-hangzhou-d" }, { "AvailableDiskCategories": { "DiskCategories": [ "cloud" ] }, "AvailableResourceCreation": { "ResourceTypes": [ "Instance", "Disk" ] }, "LocalName": "", "ZoneId": "cn-hangzhou-b" } ] } }
Error codes
are all public error codes. For more error codes, please visit the API Error Center.The above is the detailed content of How to use DescribeZones to query the availability zones in a region. For more information, please follow other related articles on the PHP Chinese website!