Queries the quotas of Elastic Compute Service (ECS) resources that you can create in an Alibaba Cloud region. For a specific region, you can query the maximum numbers of security groups, elastic network interfaces (ENIs), vCPUs for pay-as-you-go instances, vCPUs for preemptible instances, and dedicated hosts that you can create and the capacity quotas for pay-as-you-go disks that you can create. You can also query information such as network types or whether an account has completed real-name verification.

Description

After you create an Alibaba Cloud account, you can create a specific number of ECS instances in different regions within the account. For more information, see Limits.

You can also submit a ticket to request a quota increase.

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 DescribeAccountAttributes

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

RegionId String Yes cn-hangzhou

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

ZoneId String No cn-hangzhou-b

The ID of the zone.

AttributeName.N String No max-security-groups

The type of resource quota N. Valid values of N: 1 to 8. Valid values:

  • instance-network-type: available network types
  • max-security-groups: the maximum number of security groups
  • max-elastic-network-interfaces: the maximum number of ENIs
  • max-postpaid-instance-vcpu-count: the maximum number of vCPUs for pay-as-you-go instances
  • max-spot-instance-vcpu-count: the maximum number of vCPUs for preemptible instances
  • used-postpaid-instance-vcpu-count: the number of vCPUs that have been allocated to pay-as-you-go instances
  • used-spot-instance-vcpu-count: the number of vCPUs that have been allocated to preemptible instances
  • max-postpaid-yundisk-capacity: the maximum capacity of pay-as-you-go data disks
  • used-postpaid-yundisk-capacity: the capacity of pay-as-you-go disks that have been created
  • max-dedicated-hosts: the maximum number of dedicated hosts
  • supported-postpaid-instance-types: the instance types of pay-as-you-go I/O optimized instances
  • max-axt-command-count: the maximum number of Cloud Assistant commands
  • max-axt-invocation-daily: the maximum number of Cloud Assistant command executions per day
  • max-cloud-assistant-activation-count: the maximum number of activation codes that can be created to use to register managed instances
  • real-name-authentication: whether an account has completed real-name verification
    Note You must complete real-name verification before you can create ECS instances in the Chinese mainland regions.

By default, this parameter is empty.

Response parameters

Parameter Type Example Description
RequestId String 8CE45CD5-31FB-47C2-959D-CA8144CE****

The ID of the request.

AccountAttributeItems Array of AccountAttributeItem

Details about account privileges specified by AccountAttributeItem in the specified region.

AccountAttributeItem
AttributeName String max-security-groups

The type of the resource quota in the specified region. Valid values:

  • instance-network-type: available network types
  • max-security-groups: the maximum number of security groups
  • max-elastic-network-interfaces: the maximum number of ENIs
  • max-postpaid-instance-vcpu-count: the maximum number of vCPUs for pay-as-you-go instances
  • max-spot-instance-vcpu-count: the maximum number of vCPUs for preemptible instances
  • used-postpaid-instance-vcpu-count: the number of vCPUs that have been allocated to pay-as-you-go instances
  • used-spot-instance-vcpu-count: the number of vCPUs that have been allocated to preemptible instances
  • max-postpaid-yundisk-capacity: the maximum capacity of pay-as-you-go data disks
  • used-postpaid-yundisk-capacity: the capacity of pay-as-you-go disks that have been created
  • max-dedicated-hosts: the maximum number of dedicated hosts
  • supported-postpaid-instance-types: the instance types of pay-as-you-go I/O optimized instances
  • max-axt-command-count: the maximum number of Cloud Assistant commands
  • max-axt-invocation-daily: the maximum number of Cloud Assistant command executions per day
  • real-name-authentication: whether an account has completed real-name verification
  • max-cloud-assistant-activation-count: the maximum number of activation codes that can be created to use to register managed instances
AttributeValues Array of ValueItem

The specific values of resource quotas.

ValueItem
DiskCategory String cloud_ssd

The category of the data disk. Valid values:

  • cloud_efficiency: ultra disk
  • cloud_ssd: standard SSD
  • cloud_essd: enhanced SSD (ESSD)
Value String 800

The value of the resource quota in the specified region. Valid values:

The values returned for the resource quotas to which the following AttributeName values correspond are 0 or positive integers:

  • max-security-groups
  • max-elastic-network-interfaces
  • max-postpaid-instance-vcpu-count
  • max-spot-instance-vcpu-count
  • used-postpaid-instance-vcpu-count
  • used-spot-instance-vcpu-count
  • max-postpaid-yundisk-capacity
  • used-postpaid-yundisk-capacity
  • max-dedicated-hosts
  • max-axt-command-count
  • max-axt-invocation-daily
  • max-cloud-assistant-activation-count

When the AttributeName parameter is set to supported-postpay-instance-types, an instance type is returned. For more information, see Instance families.

When the AttributeName parameter is set to real-name-authentications, one of the following values is returned:

  • yes
  • none
  • unnecessary

When the AttributeName parameter is set to instance-network-type, one of the following values is returned:

  • vpc
  • classic
ExpiredTime String 2019-01-01T12:30:00Z

The expiration time of a privilege. This parameter is returned only when the account privilege has an expiration time. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

ZoneId String cn-hangzhou-b

The ID of the zone.

InstanceType String ecs.g5.large

The instance type.

Count Integer 3

The number of privilege attributes in the account.

InstanceChargeType String PrePaid

The billing method of the instance.

Examples

Sample requests

https://ecs.aliyuncs.com/?Action=DescribeAccountAttributes
&RegionId=cn-hangzhou
&ZoneId=cn-hangzhou-b
&AttributeName.1=max-security-groups
&<Common request parameters>

