Queries event-triggered alert rules.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:DescribeEventRuleList |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| NamePrefix |
string |
No |
The prefix in the name of the event-triggered alert rule. |
test |
| PageNumber |
string |
No |
The page number. Pages start from page 1. Default value: 1. |
1 |
| PageSize |
string |
No |
The number of entries per page. Pages start from page 1. Default value: 10. |
10 |
| GroupId |
string |
No |
The ID of the application group. |
7378**** |
| IsEnable |
boolean |
No |
Specifies whether to enable the event-triggered alert rule. Valid values:
|
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The event-triggered alert rules. |
||
| Code |
string |
The HTTP status code. Note
The status code 200 indicates that the request was successful. |
200 |
| Message |
string |
The error message returned. |
User not authorized to operate on the specified resource. |
| RequestId |
string |
The request ID. |
D0E6D82B-16B5-422A-8136-EE5BDC01E415 |
| Total |
integer |
The total number of entries returned. |
21 |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
| EventRules |
object |
||
| EventRule |
array<object> |
The event-triggered alert rule. |
|
|
array<object> |
|||
| EventType |
string |
The type of the event-triggered alert rule. Valid values:
|
SYSTEM |
| Description |
string |
The description of the event-triggered alert rule. |
Default group event rule. |
| GroupId |
string |
The ID of the application group. |
7378**** |
| Name |
string |
The name of the event-triggered alert rule. |
test_DefaultEventRule_7378**** |
| State |
string |
The status of the event-triggered alert rule. Valid values:
|
ENABLED |
| EventPattern |
object |
||
| EventPattern |
array<object> |
The mode of the event-triggered alert rule. |
|
|
array<object> |
|||
| Product |
string |
The abbreviation of the Alibaba Cloud service name. |
CloudMonitor |
| LevelList |
object |
||
| LevelList |
array |
The levels of the event-triggered alerts. |
|
|
string |
The level of the event-triggered alert. Valid values:
|
CRITICAL |
|
| EventTypeList |
object |
||
| EventTypeList |
array |
The types of the event-triggered alert rules. |
|
|
string |
The type of the event-triggered alert rule.
|
* |
|
| NameList |
object |
||
| NameList |
array |
The event names. |
|
|
string |
The event name. |
["Agent_Status_Stopped"] |
|
| CustomFilters |
string |
The custom filter conditions. |
ECS123 |
| KeywordFilter |
object |
The keyword for filtering. |
|
| Keywords |
object |
||
| Keywords |
array |
The keywords that are used to match events. |
|
|
string |
The keyword. |
VMException |
|
| Relation |
string |
The relationship between multiple keywords in a condition. Valid values:
|
OR |
| SQLFilter |
string |
Indicates that logs are filtered based on the specified SQL statement. If the specified conditions are met, an alert is triggered. |
ycccluster1 and (i-23ij0o82612 or Executed1) or Asimulated not 222 |
| SilenceTime |
integer |
The mute period during which new alert notifications are not sent even if the trigger conditions are met. |
86400 |
Examples
Success response
JSON format
{
"Code": "200",
"Message": "User not authorized to operate on the specified resource.",
"RequestId": "D0E6D82B-16B5-422A-8136-EE5BDC01E415",
"Total": 21,
"Success": true,
"EventRules": {
"EventRule": [
{
"EventType": "SYSTEM",
"Description": "Default group event rule.",
"GroupId": "7378****",
"Name": "test_DefaultEventRule_7378****",
"State": "ENABLED",
"EventPattern": {
"EventPattern": [
{
"Product": "CloudMonitor",
"LevelList": {
"LevelList": [
"CRITICAL"
]
},
"EventTypeList": {
"EventTypeList": [
"*"
]
},
"NameList": {
"NameList": [
"[\"Agent_Status_Stopped\"]"
]
},
"CustomFilters": "ECS123",
"KeywordFilter": {
"Keywords": {
"Keywords": [
"VMException"
]
},
"Relation": "OR"
},
"SQLFilter": "ycccluster1 and (i-23ij0o82612 or Executed1) or Asimulated not 222"
}
]
},
"SilenceTime": 86400
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameterValue | Illegal parameters. | Illegal parameters. |
| 500 | %s | %s | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | AccessForbidden | User not authorized to operate on the specified resource. | |
| 404 | ResourceNotFound | The specified resource is not found. | The specified resource is not found. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.