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
308 309 310 |
# File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 308 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/google.firebase.database/eventTypes/ref.write
Corresponds to the JSON property eventType
283 284 285 |
# File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 283 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
289 290 291 |
# File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 289 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
298 299 300 |
# File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 298 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.storage
namespace.
Corresponds to the JSON property service
306 307 308 |
# File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 306 def service @service end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
313 314 315 316 317 318 |
# File 'generated/google/apis/cloudfunctions_v1beta2/classes.rb', line 313 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 |