Queries available Elastic Compute Service (ECS) instance types.


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 ListAvailableEcsTypes

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

ZoneId String No cn-hangzhou-b

The ID of the zone where the cluster resides.

SpotStrategy String No NoSpot

The preemption policy of the ECS instance. Valid values:

  • NoSpot: The ECS instances are pay-as-you-go instances.
  • SpotWithPriceLimit: The ECS instances are preemptible instances that have a user-defined maximum hourly price.
  • SpotAsPriceGo: The ECS instances are preemptible instances for which the market price at the time of purchase is used as the bid price.
InstanceChargeType String No PostPaid

The billing method of the ECS instances. Valid values:

  • PostPaid: pay-as-you-go
  • PrePaid: subscription
ShowSoldOut Boolean No false

Specifies whether the ECS instances are sold out. Valid values:

  • false: available
  • true: out of sale

Default value: false

Response parameters

Parameter Type Example Description
InstanceTypeFamilies Array of InstanceTypeFamilyInfo

The instance family to which the instance type belongs.

Generation String ecs-3

The instance family.

InstanceTypeFamilyId String ecs.n4

The ID of the instance family. For more information, see Instance families.

Types Array of TypesInfo

The list of instance types.

CpuCoreCount Integer 4

The number of vCPUs.

EniQuantity Integer 2

The maximum number of elastic network interfaces (ENIs) that can be bound to an ECS instance.

GPUAmount Integer 2

The number of GPUs of an ECS instance.

GPUSpec String NVIDIA V100

The GPU type of the ECS instance.

InstanceBandwidthRx Integer 10240000

The maximum inbound internal bandwidth. Unit: Kbit/s.

InstanceBandwidthTx Integer 10240000

The maximum outbound internal bandwidth. Unit: Kbit/s.

InstancePpsRx Integer 9000000

The inbound packet forwarding rate of the internal network. Unit: pps.

InstancePpsTx Integer 9000000

The outbound packet forwarding rate over the internal network. Unit: pps.

InstanceTypeId String ecs.n4.xlarge

The ID of the ECS instance type.

MemorySize Integer 8

The memory size of the ECS instance. Unit: GiB.

Status String Available

The status of the ECS instance. Valid values:

  • SoldOut: out of sale
  • Available: available
ZoneIds List cn-hangzhou-b

The list of zone IDs.

RequestId String D9DD3AF8-1F91-4075-8669-55D10E45****

The ID of the request.

SupportSpotInstance Boolean false

Indicates whether preemptible instances are supported. Valid values:

  • false: not supported
  • true: supported


Sample requests

&<Common request parameters>

Sample success responses

XML format

                          <GPUSpec>NVIDIA V100</GPUSpec>

JSON format

    "SupportSpotInstance": false,
    "RequestId": "D9DD3AF8-1F91-4075-8669-55D10E45****",
    "InstanceTypeFamilies": {
        "InstanceTypeFamilyInfo": {
            "InstanceTypeFamilyId": "ecs.n4",
            "Generation": "ecs-3",
            "Types": {
                "TypesInfo": {
                    "Status": "Available",
                    "InstancePpsTx": 9000000,
                    "MemorySize": 8,
                    "GPUSpec": "NVIDIA V100",
                    "CpuCoreCount": 4,
                    "InstancePpsRx": 9000000,
                    "InstanceTypeId": "ecs.n4.xlarge",
                    "EniQuantity": 2,
                    "InstanceBandwidthRx": 10240000,
                    "GPUAmount": 2,
                    "InstanceBandwidthTx": 10240000,
                    "ZoneIds": {
                        "ZoneId": "cn-hangzhou-b"

Error codes

HttpCode Error code Error message Description
400 InvalidParams The specified parameter %s is invalid. The error message returned because the following parameter is invalid: %s.
407 NotAuthorized You are not authorized by RAM for this request. The error message returned because you are not authorized by RAM for this request.
406 EcsError An error occurred while calling the ECS API operation. The error message returned because the ECS API call has failed.
500 UnknownError An unknown error occurred. The error message returned because an unknown error has occurred.
503 ServiceUnavailable The request has failed due to a temporary failure of the server The error message returned because the request has failed. The service is temporarily unavailable.

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