Create Event Rules to Automate Loading

Create Oracle Cloud Infrastructure Events rule to automate loading based on incoming data files in Oracle Cloud Infrastructure Object Storage.

Create an Event Rule

Create rules to enable Oracle Cloud Infrastructure Events to automate loading.

Oracle Cloud Infrastructure Events invokes the action specified in the rule by delivering the event message to an action resource, such as a function. Every rule must have at least one action.

  1. Open the navigation menu. Under the Solutions and Platform group, go to Application Integration and click Events Service.
  2. Make sure the compartment is the one where the application and associated function are deployed, and then click Create Rule.
  3. Enter the following.
    • Display Name: Specify a friendly name for the rule. You can change this name later. Avoid entering confidential information.
    • Description: Specify a description of what the rule does. You can change this description later. Avoid entering confidential information.
  4. Under Rule Conditions, select Event Type:
    1. Select Object Storage for the Service Name.
    2. For Event type, select Object Create.
      You can specify one or more event types. The action or actions you specify apply to all of the selected events. Similarly, you can click Another Condition and add Event Types if you want the action or actions to apply to other services.

    After the event is created, we will update the event to specify the particular bucket to monitor for changes.

  5. In Actions, select Functions:
    1. Select the Function Compartment where the application and associated functions will be deployed.
    2. Select the Function Application you created earlier, for example ocijsonpub.
    3. Select the Function you deployed earlier, for example loadziptojson.
    You can specify additional actions by click + Another Action.
  6. Click Create Rule.

Add Event Attributes

After you create the event, update the event to specify the particular bucket to monitor for changes.

  1. Open the navigation menu. Under the Solutions and Platform group, go to Application Integration and click Events Service.
  2. Make sure the compartment is the one where the application and associated function are deployed, and then click and then click the name of the rule you want to update.
  3. In the Resources menu, click Event Matching.
  4. Click Add Attribute. The Add Attribute box appears. Configure the attribute:
    • Attribute Name: Select bucketName.

    • Attribute Values: Select the name of the object storage bucket to monitor.

  5. Click Add attribute.