Managing Rules for Events

Create and manage rules for the Events service.

Tasks for managing rules include managing the rules, as well as the actions, event types, and attributes that make up the rules. See How Events Works for more information on rules.

You can perform the following event rules tasks:

You can perform the following tasks associated with actions:

You can perform the following tasks associated with event types:

You can perform the following tasks associated with attributes:

You can perform the following tasks associated with filter tags:

Prerequisites for Creating Rules

  • Action resources: You must have resources already set up to specify as an action. The Events service invokes the action specified in the rule by delivering the event message to action resources, which can include topics , streams, or functions. Every rule must have at least one action. The Events service can invoke any of the following services by delivering an event message for processing: 

  • IAM policies: To manage or list rules, you must be given the required type of access in a policy  written by an administrator, whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you try to perform a task and get a message that you don't have permission or are unauthorized, confirm with your administrator the type of access you have been granted and which compartment  you should work in. For more information, see Events and IAM Policies.

  • Event messages: To create rules, the resources you want to monitor with the rule must emit events. For more information, see Services that Produce Events.

Working with Rules

Note

Each rule can have a maximum of 10 actions.

A typical workflow for setting up rule might follow this pattern: 

  1. Identify action resources

    Set up or identify whatever action resources you intend to use with the rule. For example, you might set up a Notifications topic and create subscriptions for the DevOps team so that they are notified when backups complete. If a topic already exists, you can use it instead of creating a topic. The resources you specify for actions do not have to be in the same compartment as the rule.

  2. Plan filtering

    Ensure the resources that you want to monitor emit events to the Events service and plan your pattern matching strategy. For example, you might want to monitor backups on Autonomous AI Lakehouse instances in the ABC compartment. Ensure Autonomous AI Lakehouse instances emit an event type you can use to create the automation you require. Review the example JSON event to determine the best way to identify those resources in filters. See Matching Events with Filters and Services that Produce Events.

  3. Create the rule

    Rules apply to events in the compartment in which you create them and any child compartments. Create a rule in the compartment with the resource you want to monitor and specify where to deliver matching events. For example, in the ABC compartment, you might create a rule that filters for Autonomous AI Lakehouse backup events. Since Events has no requirement about the location of action resources, you could specify a topic in the XYZ compartment as the resource to deliver any matching events.