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
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ecs:DescribeAccountAttributes | get |
|
| 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:
This parameter is empty by default. | |
string | No | The type of resource quota N. Valid values of N: 1 to 8. Valid values:
This parameter is empty by default. | max-security-groups |
Response parameters
Examples
Sample success responses
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 |
---|---|---|---|
403 | Invalid.Parameter | The required parameter regionId must be not null. | The RegionId parameter is required. |
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. | - |
For a list of error codes, visit the Service error codes.