All Products
Search
Document Center

:DescribeZones

最終更新日:Dec 20, 2023

Queries the zones in a region.

Usage notes

When you call this operation, only a list of zones and some resource information of each zone are returned. If you want to query instance types and disk categories that are available for purchase in a specific zone, we recommend that you call the DescribeAvailableResource operation.

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 DescribeZones

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

RegionId String Yes cn-hangzhou

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

Verbose Boolean No false

Specifies whether to display detailed information.

  • true
  • false

Default value: true.

InstanceChargeType String No PostPaid

The billing method supported in the zone. For more information, see Billing overview. Valid values:

  • PrePaid: subscription
  • PostPaid: pay-as-you-go

Default value: PostPaid.

SpotStrategy String No NoSpot

The bidding policy for the pay-as-you-go instance. You can specify this parameter when the InstanceChargeType parameter is set to PostPaid. For more information, see Preemptible instances. Valid values:

  • NoSpot: The instance is a regular pay-as-you-go instance.
  • SpotWithPriceLimit: The instance is a preemptible instance with a user-defined maximum hourly price.
  • SpotAsPriceGo: The instance is a preemptible instance for which the market price is automatically used as the bidding price. The market price can be up to the pay-as-you-go price.

Default value: NoSpot.

AcceptLanguage String No zh-CN

The natural language that is used to filter responses. For more information, see RFC 7231. Valid values:

  • zh-CN: Chinese
  • en-US: English
  • ja: Japanese

Default value: zh-CN.

Response parameters

Parameter

Type

Example

Description

RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request.

Zones Array of Zone

Details about the zones and their supported resources.

Zone
ZoneId String cn-hangzhou-g

The zone ID.

ZoneType String AvailabilityZone

The type of the zone. Valid values:

  • AvailabilityZone: Alibaba Cloud public cloud zone
LocalName String Hangzhou Zone G

The name of the zone in the local language.

AvailableResources Array of ResourcesInfo

Details about the resources that can be created in the zone.

ResourcesInfo
IoOptimized Boolean true

Indicates whether I/O optimized instances are supported in the zone.

SystemDiskCategories Array of String cloud_essd

The categories of system disks that can be created. Valid values:

  • cloud: basic disk
  • cloud_efficiency: ultra disk
  • cloud_ssd: standard SSD
  • cloud_essd: enhanced SSD (ESSD)
InstanceGenerations Array of String ecs-6

The supported generations of instance families.

DataDiskCategories Array of String cloud_essd

The categories of data disks that can be created. Valid values:

  • cloud: basic disk
  • cloud_efficiency: ultra disk
  • cloud_ssd: standard SSD
  • cloud_essd: ESSD
  • ephemeral_ssd: local SSD
InstanceTypes Array of String ecs.g5.large

The instance types of I/O optimized instances of different network types that can be created in the zone.

InstanceTypeFamilies Array of String ecs.r7t

The supported instance families.

NetworkTypes Array of String vpc

The supported network types. Valid values:

  • VPC: Virtual Private Cloud (VPC)
  • Classic: classic network
AvailableResourceCreation Array of String DedicatedHost

The types of resources that can be created. Valid values:

  • VSwitch: vSwitch
  • IoOptimized: I/O optimized instance
  • Instance: instance
  • DedicatedHost: dedicated host
  • disk: cloud disk
DedicatedHostGenerations Array of String ddh-6

The supported generations of dedicated hosts.

AvailableInstanceTypes Array of String ecs.g6.xlarge

The supported instance types.

AvailableDiskCategories Array of String cloud

The categories of disks that can be created. Valid values:

  • cloud: basic disk
  • cloud_ssd: standard SSD
  • cloud_efficiency: ultra disk
  • cloud_essd: ESSD
AvailableDedicatedHostTypes Array of String ddh.g6

The supported dedicated host types.

AvailableVolumeCategories Array of String san_efficiency

The supported Shared Block Storage device categories.

Examples

Sample requests

