Queries the ECS instance families that are available in a specified region and zone.

Description

When you call the CreateContainerGroup operation to create an elastic container instance, you can use the InstanceType parameter to specify one or more ECS instance types that fit your specific needs. To ensure that the elastic container instance can be created, you can call the DescribeAvailableResource operation to query which ECS instance families are available in the specified region and zone.

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 DescribeAvailableResource

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

RegionId String Yes cn-hangzhou

The region ID of the ECS instance families.

You can call the DescribeRegions operation to query the most recent region list.

ZoneId String No cn-hangzhou-e

The zone ID of the ECS instance families.

This parameter is empty by default, which indicates that ECS instance families available in all zones in the specified region are queried.

DestinationResource Object Yes

The information about the resource that you want to query.

Category String Yes InstanceTypeFamily

The category of the resource. Set the value to InstanceTypeFamily, which indicates instance families.

Value String No ecs.c6

Specifies instance families.

Response parameters

Parameter Type Example Description
RequestId String 6829735A-FF76-58C6-AECB-27CBF135A7AA

The ID of the request.

AvailableZones Array of AvailableZone

An array of zones in which the specified resources are available.

AvailableZone
RegionId String cn-hangzhou

The region ID of the ECS instance families.

ZoneId String cn-hangzhou-e

The zone ID of the ECS instance families.

AvailableResources Array of AvailableResource

An array of the resources available in the specified zones.

AvailableResource
Type String InstanceTypeFamily

The type of the resource. Set the value to InstanceTypeFamily, which indicates instance families.

SupportedResources Array of SupportedResource

An array of resources available in the zones.

SupportedResource
Value String ecs.c6

When the return value of the Type parameter is InstanceTypeFamily, this parameter indicates instance families that are returned.

Examples

Sample requests

https://eci.aliyuncs.com/?Action=DescribeAvailableResource
&RegionId=cn-hangzhou
&ZoneId=cn-hangzhou-e
&DestinationResource={"Category":"InstanceTypeFamily"}
&Common request parameters

Sample success responses

XML format

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

<DescribeAvailableResourceResponse>
    <RequestId>6829735A-FF76-58C6-AECB-27CBF135A7AA</RequestId>
    <AvailableZones>
        <AvailableZone>
            <ZoneId>cn-hangzhou-e</ZoneId>
            <AvailableResources>
                <AvailableResource>
                    <Type>InstanceTypeFamily</Type>
                    <SupportedResources>
                        <SupportedResource>
                            <Value>ecs.e3</Value>
                        </SupportedResource>
                        <SupportedResource>
                            <Value>ecs.n2</Value>
                        </SupportedResource>
                        <SupportedResource>
                            <Value>ecs.n1</Value>
                        </SupportedResource>
                    </SupportedResources>
                </AvailableResource>
            </AvailableResources>
            <RegionId>cn-hangzhou</RegionId>
        </AvailableZone>
    </AvailableZones>
</DescribeAvailableResourceResponse>

JSON format

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

{
  "RequestId" : "6829735A-FF76-58C6-AECB-27CBF135A7AA",
  "AvailableZones" : {
    "AvailableZone" : [ {
      "ZoneId" : "cn-hangzhou-e",
      "AvailableResources" : {
        "AvailableResource" : [ {
          "Type" : "InstanceTypeFamily",
          "SupportedResources" : {
            "SupportedResource" : [ {
              "Value" : "ecs.e3"
            }, {
              "Value" : "ecs.n2"
            }, {
              "Value" : "ecs.n1"
            } ]
          }
        } ]
      },
      "RegionId" : "cn-hangzhou"
    } ]
  }
}

Error codes

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