All Products
Search
Document Center

Elastic Compute Service:DescribeAccountAttributes

Last Updated:Oct 21, 2024

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, the capacity quotas for pay-as-you-go disks that you can create and the number of dedicated hosts that you can create. You can also query information such as network types or whether an account has completed real-name verification.

Operation 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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

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

cn-hangzhou
ZoneIdstringNo

The ID of the zone in which the resource resides.

cn-hangzhou-b
AttributeNamearrayNo

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

  • instance-network-type: the 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. (The value is deprecated.)

  • used-postpaid-yundisk-capacity: the capacity of pay-as-you-go data disks that have been created. (The value is deprecated.)

  • 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 the account has completed the real-name verification.

    **

    Note To create an ECS instance in a region in the Chinese mainland, you must complete the real-name verification.

  • max-cloud-assistant-activation-count: the maximum number of activation codes that can be created to use to register managed instances.

This parameter is empty by default.

stringNo

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

  • instance-network-type: the 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. (The value is deprecated.)

  • used-postpaid-yundisk-capacity: the capacity of pay-as-you-go data disks that have been created. (The value is deprecated.)

  • 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 the account has completed the real-name verification.

    **

    Note To create an ECS instance in a region in the Chinese mainland, you must complete the real-name verification.

This parameter is empty by default.

max-security-groups

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

8CE45CD5-31FB-47C2-959D-CA8144CE****
AccountAttributeItemsarray<object>

Details about account privileges in the specified region.

AccountAttributeItemobject
AttributeNamestring

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

  • instance-network-type: the 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 were allocated to pay-as-you-go instances.
  • used-spot-instance-vcpu-count: the number of vCPUs that were allocated to preemptible instances.
  • max-postpaid-yundisk-capacity: the maximum capacity of pay-as-you-go data disks. (The value is deprecated.)
  • used-postpaid-yundisk-capacity: the capacity of pay-as-you-go data disks that were created. (The value is deprecated.)
  • 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 the account completed the real-name verification.
  • max-cloud-assistant-activation-count: the maximum number of activation codes that can be created to use to register managed instances.
max-security-groups
AttributeValuesarray<object>

The values of resource quotas.

ValueItemobject
DiskCategorystring

The data disk category. Valid values:

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

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 (the value is deprecated)
  • used-postpaid-yundisk-capacity (the value is deprecated)
  • max-dedicated-hosts
  • max-axt-command-count
  • max-axt-invocation-daily
  • max-cloud-assistant-activation-count

When AttributeName is set to supported-postpay-instance-types, instance types are returned. For more information, see Overview of instance families.

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

  • yes
  • none
  • unnecessary

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

  • vpc
  • classic
800
ExpiredTimestring

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.

2019-01-01T12:30:00Z
ZoneIdstring

The ID of the zone in which the resource resides.

cn-hangzhou-b
InstanceTypestring

The type of the instance.

ecs.g5.large
Countinteger

The number of privilege attributes in the account.

3
InstanceChargeTypestring

The billing method of the instance.

PrePaid

Examples

Sample success responses

JSONformat

{
  "RequestId": "8CE45CD5-31FB-47C2-959D-CA8144CE****",
  "AccountAttributeItems": {
    "AccountAttributeItem": [
      {
        "AttributeName": "max-security-groups",
        "AttributeValues": {
          "ValueItem": [
            {
              "DiskCategory": "cloud_ssd",
              "Value": "800",
              "ExpiredTime": "2019-01-01T12:30:00Z",
              "ZoneId": "cn-hangzhou-b",
              "InstanceType": "ecs.g5.large",
              "Count": 3,
              "InstanceChargeType": "PrePaid"
            }
          ]
        }
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
403Invalid.ParameterThe required parameter regionId must be not null.The RegionId parameter is required.
500InternalErrorThe process of creating snapshot has failed due to some unknown error.The snapshot cannot be created.
500ServiceUnavailableThe service is unavailable, please try again later.-

For a list of error codes, visit the Service error codes.