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. This topic describes how to manage event rules in the EventBridge console. For example, you can create and delete event rules, and view the details of event rules.

Create an event rule

  1. Log on to the EventBridge console.
  2. In the left-side navigation pane, choose Event-driven Operations > Event Rules.
  3. In the top navigation bar, select a region.
  4. On the Event Rules page, select an event bus and click Create Rule.
  5. 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.
      • Alibaba Cloud Service Event Source

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

      • 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, select an event bus, find the event rule whose details you want to view, and then click Details in the Operations column.
On the Rule Detail page, you can view the basic information, event pattern, and event targets.

Disable an event rule

On the Event Rules page, select an event bus, find the event rule that you want to disable, and then click Disable in the Operations column.

Enable an event rule

On the Event Rules page, select an event bus, find the event rule that you want to enable, and then click Enable in the Operations column.

Modify event targets

  1. On the Event Rules page, select an event bus, find the event rule for which you want to modify the event targets, and then 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, select an event bus, find the event rule for which you want to modify the event pattern, and then click Edit Pattern in the Operations column.
  2. On the Edit Rule page, modify the settings of the event pattern and click Save.

Delete an event rule

  1. On the Event Rules page, select an event bus, find the event rule that you want to delete, and then choose More > 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.