» Data Source: oci_events_rule

This data source provides details about a specific Rule resource in Oracle Cloud Infrastructure Events service.

Retrieves a rule.

» Example Usage

data "oci_events_rule" "test_rule" {
    #Required
    rule_id = "${oci_events_rule.test_rule.id}"
}

» Argument Reference

The following arguments are supported:

» Attributes Reference

The following attributes are exported:

  • actions -
    • actions - A list of one or more Action objects.
      • action_type - The action to perform if the condition in the rule matches an event.
        • ONS: Send to an Oracle Notification Service topic.
        • OSS: Send to a stream from Oracle Streaming Service.
        • FAAS: Send to an Oracle Functions Service endpoint.
      • description - A string that describes the details of the action. It does not have to be unique, and you can change it. Avoid entering confidential information.
      • function_id - The OCID of a Function hosted by Oracle Functions Service.
      • id - The OCID of the action.
      • lifecycle_message - A message generated by the Events service about the current state of this rule.
      • state - The current state of the rule.
      • stream_id - The OCID of the stream to which messages are delivered.
      • topic_id - The OCID of the topic to which messages are delivered.
  • compartment_id - The OCID of the compartment to which this rule belongs.
  • condition - A filter that specifies the event that will trigger actions associated with this rule. A few important things to remember about filters:

    • Fields not mentioned in the condition are ignored. You can create a valid filter that matches all events with two curly brackets: {}

    For more examples, see Matching Events with Filters.
    * For a condition with fields to match an event, the event must contain all the field names listed in the condition. Field names must appear in the condition with the same nesting structure used in the event.

    For a list of reference events, see Services that Produce Events.
    * Rules apply to events in the compartment in which you create them and any child compartments. This means that a condition specified by a rule only matches events emitted from resources in the compartment or any of its child compartments. * The condition is a string value in a JSON object, but numbers in conditions are converted from strings to numbers before they are evaluated for matches. This means that 100, 100.0 or 1.0e2 are all considered equal. * Boolean values are converted to numbers and then evaluated. This means true and True are considered equal, as are False and false. * Wildcard matching is supported with the asterisk (*) character.

    For examples of wildcard matching, see Matching Events with Filters

    Example: \"eventType\": \"com.oraclecloud.databaseservice.autonomous.database.backup.end\"

  • defined_tags - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

  • description - A string that describes the details of the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.

  • display_name - A string that describes the rule. It does not have to be unique, and you can change it. Avoid entering confidential information. Example: "This rule sends a notification upon completion of DbaaS backup."

  • freeform_tags - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Exists for cross-compatibility only. For more information, see Resource Tags. Example: {"Department": "Finance"}

  • id - The OCID of this rule.

  • is_enabled - Whether or not this rule is currently enabled. Example: true

  • lifecycle_message - A message generated by the Events service about the current state of this rule.

  • state - The current state of the rule.

  • time_created - The time this rule was created, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z