Optional. The name of the channel associated with the trigger in
projects/{project}/locations/{location}/channels/{channel} format.
You must provide a channel to receive events from Eventarc SaaS partners.
Optional. The name of a Pub/Sub topic in the same project that will be used
as the transport topic for the event delivery. Format:
projects/{project}/topics/{topic}.
This is only valid for events of type
google.cloud.pubsub.topic.v1.messagePublished. The topic provided here
will not be deleted at function deletion.
Optional. The hostname of the service that 1st Gen function should be
observed.
If no string is provided, the default service implementing the API will
be used. For example, storage.googleapis.com is the default for all
event types in the google.storage namespace.
The field is only applicable to 1st Gen functions.
Optional. The email of the trigger's service account. The service account
must have permission to invoke Cloud Run services, the permission is
run.routes.invoke.
If empty, defaults to the Compute Engine default service account:
{project_number}-compute@developer.gserviceaccount.com.
The region that the trigger will be in. The trigger will only receive
events originating in this region. It can be the same
region as the function, a different region or multi-region, or the global
region. If not provided, defaults to the same region as the function.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[[["\u003cp\u003e\u003ccode\u003eEventTrigger\u003c/code\u003e is a class in the Cloud Functions v2beta API used to describe and request events from other services.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements multiple interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, facilitating its use within the Google Cloud ecosystem.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eEventTrigger\u003c/code\u003e has properties to define event filtering criteria, the type of event to observe, and channel information, enabling targeted event handling.\u003c/p\u003e\n"],["\u003cp\u003eThe class supports optional settings such as \u003ccode\u003eRetryPolicy\u003c/code\u003e, a Pub/Sub topic for event delivery, and a service account email for access control.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eEventTrigger\u003c/code\u003e class can also be configured with a trigger region to limit it's observation of events.\u003c/p\u003e\n"]]],[],null,["# Cloud Functions v2beta API - Class EventTrigger (1.0.0-beta07)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta07 (latest)](/dotnet/docs/reference/Google.Cloud.Functions.V2Beta/latest/Google.Cloud.Functions.V2Beta.EventTrigger)\n- [1.0.0-beta06](/dotnet/docs/reference/Google.Cloud.Functions.V2Beta/1.0.0-beta06/Google.Cloud.Functions.V2Beta.EventTrigger) \n\n public sealed class EventTrigger : IMessage\u003cEventTrigger\u003e, IEquatable\u003cEventTrigger\u003e, IDeepCloneable\u003cEventTrigger\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Cloud Functions v2beta API class EventTrigger.\n\nDescribes EventTrigger, used to request events to be sent from another\nservice. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e EventTrigger \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[EventTrigger](/dotnet/docs/reference/Google.Cloud.Functions.V2Beta/latest/Google.Cloud.Functions.V2Beta.EventTrigger), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[EventTrigger](/dotnet/docs/reference/Google.Cloud.Functions.V2Beta/latest/Google.Cloud.Functions.V2Beta.EventTrigger), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[EventTrigger](/dotnet/docs/reference/Google.Cloud.Functions.V2Beta/latest/Google.Cloud.Functions.V2Beta.EventTrigger), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Functions.V2Beta](/dotnet/docs/reference/Google.Cloud.Functions.V2Beta/latest/Google.Cloud.Functions.V2Beta)\n\nAssembly\n--------\n\nGoogle.Cloud.Functions.V2Beta.dll\n\nConstructors\n------------\n\n### EventTrigger()\n\n public EventTrigger()\n\n### EventTrigger(EventTrigger)\n\n public EventTrigger(EventTrigger other)\n\nProperties\n----------\n\n### Channel\n\n public string Channel { get; set; }\n\nOptional. The name of the channel associated with the trigger in\n`projects/{project}/locations/{location}/channels/{channel}` format.\nYou must provide a channel to receive events from Eventarc SaaS partners.\n\n### ChannelAsChannelName\n\n public ChannelName ChannelAsChannelName { get; set; }\n\n[ChannelName](/dotnet/docs/reference/Google.Cloud.Functions.V2Beta/latest/Google.Cloud.Functions.V2Beta.ChannelName)-typed view over the [Channel](/dotnet/docs/reference/Google.Cloud.Functions.V2Beta/latest/Google.Cloud.Functions.V2Beta.EventTrigger#Google_Cloud_Functions_V2Beta_EventTrigger_Channel) resource name property.\n\n### EventFilters\n\n public RepeatedField\u003cEventFilter\u003e EventFilters { get; }\n\nCriteria used to filter events.\n\n### EventType\n\n public string EventType { get; set; }\n\nRequired. The type of event to observe. For example:\n`google.cloud.audit.log.v1.written` or\n`google.cloud.pubsub.topic.v1.messagePublished`.\n\n### PubsubTopic\n\n public string PubsubTopic { get; set; }\n\nOptional. The name of a Pub/Sub topic in the same project that will be used\nas the transport topic for the event delivery. Format:\n`projects/{project}/topics/{topic}`.\n\nThis is only valid for events of type\n`google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here\nwill not be deleted at function deletion.\n\n### PubsubTopicAsTopicName\n\n public TopicName PubsubTopicAsTopicName { get; set; }\n\n[TopicName](/dotnet/docs/reference/Google.Cloud.Functions.V2Beta/latest/Google.Cloud.Functions.V2Beta.TopicName)-typed view over the [PubsubTopic](/dotnet/docs/reference/Google.Cloud.Functions.V2Beta/latest/Google.Cloud.Functions.V2Beta.EventTrigger#Google_Cloud_Functions_V2Beta_EventTrigger_PubsubTopic) resource name property.\n\n### RetryPolicy\n\n public EventTrigger.Types.RetryPolicy RetryPolicy { get; set; }\n\nOptional. If unset, then defaults to ignoring failures (i.e. not retrying\nthem).\n\n### Service\n\n public string Service { get; set; }\n\nOptional. The hostname of the service that 1st Gen function should be\nobserved.\n\nIf no string is provided, the default service implementing the API will\nbe used. For example, `storage.googleapis.com` is the default for all\nevent types in the `google.storage` namespace.\n\nThe field is only applicable to 1st Gen functions.\n\n### ServiceAccountEmail\n\n public string ServiceAccountEmail { get; set; }\n\nOptional. The email of the trigger's service account. The service account\nmust have permission to invoke Cloud Run services, the permission is\n`run.routes.invoke`.\nIf empty, defaults to the Compute Engine default service account:\n`{project_number}-compute@developer.gserviceaccount.com`.\n\n### Trigger\n\n public string Trigger { get; set; }\n\nOutput only. The resource name of the Eventarc trigger. The format of this\nfield is `projects/{project}/locations/{region}/triggers/{trigger}`.\n\n### TriggerAsTriggerName\n\n public TriggerName TriggerAsTriggerName { get; set; }\n\n[TriggerName](/dotnet/docs/reference/Google.Cloud.Functions.V2Beta/latest/Google.Cloud.Functions.V2Beta.TriggerName)-typed view over the [Trigger](/dotnet/docs/reference/Google.Cloud.Functions.V2Beta/latest/Google.Cloud.Functions.V2Beta.EventTrigger#Google_Cloud_Functions_V2Beta_EventTrigger_Trigger) resource name property.\n\n### TriggerRegion\n\n public string TriggerRegion { get; set; }\n\nThe region that the trigger will be in. The trigger will only receive\nevents originating in this region. It can be the same\nregion as the function, a different region or multi-region, or the global\nregion. If not provided, defaults to the same region as the function."]]