Cloudfunctions2FunctionEventTrigger class

event_trigger block (single, max_items=1). Binds the function to an Eventarc trigger. Use pubsubTopic for Pub/Sub events, or eventFilters to subscribe to GCS / Firestore / Eventarc system events.

Annotations
  • @immutable

Constructors

Cloudfunctions2FunctionEventTrigger({required TfArg<String> eventType, TfArg<String>? pubsubTopic, TfArg<String>? serviceAccountEmail, TfArg<EventTriggerRetryPolicy>? retryPolicy, TfArg<String>? triggerRegion, List<Cloudfunctions2FunctionEventFilter>? eventFilters})
const

Properties

eventFilters List<Cloudfunctions2FunctionEventFilter>?
CloudEvents attribute filters (e.g. GCS bucket name match, Firestore document path match).
final
eventType → TfArg<String>
CloudEvents type attribute the trigger listens for. Examples: 'google.cloud.pubsub.topic.v1.messagePublished', 'google.cloud.storage.object.v1.finalized', 'google.cloud.firestore.document.v1.created'.
final
hashCode int
The hash code for this object.
no setterinherited
pubsubTopic → TfArg<String>?
Pub/Sub topic resource path (projects/{p}/topics/{t}). Required when eventType is a Pub/Sub event.
final
retryPolicy → TfArg<EventTriggerRetryPolicy>?
Retry behaviour when the function returns an error.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serviceAccountEmail → TfArg<String>?
Eventarc trigger service account. Must have permission to invoke the underlying Cloud Run service.
final
triggerRegion → TfArg<String>?
Region the Eventarc trigger lives in. Defaults to the function location; required for global-only event sources.
final

Methods

encode() Map<String, Object?>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited