An event rule is used to monitor specific types of events. If an event that matches an event rule occurs, the event is routed to an event target that is associated with the event rule. An event rule can be associated with one or more event targets. You can manage event rules in the EventBridge console. For example, you can create, view, and delete event rules. This topic describes how to perform the management operations in the EventBridge console.

Create an event rule

  1. Log on to the EventBridge console.
  2. In the left-side navigation pane, click Event Buses.
  3. In the top navigation bar, select a region.
  4. On the Event Buses page, click the name of the target event bus.
  5. In the left-side navigation pane, click Event Rules.
  6. On the Event Rules page, click Create Rule.
  7. Complete the Create Rule wizard.
    1. In the Configure Basic Info step, enter a rule name in the Name field and a rule description in the Description field, and click Next Step.
    2. In the Configure Event Pattern step, set the parameters and click Next Step.
      • Click Alibaba Cloud Service Event Sources.

        Select an Alibaba Cloud service from the Event Source drop-down list and an event type from the Event Type drop-down list.

        Note Events of Alibaba Cloud services cannot be published to custom event buses. Therefore, you must not set the Event Source Type parameter to Alibaba Cloud Service Event Source if the event bus that you use is a custom event bus.
      • Click Custom Event Source.

        Select a custom event source from the Event Source drop-down list and specify an event pattern in the Event Pattern Content code editor.

        For more information, see Event patterns.

    3. In the Configure Targets step, configure an event target. Then, click Create.
      Notice
      • You can configure a maximum of five event targets for an event rule.
      • The event targets that you want to configure for an event rule must reside in the same region as the event rule.
      EventBridge supports the following event targets:

      You can select an event transformation method as needed. For more information, see Event transformation.

View the details of an event rule

On the Event Rules page, find the rule whose details you want to view and click Details in the Operations column.
On the Rule Detail page, you can view the basic information, event pattern, and event targets of the event rule.

Disable an event rule

  1. On the Event Rules page, find the rule that you want to disable and click Disable in the Operations column.
  2. In the Note message, read the note and click OK.

Enable an event rule

  1. On the Event Rules page, find the rule that you want to enable and click Enable in the Operations column.
  2. In the Note message, read the note and click OK.

Modify event targets

  1. On the Event Rules page, find the rule for which you want to modify the event targets and click Edit Targets in the Operations column.
  2. On the Edit Rule page, modify the settings of the event targets and click Save.

Modify an event pattern

  1. On the Event Rules page, find the rule for which you want to modify the event pattern and click Edit Pattern in the Operations column.
  2. On the Edit Rule page, modify the Event Source and Event Pattern Content parameters and click Save.

Delete an event rule

  1. On the Event Rules page, find the rule that you want to delete and click Delete in the Operations column.
  2. In the Note message, read the note and click OK.
  3. In the Verify Account Security dialog box, click Obtain Verification Code, enter the verification code in the Verification Code field, and then click OK.