DescribeAccountAttributes

更新时间:
复制 MD 格式

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 spot 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 the account 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.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecs:DescribeAccountAttributes

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

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

cn-hangzhou

ZoneId

string

No

The ID of the zone in which the resource resides.

cn-hangzhou-b

AttributeName

array

No

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

max-security-groups

string

No

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 spot 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 spot 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 elements

Element

Type

Description

Example

object

RequestId

string

The ID of the request.

8CE45CD5-31FB-47C2-959D-CA8144CE****

AccountAttributeItems

object

AccountAttributeItem

array<object>

Details about account privileges in the specified region.

array<object>

AttributeName

string

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 spot 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 spot 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

AttributeValues

object

ValueItem

array<object>

The values of resource quotas.

object

DiskCategory

string

The data disk category. Valid values:

  • cloud_efficiency: ultra disk

  • cloud_ssd: standard SSD

  • cloud_essd: enhanced SSD (ESSD)

cloud_ssd

Value

string

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

ExpiredTime

string

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

ZoneId

string

The ID of the zone in which the resource resides.

cn-hangzhou-b

InstanceType

string

The type of the instance.

ecs.g5.large

Count

integer

The number of privilege attributes in the account.

3

InstanceChargeType

string

The billing method of the instance.

PrePaid

Examples

Success response

JSON format

{
  "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 code

Error code

Error message

Description

500 InternalError The process of creating snapshot has failed due to some unknown error. The snapshot cannot be created.
500 ServiceUnavailable The service is unavailable, please try again later.
403 Invalid.Parameter The required parameter regionId must be not null. The RegionId parameter is required.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.