Skip to content

Latest commit

 

History

History
159 lines (142 loc) · 3.52 KB

spec_trigger.md

File metadata and controls

159 lines (142 loc) · 3.52 KB

Triggers

The Trigger entity schema contains the necessary information to describe the stream of events that it represents. For more information, see the document "Creating Triggers and Rules".

Subsections

Fields

Key Name Required Value Type Default Description

feed

no

string

N/A

The optional name of the Feed associated with the Trigger.

credential

no

Credential

N/A

The optional credential used to access the feed service.

inputs

no

list of

parameter

N/A

The optional ordered list inputs to the feed.

events

 

no

list of Event

N/A

The optional list of valid Event schema the trigger supports. OpenWhisk would validate incoming Event data for conformance against any Event schema declared under this key.

Note: This feature is not supported at this time. This is viewed as a possible feature that may be implemented along with configurable options for handling of invalid events.

Requirements

The Trigger name (i.e., MUST be less than or equal to 256 characters.

The Trigger entity schema includes all general Entity Schema fields in addition to any fields declared above.

Notes

  • The 'events' key name is not supported at this time.

  • The Trigger entity within the OpenWhisk programming model is considered outside the scope of the Package (although there are discussions about changing this in the future). This means that Trigger and API information will not be returned when using the OpenWhisk Package API:
    • $ wsk package list <package name>
  • However, it may be obtained using the Trigger API:
    • 
      

Grammar

<triggerName>:
  <Entity schema>
  feed: <feed name>
  credential: <Credential>
  inputs:
    <list of parameter>

Example

triggers:
  everyhour:
    feed: /whisk.system/alarms/alarm