Additional fields that can be set on any event-handling function.
Signature:
export interface EventHandlerOptions extends Omit, "enforceAppCheck">
Extends: Omit<GlobalOptions, "enforceAppCheck">
Properties
Property | Type | Description |
---|---|---|
channel | string | The name of the channel where the function receives events. |
eventFilterPathPatterns | Record |
Filters events based on path pattern matching on the CloudEvents attributes.Similar to eventFilters, but supports wildcard patterns for flexible matching where matches any single path segment, * matches zero or more path segments, and {param} captures a path segment as a parameter |
eventFilters | Record |
Filters events based on exact matches on the CloudEvents attributes.Each key-value pair represents an attribute name and its required value for exact matching. Events must match all specified filters to trigger the function. |
eventType | string | Type of the event. |
region | string | Expression |
Region of the EventArc trigger. |
retry | boolean | Expression |
Whether failed executions should be delivered again. |
serviceAccount | string | Expression |
The service account that EventArc should use to invoke this function. Requires the P4SA to have ActAs permission on this service account. |
EventHandlerOptions.channel
The name of the channel where the function receives events.
Signature:
channel?: string;
EventHandlerOptions.eventFilterPathPatterns
Filters events based on path pattern matching on the CloudEvents attributes.
Similar to eventFilters, but supports wildcard patterns for flexible matching where *
matches any single path segment, **
matches zero or more path segments, and {param}
captures a path segment as a parameter
Signature:
eventFilterPathPatterns?: Record, string | Expression >;
EventHandlerOptions.eventFilters
Filters events based on exact matches on the CloudEvents attributes.
Each key-value pair represents an attribute name and its required value for exact matching. Events must match all specified filters to trigger the function.
Signature:
eventFilters?: Record, string | Expression >;
EventHandlerOptions.eventType
Type of the event.
Signature:
eventType?: string;
EventHandlerOptions.region
Region of the EventArc trigger.
Signature:
region?: string | Expression | ResetValue;
EventHandlerOptions.retry
Whether failed executions should be delivered again.
Signature:
retry?: boolean | Expression | ResetValue;
EventHandlerOptions.serviceAccount
The service account that EventArc should use to invoke this function. Requires the P4SA to have ActAs permission on this service account.
Signature:
serviceAccount?: string | Expression | ResetValue;