Creates a quota alert.
Operation Description
In this example, the operation is called to create a quota alert for a quota whose ID is q_hvnoqv
. This quota is the maximum number of rules that can be created by a user. The quota belongs to Cloud Config whose service code is config
.
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ProductCode | string | Yes | The abbreviation of the Alibaba Cloud service name. NoteFor more information, see Alibaba Cloud services that support Quota Center. | config |
QuotaActionCode | string | Yes | The ID of the quota. | q_hvnoqv |
AlarmName | string | Yes | The name of the quota alert. | rules |
ThresholdType | string | No | The type of the quota alert. Valid values:
| used |
Threshold | float | No | The numeric value of the alert threshold. Valid values:
NoteYou must set one of the Threshold and ThresholdPercent parameters. | 150 |
ThresholdPercent | float | No | The percentage of the alert threshold. Valid values:
NoteYou must set one of the Threshold and ThresholdPercent parameters. | 50 |
WebHook | string | No | The webhook URL. Quota Center sends alert notifications to the specified URL by using HTTP POST requests. | https://alert.aliyun.com/callback |
QuotaDimensions | array | No | The dimensions. | |
object | No | The dimension. | ||
Key | string | No | The key of the quota dimension. The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service. NoteThis parameter is required if you set the ProductCode parameter to ecs, ecs-spec, actiontrail, or ess. | regionId |
Value | string | No | The value of the quota dimension. The value range of N varies based on the number of dimensions that are supported by the related Alibaba Cloud service. NoteThis parameter is required if you set the ProductCode parameter to ecs, ecs-spec, actiontrail, or ess. | cn-hangzhou |
For more information about common request parameters, see API Reference.
Response parameters
Examples
Sample success responses
JSON
format
{
"AlarmId": "18b3be23-b7b0-4d45-91bc-d0c331aa****",
"RequestId": "BD219E2B-E687-45EE-B5F3-61FB730551B1"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | QUOTA.UNSUPPORT.ALARM | This quota does not support creating alarm | You cannot create an alert rule for this quota item. |
400 | ALARM.NAME.REPEAT | The warning name must be unique. | The alert name must be unique. |
400 | QUOTA.ALARM.MAX | Quota alarm have reached the upper limit of 100 | The maximum number of quota alerts has been reached. |
For a list of error codes, visit the Service error codes.