CreateRuleDetails

class oci.events.models.CreateRuleDetails(**kwargs)

Bases: object

Object used to create a rule.

Methods

__init__(**kwargs) Initializes a new CreateRuleDetails object with values from keyword arguments.

Attributes

actions [Required] Gets the actions of this CreateRuleDetails.
compartment_id [Required] Gets the compartment_id of this CreateRuleDetails.
condition [Required] Gets the condition of this CreateRuleDetails.
defined_tags Gets the defined_tags of this CreateRuleDetails.
description Gets the description of this CreateRuleDetails.
display_name [Required] Gets the display_name of this CreateRuleDetails.
freeform_tags Gets the freeform_tags of this CreateRuleDetails.
is_enabled [Required] Gets the is_enabled of this CreateRuleDetails.
__init__(**kwargs)

Initializes a new CreateRuleDetails object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • display_name (str) – The value to assign to the display_name property of this CreateRuleDetails.
  • description (str) – The value to assign to the description property of this CreateRuleDetails.
  • is_enabled (bool) – The value to assign to the is_enabled property of this CreateRuleDetails.
  • condition (str) – The value to assign to the condition property of this CreateRuleDetails.
  • compartment_id (str) – The value to assign to the compartment_id property of this CreateRuleDetails.
  • actions (oci.events.models.ActionDetailsList) – The value to assign to the actions property of this CreateRuleDetails.
  • freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this CreateRuleDetails.
  • defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this CreateRuleDetails.
actions

[Required] Gets the actions of this CreateRuleDetails.

Returns:The actions of this CreateRuleDetails.
Return type:oci.events.models.ActionDetailsList
compartment_id

[Required] Gets the compartment_id of this CreateRuleDetails. The OCID of the compartment to which this rule belongs.

Returns:The compartment_id of this CreateRuleDetails.
Return type:str
condition

[Required] Gets the condition of this CreateRuleDetails. 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. * 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”

Returns:The condition of this CreateRuleDetails.
Return type:str
defined_tags

Gets the defined_tags of this CreateRuleDetails. Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

Example: {“Operations”: {“CostCenter”: “42”}}

Returns:The defined_tags of this CreateRuleDetails.
Return type:dict(str, dict(str, object))
description

Gets the description of this CreateRuleDetails. 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.

Returns:The description of this CreateRuleDetails.
Return type:str
display_name

[Required] Gets the display_name of this CreateRuleDetails. A string that describes the rule. It does not have to be unique, and you can change it. Avoid entering confidential information.

Returns:The display_name of this CreateRuleDetails.
Return type:str
freeform_tags

Gets the freeform_tags of this CreateRuleDetails. 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”}

Returns:The freeform_tags of this CreateRuleDetails.
Return type:dict(str, str)
is_enabled

[Required] Gets the is_enabled of this CreateRuleDetails. Whether or not this rule is currently enabled.

Example: true

Returns:The is_enabled of this CreateRuleDetails.
Return type:bool