Required. The type of event to observe. For example:
providers/cloud.storage/eventTypes/object.change and
providers/cloud.pubsub/eventTypes/topic.publish.
Event types match pattern providers/*/eventTypes/*.*.
The pattern contains:
namespace: For example, cloud.storage and
google.firebase.analytics.
resource type: The type of resource on which event occurs. For
example, the Google Cloud Storage API includes the type object.
action: The action that generates the event. For example, action for
a Google Cloud Storage Object is 'change'.
These parts are lower case.
Required. The resource(s) from which to observe events, for example,
projects/_/buckets/myBucket.
Not all syntactically correct values are accepted by all services. For
example:
The authorization model must support it. Google Cloud Functions
only allows EventTriggers to be deployed that observe resources in the
same project as the CloudFunction.
The resource type must match the pattern expected for an
event_type. For example, an EventTrigger that has an
event_type of "google.pubsub.topic.publish" should have a resource
that matches Google Cloud Pub/Sub topics.
Additionally, some services may support short names when creating an
EventTrigger. These will always be returned in the normalized "long"
format.
See each service's documentation for supported formats.
The hostname of the service that 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.
[[["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\u003eThe \u003ccode\u003eEventTrigger\u003c/code\u003e class in the Google Cloud Functions v1 API is used to configure events that should be sent from another service.\u003c/p\u003e\n"],["\u003cp\u003eThis documentation provides reference material for the \u003ccode\u003eEventTrigger\u003c/code\u003e class, detailing its inheritance, implemented interfaces, constructors, and properties.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eEventTrigger\u003c/code\u003e class requires an event type, such as \u003ccode\u003eproviders/cloud.storage/eventTypes/object.change\u003c/code\u003e, and a resource to observe, like \u003ccode\u003eprojects/_/buckets/myBucket\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the \u003ccode\u003eEventTrigger\u003c/code\u003e class documentation is 2.7.0, with documentation available for versions back to 1.1.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eEventTrigger\u003c/code\u003e class includes properties like \u003ccode\u003eEventType\u003c/code\u003e, \u003ccode\u003eFailurePolicy\u003c/code\u003e, \u003ccode\u003eResource\u003c/code\u003e, and \u003ccode\u003eService\u003c/code\u003e to configure event observation.\u003c/p\u003e\n"]]],[],null,["# Cloud Functions v1 API - Class EventTrigger (2.7.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.7.0 (latest)](/dotnet/docs/reference/Google.Cloud.Functions.V1/latest/Google.Cloud.Functions.V1.EventTrigger)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.Functions.V1/2.6.0/Google.Cloud.Functions.V1.EventTrigger)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Functions.V1/2.5.0/Google.Cloud.Functions.V1.EventTrigger)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Functions.V1/2.4.0/Google.Cloud.Functions.V1.EventTrigger)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Functions.V1/2.3.0/Google.Cloud.Functions.V1.EventTrigger)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Functions.V1/2.2.0/Google.Cloud.Functions.V1.EventTrigger)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Functions.V1/2.1.0/Google.Cloud.Functions.V1.EventTrigger)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Functions.V1/2.0.0/Google.Cloud.Functions.V1.EventTrigger)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.Functions.V1/1.3.0/Google.Cloud.Functions.V1.EventTrigger)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Functions.V1/1.2.0/Google.Cloud.Functions.V1.EventTrigger)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Functions.V1/1.1.0/Google.Cloud.Functions.V1.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 v1 API class EventTrigger.\n\nDescribes EventTrigger, used to request events 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.V1/latest/Google.Cloud.Functions.V1.EventTrigger), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[EventTrigger](/dotnet/docs/reference/Google.Cloud.Functions.V1/latest/Google.Cloud.Functions.V1.EventTrigger), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[EventTrigger](/dotnet/docs/reference/Google.Cloud.Functions.V1/latest/Google.Cloud.Functions.V1.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.V1](/dotnet/docs/reference/Google.Cloud.Functions.V1/latest/Google.Cloud.Functions.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Functions.V1.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### EventType\n\n public string EventType { get; set; }\n\nRequired. The type of event to observe. For example:\n`providers/cloud.storage/eventTypes/object.change` and\n`providers/cloud.pubsub/eventTypes/topic.publish`.\n\nEvent types match pattern `providers/*/eventTypes/*.*`.\nThe pattern contains:\n\n1. namespace: For example, `cloud.storage` and `google.firebase.analytics`.\n2. resource type: The type of resource on which event occurs. For example, the Google Cloud Storage API includes the type `object`.\n3. action: The action that generates the event. For example, action for a Google Cloud Storage Object is 'change'. These parts are lower case.\n\n### FailurePolicy\n\n public FailurePolicy FailurePolicy { get; set; }\n\nSpecifies policy for failed executions.\n\n### Resource\n\n public string Resource { get; set; }\n\nRequired. The resource(s) from which to observe events, for example,\n`projects/_/buckets/myBucket`.\n\nNot all syntactically correct values are accepted by all services. For\nexample:\n\n1. The authorization model must support it. Google Cloud Functions only allows EventTriggers to be deployed that observe resources in the same project as the `CloudFunction`.\n2. The resource type must match the pattern expected for an `event_type`. For example, an `EventTrigger` that has an `event_type` of \"google.pubsub.topic.publish\" should have a resource that matches Google Cloud Pub/Sub topics.\n\nAdditionally, some services may support short names when creating an\n`EventTrigger`. These will always be returned in the normalized \"long\"\nformat.\n\nSee each *service's* documentation for supported formats.\n\n### Service\n\n public string Service { get; set; }\n\nThe hostname of the service that should be observed.\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."]]