DescribeEventRuleList

Updated at:

Queries event-triggered alert rules.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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 of the event-triggered alert rule.

test

PageNumber

string

No

The page number. Minimum value: 1. Default value: 1.

1

PageSize

string

No

The number of entries to return on each page. Minimum value: 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: enabled. This is the default value.

  • false: disabled.

true

Response elements

Element

Type

Description

Example

object

The list of event-triggered alert rules.

Code

string

The status code. A value of 200 indicates success.

200

Message

string

The error message.

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.

21

Success

boolean

Indicates whether the operation was successful. Valid values:

  • true: The operation was successful.

  • false: The operation failed.

true

EventRules

object

EventRule

array<object>

The event-triggered alert rule.

array<object>

The event-triggered alert rule.

EventType

string

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

  • SYSTEM: system event.

  • CUSTOM: custom event.

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 state of the event-triggered alert rule. Valid values:

  • ENABLED: enabled.

  • DISABLED: disabled.

ENABLED

EventPattern

object

EventPattern

array<object>

The event pattern of the event-triggered alert rule.

array<object>

The event pattern of the event-triggered alert rule.

Product

string

The abbreviation of the Alibaba Cloud service name.

CloudMonitor

LevelList

object

LevelList

array

The list of event levels.

string

The event level. Valid values:

  • CRITICAL: critical.

  • WARN: warning.

  • INFO: info.

CRITICAL

EventTypeList

object

EventTypeList

array

The list of event types for the event-triggered alert rule.

string

The event type of the event-triggered alert rule. A value of * indicates that the alert rule type is not limited.

*

NameList

object

NameList

array

The list of event names.

string

The list of event names.

["Agent_Status_Stopped"]

CustomFilters

string

The custom filter conditions.

ECS123

KeywordFilter

object

The keyword filter.

Keywords

object

Keywords

array

The list of keywords for event matching.

string

The keyword.

VMException

Relation

string

The logical relationship among multiple keywords. Valid values:

  • OR: The logical relationship among multiple keywords is OR.

  • NOT: The keywords are not included. This indicates that all events that do not contain the keywords in the list are matched.

OR

SQLFilter

string

Filters logs based on SQL statements. If the conditions are met, an alert is triggered.

ycccluster1 and (i-23ij0o82612 or Executed1) or Asimulated not 222

SilenceTime

integer

The mute epoch.

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.