Queries quota usage alerts.
Operation description
The quota alert feature has been upgraded. This API operation is scheduled for deprecation and queries only earlier-version quota usage alerts. To query new-version quota usage alerts, call the CloudMonitor API operation DescribeMetricRuleList. For more information about how to manage new-version quota alerts using API operations, see Use API operations to manage new-version quota alerts.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
quotas:ListQuotaAlarms |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| NextToken |
string |
No |
The token that specifies the start point of the query. Note
If you do not specify this parameter, the query starts from the beginning. |
1 |
| MaxResults |
integer |
No |
The maximum number of records to return. Valid values: 1 to 200. Default value: 30. |
20 |
| ProductCode |
string |
No |
The abbreviation of the Alibaba Cloud service name. Note
To obtain the abbreviation of an Alibaba Cloud service name, see the |
ecs |
| AlarmName |
string |
No |
The name of the quota usage alert. |
q_hvnoqv alarm |
| QuotaActionCode |
string |
No |
The quota ID. Note
|
q_hvnoqv |
| QuotaDimensions |
array<object> |
No |
The quota dimensions. |
|
|
object |
No |
The quota dimensions. |
||
| Key |
string |
No |
The key of the quota dimension. Note
|
regionId |
| Value |
string |
No |
The value of the quota dimension. Note
|
cn-hangzhou |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
None. |
||
| MaxResults |
integer |
The maximum number of records returned for the current query. |
1 |
| NextToken |
string |
A pagination token. It can be used in the next request to retrieve a new page of results. Note
If this parameter is empty, all results have been returned. |
1 |
| QuotaAlarms |
array<object> |
The details of the quota usage alerts. |
|
|
array<object> |
The details of the quota usage alert. |
||
| AlarmId |
string |
The alert ID. |
a2efa7fc-832f-47bb-8054-39e28012**** |
| AlarmName |
string |
The alert name. |
q_hvnoqv alarm |
| CreateTime |
string |
The time when the quota usage alert was created. |
2020-11-27T07:23:34Z |
| ExceedThreshold |
boolean |
Indicates whether the quota usage exceeds the alert threshold. Valid values:
|
false |
| NotifyChannels |
array |
The notification channels of the quota alert. |
|
|
string |
The notification channel of the alert. Valid values:
|
sms |
|
| NotifyTarget |
string |
The notification object of the alert. Note
The value can only be accountContact, which specifies the contacts of the account. |
accountContact |
| ProductCode |
string |
The abbreviation of the Alibaba Cloud service name. |
config |
| QuotaActionCode |
string |
The quota ID. |
q_hvnoqv |
| QuotaDimensions |
object |
The quota dimensions. |
{"regionId":"cn-hangzhou"} |
| QuotaUsage |
number |
The used quota. |
73 |
| QuotaValue |
number |
The quota value. |
200 |
| Threshold |
number |
The numeric value of the alert threshold. |
160 |
| ThresholdPercent |
number |
The percentage of the alert threshold. |
80 |
| ThresholdType |
string |
The type of the quota alert. Valid values:
|
used |
| WebHook |
string |
The webhook URL. |
https://www.aliyun.com/webhook |
| RequestId |
string |
The request ID. |
87F3B755-3BD2-4C76-B36A-93247002918C |
| TotalCount |
integer |
The total number of quota usage alerts. |
2 |
Examples
Success response
JSON format
{
"MaxResults": 1,
"NextToken": "1",
"QuotaAlarms": [
{
"AlarmId": "a2efa7fc-832f-47bb-8054-39e28012****",
"AlarmName": "q_hvnoqv alarm",
"CreateTime": "2020-11-27T07:23:34Z",
"ExceedThreshold": false,
"NotifyChannels": [
"sms"
],
"NotifyTarget": "accountContact",
"ProductCode": "config",
"QuotaActionCode": "q_hvnoqv",
"QuotaDimensions": {
"regionId": "cn-hangzhou"
},
"QuotaUsage": 73,
"QuotaValue": 200,
"Threshold": 160,
"ThresholdPercent": 80,
"ThresholdType": "used",
"WebHook": "https://www.aliyun.com/webhook"
}
],
"RequestId": "87F3B755-3BD2-4C76-B36A-93247002918C",
"TotalCount": 2
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.