All Products
Search
Document Center

Elastic Compute Service:DescribeAccountAttributes

Last Updated:Aug 28, 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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ecs:DescribeAccountAttributesget
  • All Resources
    *
    none
none

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.

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

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