Queries the details of an event-triggered alert rule.
Operation description
This topic provides an example to show how to query the details of an event-triggered alert rule named testRule
.
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 |
---|---|---|---|---|
cms:DescribeEventRuleAttribute | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RuleName | string | Yes | The name of the event-triggered alert rule. For information about how to obtain the name of an event-triggered alert rule, see DescribeEventRuleList . | testRule |
SilenceTime | string | No | The mute period during which new alert notifications are not sent even if the trigger conditions are met. Unit: seconds. Default value: 86400, which indicates one day. Note
Only one alert notification is sent during each mute period even if the metric value exceeds the alert threshold several times.
| 86400 |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSON
format
{
"Code": "200",
"Message": "The alert does not exist.",
"RequestId": "9AA3F210-C03D-4C86-8DB6-21C84FF692A1",
"Success": true,
"Result": {
"EventType": "SYSTEM",
"GroupId": "3607****",
"Name": "test_DefaultEventRule_7378****",
"Description": "Default group event rule.",
"State": "ENABLED",
"EventPattern": {
"Product": "CloudMonitor",
"LevelList": {
"LevelList": [
"[\"CRITICAL\",\"WARN\"] "
]
},
"StatusList": {
"StatusList": [
"Running"
]
},
"NameList": {
"NameList": [
"Agent_Status_Running"
]
},
"EventTypeList": {
"EventTypeList": [
"*"
]
},
"SQLFilter": "ycccluster1 and (i-23ij0o82612 or Executed1) or Asimulated not 222",
"KeywordFilterObj": {
"Keywords": {
"keyword": [
"VMException"
]
},
"Relation": "OR"
}
}
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParameterValue | Illegal parameters. | Illegal parameters. |
403 | AccessForbidden | User not authorized to operate on the specified resource. | - |
404 | %s | %s | - |
500 | InternalError | The request processing has failed due to some unknown error. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-08-31 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-03-10 | The Error code has changed. The response structure of the API has changed | View Change Details |