Message: ConditionRule

File: WebAPI/rules_1.proto

Description

Condition based rule.

Used in

RuleDefinition

Fields

triggering_type

Type: uint32

Description: Rule triggering type, ONE_TIME by default.

expression

Type: Expression

Description: Expression that describes the condition. A logical expression to evaluate. If the expression evaluates to a numeric value then zero value is considered to be false, true otherwise.

notification_title

Type: TemplateText

Description: Title of notification to be sent on condition rule triggering. The notification is sent without waiting for all rule’s actions to be executed. The length of this field is limited. If the limit is exceeded, the maximum allowed length is provided in the error message.

notification_body

Type: TemplateText

Description: Body of notification to be sent on condition rule triggering. The notification is sent without waiting for all rule’s actions to be executed. The length of this field is limited. If the limit is exceeded, the maximum allowed length is provided in the error message. Note that actual notification might also include additional info, e.g., account information for rules based on account variables.

suppression_period

Type: uint32

Description: Condition rule triggering suppression period in seconds. The rule is not triggered more often than once in this period. The server side value is used if omitted in the rule definition (30 seconds by default). Rules with account variables handles this suppression separately for each account. Server has minimal allowed suppression period (5 seconds by default). It is used if lesser value is specified.

account_rule_parameters

Type: AccountRuleParameters

Description: May be present for account alerts only (see AccountVariable below).

Enum TriggeringType

Description: Rule triggering type.

Values

      TRIGGERING_TYPE_ONE_TIME = 0

     Triggers when the rule becomes true then disables the rule (see RuleDefinition.enabled field). Not supported for rules with account variables.

      TRIGGERING_TYPE_AUTO = 1

     Triggers when the rule becomes true while it was false before or if it is initially true. Any condition triggerings that happen after the previous one within a suppression period are ignored. See suppression_period field.