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 apply for a quota increase in the Quota Center console.

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

ParameterTypeRequiredExampleDescription
ActionStringYesDescribeAccountAttributes

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

RegionIdStringYescn-hangzhou

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

ZoneIdStringNocn-hangzhou-b

The ID of the zone.

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

ParameterTypeExampleDescription
RequestIdString8CE45CD5-31FB-47C2-959D-CA8144CE****

The ID of the request.

AccountAttributeItemsArray of AccountAttributeItem

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

AccountAttributeItem
AttributeNameStringmax-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
AttributeValuesArray of ValueItem

The specific values of resource quotas.

ValueItem
DiskCategoryStringcloud_ssd

The data disk category. Valid values:

  • cloud_efficiency: ultra disk
  • cloud_ssd: standard SSD
  • cloud_essd: enhanced SSD (ESSD)
ValueString800

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

ZoneIdStringcn-hangzhou-b

The ID of the zone.

InstanceTypeStringecs.g5.large

The instance type.

CountInteger3

The number of privilege attributes in the account.

InstanceChargeTypeStringPrePaid

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 codeError codeError messageDescription
403Invalid.ParameterThe required parameter regionId must be not null.The error message returned because the RegionId parameter is not specified.

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