Additional fields that can be set on any event-handling function.
Signature:
export interface EventHandlerOptions extends Omit<GlobalOptions, "enforceAppCheck">
Extends: Omit<GlobalOptions, "enforceAppCheck">
Properties
| Property | Type | Description |
|---|---|---|
| channel | string | The name of the channel where the function receives events. |
| eventFilterPathPatterns | Record<string, string | Expression<string>> | 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<string, string | Expression<string>> | 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<string> | ResetValue | Region of the EventArc trigger. |
| retry | boolean | Expression<boolean> | ResetValue | Whether failed executions should be delivered again. |
| serviceAccount | string | Expression<string> | ResetValue | 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, string | Expression<string>>;
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, string | Expression<string>>;
EventHandlerOptions.eventType
Type of the event.
Signature:
eventType?: string;
EventHandlerOptions.region
Region of the EventArc trigger.
Signature:
region?: string | Expression<string> | ResetValue;
EventHandlerOptions.retry
Whether failed executions should be delivered again.
Signature:
retry?: boolean | Expression<boolean> | 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<string> | ResetValue;