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
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeAccountAttributes | The operation that you want to perform. Set the value to DescribeAccountAttributes. |
RegionId | String | Yes | cn-hangzhou | The ID of the region. You can call the DescribeRegions operation to query the most recent region list. |
ZoneId | String | No | cn-hangzhou-b | The ID of the zone. |
AttributeName.N | String | No | max-security-groups | The type of resource quota N. Valid values of N: 1 to 8. Valid values:
By default, this parameter is empty. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 8CE45CD5-31FB-47C2-959D-CA8144CE**** | The ID of the request. |
AccountAttributeItems | Array of AccountAttributeItem | Details about account privileges specified by AccountAttributeItem in the specified region. | |
AccountAttributeItem | |||
AttributeName | String | max-security-groups | The type of the resource quota in the specified region. Valid values:
|
AttributeValues | Array of ValueItem | The specific values of resource quotas. | |
ValueItem | |||
DiskCategory | String | cloud_ssd | The data disk category. Valid values:
|
Value | String | 800 | 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:
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:
When the AttributeName parameter is set to instance-network-type, one of the following values is returned:
|
ExpiredTime | String | 2019-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. |
ZoneId | String | cn-hangzhou-b | The ID of the zone. |
InstanceType | String | ecs.g5.large | The instance type. |
Count | Integer | 3 | The number of privilege attributes in the account. |
InstanceChargeType | String | PrePaid | 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 code | Error code | Error message | Description |
---|---|---|---|
403 | Invalid.Parameter | The 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.