Queries available Elastic Compute Service (ECS) instance types.

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 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.

InstanceTypeFamilyInfo
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.

TypesInfo
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

Examples

Sample requests

https://ehpc.cn-hangzhou.aliyuncs.com/?Action=ListAvailableEcsTypes
&ZoneId=cn-hangzhou-b
&<Common request parameters>

Sample success responses

XML format

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

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.