Skip to main content

Request

Register a trigger that will automatically invoke a function when certain conditions are met.

Response

The framework responds with a TriggerRegistrationResult message.
string
Message type. Will be "triggerregistrationresult".
string
required
The trigger ID from the request.
string
required
The trigger type from the request.
string
required
The function ID from the request.
object
Error details if registration failed. Omitted if successful.

Examples

HTTP Trigger Registration

Request:
Success Response:

Cron Trigger Registration

Request:
Success Response:

Queue Trigger Registration

Request:
Success Response:

Error Cases

Trigger Type Not Found

Request:
Error Response:

Function Not Found

Request:
Error Response:

Invalid Configuration

Request:
Error Response:

Duplicate Trigger ID

Error Response:

Notes

  • Trigger IDs must be unique within a worker session
  • The function must be registered before registering a trigger for it
  • The trigger type must be registered (via RegisterTriggerType) before use
  • Configuration structure is specific to each trigger type
  • Successful registration returns a result without an error field
  • Failed registration returns a result with an error field and no exception is thrown