Sample success response

XML format

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

<DescribeAccountAttributesResponse>
    <AccountAttributeItems>
        <AccountAttributeItem>
            <AttributeValues>
                <ValueItem>
                    <Value>100</Value>
                </ValueItem>
            </AttributeValues>
            <AttributeName>max-security-groups</AttributeName>
        </AccountAttributeItem>
        <AccountAttributeItem>
            <AttributeValues>
                <ValueItem>
                    <Value>2</Value>
                </ValueItem>
            </AttributeValues>
            <AttributeName>max-dedicated-hosts</AttributeName>
        </AccountAttributeItem>
        <AccountAttributeItem>
            <AttributeValues>
                <ValueItem>
                    <Value>1000</Value>
                </ValueItem>
            </AttributeValues>
            <AttributeName>max-postpaid-instance-vcpu-count</AttributeName>
        </AccountAttributeItem>
        <AccountAttributeItem>
            <AttributeValues>
                <ValueItem>
                    <Value>1000</Value>
                </ValueItem>
            </AttributeValues>
            <AttributeName>max-spot-instance-vcpu-count</AttributeName>
        </AccountAttributeItem>
        <AccountAttributeItem>
            <AttributeValues>
                <ValueItem>
                    <Value>5000</Value>
                </ValueItem>
            </AttributeValues>
            <AttributeName>max-elastic-network-interfaces</AttributeName>
        </AccountAttributeItem>
        <AccountAttributeItem>
            <AttributeValues>
                <ValueItem>
                    <Value>yes</Value>
                </ValueItem>
            </AttributeValues>
            <AttributeName>real-name-authentication</AttributeName>
        </AccountAttributeItem>
        <AccountAttributeItem>
            <AttributeValues>
                <ValueItem>
                    <Value>vpc</Value>
                </ValueItem>
            </AttributeValues>
            <AttributeName>instance-network-type</AttributeName>
        </AccountAttributeItem>
        <AccountAttributeItem>
            <AttributeValues>
                <ValueItem>
                    <Value>229376</Value>
                    <DiskCategory>cloud_efficiency</DiskCategory>
                </ValueItem>
                <ValueItem>
                    <Value>204800</Value>
                    <DiskCategory>cloud_ssd</DiskCategory>
                </ValueItem>
                <ValueItem>
                    <Value>204800</Value>
                    <DiskCategory>cloud_essd</DiskCategory>
                </ValueItem>
            </AttributeValues>
            <AttributeName>max-postpaid-yundisk-capacity</AttributeName>
        </AccountAttributeItem>
        <AccountAttributeItem>
            <AttributeValues>
                <ValueItem>
                    <Value>ecs.f3-c16f1.4xlarge</Value>
                </ValueItem>
                <ValueItem>
                    <Value>ecs.g5.2xlarge</Value>
                </ValueItem>
            </AttributeValues>
            <AttributeName>supported-postpaid-instance-types</AttributeName>
        </AccountAttributeItem>
    </AccountAttributeItems>
    <RequestId>8CE45CD5-31FB-47C2-959D-CA8144CE****</RequestId>
</DescribeAccountAttributesResponse>

JSON format

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

{
  "AccountAttributeItems" : {
    "AccountAttributeItem" : [ {
      "AttributeValues" : {
        "ValueItem" : [ {
          "Value" : "100"
        } ]
      },
      "AttributeName" : "max-security-groups"
    }, {
      "AttributeValues" : {
        "ValueItem" : [ {
          "Value" : "2"
        } ]
      },
      "AttributeName" : "max-dedicated-hosts"
    }, {
      "AttributeValues" : {
        "ValueItem" : [ {
          "Value" : "1000"
        } ]
      },
      "AttributeName" : "max-postpaid-instance-vcpu-count"
    }, {
      "AttributeValues" : {
        "ValueItem" : [ {
          "Value" : "1000"
        } ]
      },
      "AttributeName" : "max-spot-instance-vcpu-count"
    }, {
      "AttributeValues" : {
        "ValueItem" : [ {
          "Value" : "5000"
        } ]
      },
      "AttributeName" : "max-elastic-network-interfaces"
    }, {
      "AttributeValues" : {
        "ValueItem" : [ {
          "Value" : "yes"
        } ]
      },
      "AttributeName" : "real-name-authentication"
    }, {
      "AttributeValues" : {
        "ValueItem" : [ {
          "Value" : "vpc"
        } ]
      },
      "AttributeName" : "instance-network-type"
    }, {
      "AttributeValues" : {
        "ValueItem" : [ {
          "Value" : "229376",
          "DiskCategory" : "cloud_efficiency"
        }, {
          "Value" : "204800",
          "DiskCategory" : "cloud_ssd"
        }, {
          "Value" : "204800",
          "DiskCategory" : "cloud_essd"
        } ]
      },
      "AttributeName" : "max-postpaid-yundisk-capacity"
    }, {
      "AttributeValues" : {
        "ValueItem" : [ {
          "Value" : "ecs.f3-c16f1.4xlarge"
        }, {
          "Value" : "ecs.g5.2xlarge"
        } ]
      },
      "AttributeName" : "supported-postpaid-instance-types"
    } ]
  },
  "RequestId" : "8CE45CD5-31FB-47C2-959D-CA8144CE****"
}

Error codes

HTTP status code Error code Error message Description
403 Invalid.Parameter The required parameter regionId must be not null. The error message returned because the RegionId parameter is not specified.

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