Queries the quotas of a specific Alibaba Cloud service.
Operation Description
In this example, the operation is called to query the quotas whose instance type is ecs.g5.2xlarge
. The quotas belong to Elastic Compute Service (ECS) Quotas by Instance Type. The query result includes the name, ID, unit, dimensions, and cycle of each quota.
debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
NextToken | string | No | The token that marks the position from which you want to start the query. If you leave this parameter empty, the query starts from the beginning. | 1 |
MaxResults | integer | No | The maximum number of records that can be returned for the query. Valid values: 1 to 100. Default value: 30. | 30 |
ProductCode | string | Yes | The abbreviation of the Alibaba Cloud service name. Note
For more information, see Alibaba Cloud services that support Quota Center.
| ecs-spec |
QuotaActionCode | string | No | The ID of the quota. | ecs.g5.2xlarge |
KeyWord | string | No | The keyword that you want to use to search for the quotas. | ecs-spec |
SortField | string | No | The field based on which you want to sort the returned records. This parameter is available only for quotas that belong to ECS Quotas by Instance Type. Valid values:
| TIME |
SortOrder | string | No | The order in which you want to sort the returned records. This parameter is available only for quotas that belong to ECS Quotas by Instance Type. Valid values:
| Ascending |
Dimensions | object [] | No | The quota dimensions. | |
Key | string | No | The key of the dimension. Note
The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service.
| regionId |
Value | string | No | The value of the dimension. Note
The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service.
| cn-hangzhou |
QuotaCategory | string | No | The type of the quota. Valid values:
| FlowControl |
GroupCode | string | No | The code of the dimension group. | entconsole_w1j3msbo2g |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSON
format
{
"TotalCount": 4,
"NextToken": "AAAAAd98/tlL5GF2aM7UMKQGM8LZesIPr0CbfxASQvHV/pwcmVKNfdBbW8OPld3NvG9Cy8+dNcyFzyUttQA3IONfBhRGpXFyiVoTgK+dupBsP2mX",
"RequestId": "D0131FD5-5397-44FE-BF5A-4B7165B813CC",
"Quotas": [
{
"QuotaUnit": "AMOUNT",
"QuotaActionCode": "ecs.g5.2xlarge",
"TotalUsage": 1,
"ApplicableRange": [
0
],
"SupportedRange": [
0
],
"QuotaType": "privilege",
"QuotaDescription": "ecs.g5.2xlarge",
"Period": {
"PeriodValue": 1,
"PeriodUnit": "day"
},
"QuotaArn": "acs:quotas:cn-hangzhou:107992689699****:quota/ecs/ecs.g5.2xlarge/postpaid/vpc/cn-hangzhou/instancetype/cn-hangzhou-i",
"ApplicableType": "discontinuous",
"QuotaItems": [
{
"Type": "BaseQuota",
"Quota": "10",
"QuotaUnit": "AMOUNT",
"Usage": "1"
}
],
"Dimensions": {
"regionId": "cn-hangzhou"
},
"Adjustable": true,
"QuotaName": "ecs.g5.2xlarge",
"UnadjustableDetail": "applicationProcess",
"Consumable": true,
"TotalQuota": 200,
"ProductCode": "ecs-spec",
"EffectiveTime": "2022-09-28T06:07:00Z",
"ExpireTime": "2022-09-29T06:07:00Z",
"QuotaCategory": "CommonQuota",
"ApplyReasonTips": "The business xxx is expected to grow by 50%.\n",
"GlobalQuota": true
}
],
"MaxResults": 1
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidSortOrder | Invalid SortOrder | The specified SortOrder parameter is invalid. |
400 | INVALID.MAX.RESULTS | The maxResults parameter is invalid. Use an integer ranging from 1 to 100. | The maxResults value is invalid. It must be an integer within the range of 1 to 100. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||
---|---|---|---|---|---|---|---|---|
2023-11-07 | The error codes of the API operation change.,The response structure of the API operation changes. | see changesets | ||||||
| ||||||||
2023-09-22 | API Description Update,The error codes of the API operation change. | see changesets | ||||||
| ||||||||
2023-06-28 | The error codes of the API operation change.,The response structure of the API operation changes. | see changesets | ||||||
| ||||||||
2022-12-02 | The error codes of the API operation change.,The response structure of the API operation changes. | see changesets | ||||||
|