https://ecs.aliyuncs.com/?Action=DescribeZones
&RegionId=cn-hangzhou
&InstanceChargeType=PostPaid
&SpotStrategy=NoSpot
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeZonesResponse>
    <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
    <Zones>
        <Zone>
            <DedicatedHostGenerations>
                <DedicatedHostGeneration>ddh-5</DedicatedHostGeneration>
                <DedicatedHostGeneration>ddh-6</DedicatedHostGeneration>
            </DedicatedHostGenerations>
            <AvailableInstanceTypes>
                <InstanceTypes>ecs.g6.xlarge</InstanceTypes>
                <InstanceTypes>ecs.g7t.4xlarge</InstanceTypes>
            </AvailableInstanceTypes>
            <ZoneId>cn-hangzhou-g</ZoneId>
            <AvailableDedicatedHostTypes>
                <DedicatedHostType>ddh.g6</DedicatedHostType>
                <DedicatedHostType>ddh.r6</DedicatedHostType>
            </AvailableDedicatedHostTypes>
            <AvailableResources>
                <ResourcesInfo>
                    <InstanceGenerations>
                        <supportedInstanceGeneration>ecs-5</supportedInstanceGeneration>
                        <supportedInstanceGeneration>ecs-6</supportedInstanceGeneration>
                    </InstanceGenerations>
                    <NetworkTypes>
                        <supportedNetworkCategory>vpc</supportedNetworkCategory>
                    </NetworkTypes>
                    <IoOptimized>true</IoOptimized>
                    <SystemDiskCategories>
                        <supportedSystemDiskCategory>cloud_efficiency</supportedSystemDiskCategory>
                        <supportedSystemDiskCategory>cloud_essd</supportedSystemDiskCategory>
                    </SystemDiskCategories>
                    <InstanceTypes>
                        <supportedInstanceType>ecs.c6.xlarge</supportedInstanceType>
                        <supportedInstanceType>ecs.g5.large</supportedInstanceType>
                    </InstanceTypes>
                    <InstanceTypeFamilies>
                        <supportedInstanceTypeFamily>ecs.r7t</supportedInstanceTypeFamily>
                        <supportedInstanceTypeFamily>ecs.r7</supportedInstanceTypeFamily>
                    </InstanceTypeFamilies>
                    <DataDiskCategories>
                        <supportedDataDiskCategory>cloud_efficiency</supportedDataDiskCategory>
                        <supportedDataDiskCategory>cloud_essd</supportedDataDiskCategory>
                    </DataDiskCategories>
                </ResourcesInfo>
            </AvailableResources>
            <AvailableDiskCategories>
                <DiskCategories>cloud_efficiency</DiskCategories>
                <DiskCategories>cloud_essd</DiskCategories>
            </AvailableDiskCategories>
            <ZoneType>AvailabilityZone</ZoneType>
            <LocalName>Hangzhou Zone G</LocalName>
            <AvailableResourceCreation>
                <ResourceTypes>VSwitch</ResourceTypes>
                <ResourceTypes>IoOptimized</ResourceTypes>
                <ResourceTypes>Instance</ResourceTypes>
                <ResourceTypes>DedicatedHost</ResourceTypes>
                <ResourceTypes>Disk</ResourceTypes>
            </AvailableResourceCreation>
            <AvailableVolumeCategories>
                <VolumeCategories>san_efficiency</VolumeCategories>
            </AvailableVolumeCategories>
        </Zone>
    </Zones>
</DescribeZonesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "Zones" : {
    "Zone" : [ {
      "DedicatedHostGenerations" : {
        "DedicatedHostGeneration" : [ "ddh-5", "ddh-6" ]
      },
      "AvailableInstanceTypes" : {
        "InstanceTypes" : [ "ecs.g6.xlarge", "ecs.g7t.4xlarge" ]
      },
      "ZoneId" : "cn-hangzhou-g",
      "AvailableDedicatedHostTypes" : {
        "DedicatedHostType" : [ "ddh.g6", "ddh.r6" ]
      },
      "AvailableResources" : {
        "ResourcesInfo" : [ {
          "InstanceGenerations" : {
            "supportedInstanceGeneration" : [ "ecs-5", "ecs-6" ]
          },
          "NetworkTypes" : {
            "supportedNetworkCategory" : [ "vpc" ]
          },
          "IoOptimized" : true,
          "SystemDiskCategories" : {
            "supportedSystemDiskCategory" : [ "cloud_efficiency", "cloud_essd" ]
          },
          "InstanceTypes" : {
            "supportedInstanceType" : [ "ecs.c6.xlarge", "ecs.g5.large" ]
          },
          "InstanceTypeFamilies" : {
            "supportedInstanceTypeFamily" : [ "ecs.r7t", "ecs.r7" ]
          },
          "DataDiskCategories" : {
            "supportedDataDiskCategory" : [ "cloud_efficiency", "cloud_essd" ]
          }
        } ]
      },
      "AvailableDiskCategories" : {
        "DiskCategories" : [ "cloud_efficiency", "cloud_essd" ]
      },
      "ZoneType" : "AvailabilityZone",
      "LocalName" : "Hangzhou Zone G",
      "AvailableResourceCreation" : {
        "ResourceTypes" : [ "VSwitch", "IoOptimized", "Instance", "DedicatedHost", "Disk" ]
      },
      "AvailableVolumeCategories" : {
        "VolumeCategories" : [ "san_efficiency" ]
      }
    } ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidSpotStrategy The specified SpotStrategy is not valid. Invalid SpotStrategy value.
404 InvalidRegionId.NotFound The specified RegionId does not exist. The RegionId is not found.
404 InvalidRegion.NotFound The specified parameter RegionId is not valid. Invalid RegionId value.
404 InvalidInstanceChargeType.NotFound The InstanceChargeType does not exist in our records The instance billing method is not found.
404 InvalidAcceptLanguage.NotFound Only Chinese (zh-CN), English (en-US), and Japanese (ja) are allowed. Invalid AcceptLanguage value. Valid values are zh-CN, en-US, and ja.

For a list of error codes, see Service error codes.