All Products
Search
Document Center

CloudMonitor:DescribeEventRuleList

Last Updated:Jul 26, 2024

Queries event-triggered alert rules.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.
OperationAccess levelResource typeCondition keyAssociated operation
cms:DescribeEventRuleListget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
NamePrefixstringNo

The prefix in the name of the event-triggered alert rule.

test
PageNumberstringNo

The page number.

Pages start from page 1. Default value: 1.

1
PageSizestringNo

The number of entries per page.

Pages start from page 1. Default value: 10.

10
GroupIdstringNo

The ID of the application group.

7378****
IsEnablebooleanNo

Specifies whether to enable the event-triggered alert rule. Valid values:

  • true (default)
  • false
true

Response parameters

ParameterTypeDescriptionExample
object

The event-triggered alert rules.

Codestring

The HTTP status code.

Note The status code 200 indicates that the request was successful.
200
Messagestring

The error message returned.

User not authorized to operate on the specified resource.
RequestIdstring

The request ID.

D0E6D82B-16B5-422A-8136-EE5BDC01E415
Totalinteger

The total number of entries returned.

21
Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
true
EventRulesarray<object>

The event-triggered alert rule.

object
EventTypestring

The type of the event-triggered alert rule. Valid values:

  • SYSTEM: system event-triggered alert rule
  • CUSTOM: custom event-triggered alert rule
SYSTEM
Descriptionstring

The description of the event-triggered alert rule.

Default group event rule.
GroupIdstring

The ID of the application group.

7378****
Namestring

The name of the event-triggered alert rule.

test_DefaultEventRule_7378****
Statestring

The status of the event-triggered alert rule. Valid values:

  • ENABLED
  • DISABLED
ENABLED
EventPatternarray<object>

The mode of the event-triggered alert rule.

object
Productstring

The abbreviation of the Alibaba Cloud service name.

CloudMonitor
LevelListarray

The levels of the event-triggered alerts.

string

The level of the event-triggered alert. Valid values:

  • CRITICAL
  • WARN
  • INFO
CRITICAL
EventTypeListarray

The types of the event-triggered alert rules.

string

The type of the event-triggered alert rule.

* indicates all types of alert rules.

*
NameListarray

The event names.

string

The event name.

["Agent_Status_Stopped"]
CustomFiltersstring

The custom filter conditions.

ECS123
KeywordFilterobject

The keyword for filtering.

Keywordsarray

The keywords that are used to match events.

string

The keyword.

VMException
Relationstring

The relationship between multiple keywords in a condition. Valid values:

  • OR: The relationship between keywords is OR.
  • NOT: The keyword is excluded. The value NOT indicates that all events that do not contain the keywords are matched.
OR
SQLFilterstring

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
SilenceTimelong

The mute period during which new alert notifications are not sent even if the trigger conditions are met.

86400

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400InvalidParameterValueIllegal parameters.Illegal parameters.
403AccessForbiddenUser not authorized to operate on the specified resource.-
404ResourceNotFoundThe specified resource is not found.The specified resource is not found.
500%s%s-
500InternalErrorThe request processing has failed due to some unknown error.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-09-19The Error code has changed. The request parameters of the API has changedView Change Details
2021-12-03The Error code has changed. The response structure of the API has changedView Change Details