Class: Google::Apis::CloudfunctionsV1beta2::EventTrigger
- Inherits:
-
Object
- Object
- Google::Apis::CloudfunctionsV1beta2::EventTrigger
- Defined in:
- generated/google/apis/cloudfunctions_v1beta2/classes.rb,
generated/google/apis/cloudfunctions_v1beta2/representations.rb,
generated/google/apis/cloudfunctions_v1beta2/representations.rb
Overview
Describes EventTrigger, used to request events be sent from another service.
Instance Attribute Summary collapse
-
#event_type ⇒ String
event_type
names contain the service that is sending an event and the kind of event that was fired. -
#failure_policy ⇒ Google::Apis::CloudfunctionsV1beta2::FailurePolicy
Describes the policy in case of function's execution failure.
-
#resource ⇒ String
Which instance of the source's service should send events.
-
#service ⇒ String
The hostname of the service that should be observed.
Instance Method Summary collapse
-
#initialize(**args) ⇒ EventTrigger
constructor
A new instance of EventTrigger.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ EventTrigger
Returns a new instance of EventTrigger
248 249 250 |
# File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 248 def initialize(**args) update!(**args) end |
Instance Attribute Details
#event_type ⇒ String
event_type
names contain the service that is sending an event and the
kind of event that was fired. Must be of the form
providers/*/eventTypes/*
e.g. Directly handle a Message published to
Google Cloud Pub/Sub providers/cloud.pubsub/eventTypes/topic.publish
Handle an object changing in Google Cloud Storage
providers/cloud.storage/eventTypes/object.change
Handle a write to the Firebase Realtime Database
providers/firebase.database/eventTypes/data.write
Corresponds to the JSON property eventType
223 224 225 |
# File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 223 def event_type @event_type end |
#failure_policy ⇒ Google::Apis::CloudfunctionsV1beta2::FailurePolicy
Describes the policy in case of function's execution failure.
If empty, then defaults to ignoring failures (i.e. not retrying them).
Corresponds to the JSON property failurePolicy
229 230 231 |
# File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 229 def failure_policy @failure_policy end |
#resource ⇒ String
Which instance of the source's service should send events. E.g. for Pub/Sub
this would be a Pub/Sub topic at projects/*/topics/*
. For Google Cloud
Storage this would be a bucket at projects/*/buckets/*
. For any source
that only supports one instance per-project, this should be the name of the
project (projects/*
)
Corresponds to the JSON property resource
238 239 240 |
# File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 238 def resource @resource end |
#service ⇒ String
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.storagenamespace.
Corresponds to the JSON property
service`
246 247 248 |
# File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 246 def service @service end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
253 254 255 256 257 258 |
# File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 253 def update!(**args) @event_type = args[:event_type] if args.key?(:event_type) @failure_policy = args[:failure_policy] if args.key?(:failure_policy) @resource = args[:resource] if args.key?(:resource) @service = args[:service] if args.key?(:service) end |