Queries the details of a quota of a cloud service.
Operation description
In this example, the operation is called to query the details of a quota whose ID is q_security-groups
and whose name is Maximum Number of Security Groups. This quota belongs to Elastic Compute Service (ECS). The query result shows the details of the quota. The details include the name, ID, description, quota value, used quota, unit, and dimension of the quota. In this example, the quota name is Maximum Number of Security Groups
. The quota ID is q_security-groups
. The description is The maximum number of security groups that can be created for the current account
. The quota value is 801
. The used quota is 26
. The quota unit is Number of security groups
. The quota dimension is {"regionId":"cn-hangzhou"}
.
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 |
---|---|---|---|---|
quotas:GetProductQuota | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ProductCode | string | Yes | The abbreviation of the Alibaba Cloud service name. Note
To query the abbreviation of an Alibaba Cloud service name, call the ListProducts operation and check the value of ProductCode in the response.
| ecs |
QuotaActionCode | string | Yes | The quota ID. Note
To query a quota ID of an Alibaba Cloud service, call the ListProductQuotas operation and check the value of QuotaActionCode in the response.
| q_security-groups |
Dimensions | array<object> | No | The quota dimensions. | {\"regionId\":\"cn-beijing\"} |
object | No | The quota dimension. | ||
Key | string | No | The key of the dimension. Note
This parameter is required for cloud services that support dimensions. You must specify both Dimensions.N.Key and Dimensions.N.Value . The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service. The following cloud services support dimensions: ECS whose service code is ecs, Enterprise Distributed Application Service (EDAS) whose service code is edas, ECS Quotas by Instance Type whose service code is ecs-spec, and Auto Scaling whose service code is ess.
| regionId |
Value | string | No | The value of the dimension. Note
This parameter is required for cloud services that support dimensions. You must specify both Dimensions.N.Key and Dimensions.N.Value . The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service. The following cloud services support dimensions: ECS whose service code is ecs, EDAS whose service code is edas, ECS Quotas by Instance Type whose service code is ecs-spec, and Auto Scaling whose service code is ess.
| cn-hangzhou |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "8FF8CAF0-29D9-4F11-B6A4-FD2CBCA016D3",
"Quota": {
"QuotaUnit": "Count\n",
"QuotaActionCode": "q_security-groups",
"TotalUsage": 26,
"ApplicableRange": [
802
],
"SupportedRange": [
0
],
"QuotaType": "normal",
"QuotaDescription": "The maximum number of security groups that can be owned by the current account\n",
"Period": {
"PeriodValue": 1,
"PeriodUnit": "Day"
},
"QuotaArn": "acs:quotas:cn-hangzhou:120886317861****:quota/ecs/q_security-groups/",
"ApplicableType": "continuous",
"QuotaItems": [
{
"Type": "BaseQuota",
"Quota": "801",
"QuotaUnit": "Count\n",
"Usage": "26"
}
],
"Dimensions": {
"regionId": "cn-hangzhou"
},
"Adjustable": true,
"QuotaName": "Maximum Number of Security Groups\n",
"UnadjustableDetail": "limitReached",
"Consumable": true,
"TotalQuota": 801,
"ProductCode": "ecs",
"EffectiveTime": "2022-09-28T06:06:00Z",
"ExpireTime": "2022-09-29T06:06:00Z",
"QuotaCategory": "CommonQuota",
"ApplyReasonTips": "The business xxx is expected to grow by 50%.\n",
"GlobalQuota": true,
"UsageMetric": {
"MetricNamespace": "acs_quotas_flowcontrol",
"MetricName": "Usage",
"MetricDimensions": {
"key": "ecs"
}
}
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-11-07 | The response structure of the API has changed | View Change Details |
2023-06-28 | The response structure of the API has changed | View Change Details |
2023-03-17 | The internal configuration of the API is changed, but the call is not affected | View Change Details |