Skip to content

Latest commit

 

History

History
133 lines (120 loc) · 2.82 KB

spec_rule.md

File metadata and controls

133 lines (120 loc) · 2.82 KB

Rules

The Rule entity schema contains the information necessary to associates one trigger with one action, with every firing of the trigger causing the corresponding action to be invoked with the trigger event as input. For more information, see the document "Creating Triggers and Rules".

Subsections

Fields

Key Name Required Value Type Default Description

trigger

yes

string

N/A

Required name of the Trigger the Rule applies to.

action

yes

string

N/A

Required name of the Action the Rule applies to.

rule

no

regex

true

The optional regular expression that determines if the Action is fired.

Note: In this version of the specification, only the expression 'true' is currently supported.

Requirements

  • The Rule name (i.e., ) MUST be less than or equal to 256 characters.
  • The Rule entity schema includes all general Entity Schema fields in addition to any fields declared above.

Notes

  • OpenWhisk only supports a value of 'true' for the 'rule' key's value at this time.

Grammar

<ruleName>:
  description: <string>
  trigger: <string>
  action: <string>
  rule: <regex>

Example

my_rule:
  description: Enable events for my Action
  trigger: my_trigger
  action: my_action