Class: Google::Apis::CloudfunctionsV2beta::EventTrigger
- Inherits:
-
Object
- Object
- Google::Apis::CloudfunctionsV2beta::EventTrigger
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudfunctions_v2beta/classes.rb,
lib/google/apis/cloudfunctions_v2beta/representations.rb,
lib/google/apis/cloudfunctions_v2beta/representations.rb
Overview
Describes EventTrigger, used to request events to be sent from another service.
Instance Attribute Summary collapse
-
#channel ⇒ String
Optional.
-
#event_filters ⇒ Array<Google::Apis::CloudfunctionsV2beta::EventFilter>
Criteria used to filter events.
-
#event_type ⇒ String
Required.
-
#pubsub_topic ⇒ String
Optional.
-
#retry_policy ⇒ String
Optional.
-
#service ⇒ String
Optional.
-
#service_account_email ⇒ String
Optional.
-
#trigger ⇒ String
Output only.
-
#trigger_region ⇒ String
The region that the trigger will be in.
Instance Method Summary collapse
-
#initialize(**args) ⇒ EventTrigger
constructor
A new instance of EventTrigger.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ EventTrigger
Returns a new instance of EventTrigger.
500 501 502 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 500 def initialize(**args) update!(**args) end |
Instance Attribute Details
#channel ⇒ String
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.
Corresponds to the JSON property
channel`
441 442 443 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 441 def channel @channel end |
#event_filters ⇒ Array<Google::Apis::CloudfunctionsV2beta::EventFilter>
Criteria used to filter events.
Corresponds to the JSON property eventFilters
446 447 448 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 446 def event_filters @event_filters end |
#event_type ⇒ String
Required. The type of event to observe. For example: google.cloud.audit.log.
v1.written
or google.cloud.pubsub.topic.v1.messagePublished
.
Corresponds to the JSON property eventType
452 453 454 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 452 def event_type @event_type end |
#pubsub_topic ⇒ String
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.
Corresponds to the JSON property
pubsubTopic`
461 462 463 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 461 def pubsub_topic @pubsub_topic end |
#retry_policy ⇒ String
Optional. If unset, then defaults to ignoring failures (i.e. not retrying them)
.
Corresponds to the JSON property retryPolicy
467 468 469 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 467 def retry_policy @retry_policy end |
#service ⇒ String
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.
Corresponds to the JSON property service
476 477 478 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 476 def service @service end |
#service_account_email ⇒ String
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.
Corresponds to the JSON property
serviceAccountEmail`
484 485 486 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 484 def service_account_email @service_account_email end |
#trigger ⇒ String
Output only. The resource name of the Eventarc trigger. The format of this
field is projects/
project/locations/
region/triggers/
trigger`.
Corresponds to the JSON property
trigger`
490 491 492 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 490 def trigger @trigger end |
#trigger_region ⇒ String
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.
Corresponds to the JSON property triggerRegion
498 499 500 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 498 def trigger_region @trigger_region end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
505 506 507 508 509 510 511 512 513 514 515 |
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 505 def update!(**args) @channel = args[:channel] if args.key?(:channel) @event_filters = args[:event_filters] if args.key?(:event_filters) @event_type = args[:event_type] if args.key?(:event_type) @pubsub_topic = args[:pubsub_topic] if args.key?(:pubsub_topic) @retry_policy = args[:retry_policy] if args.key?(:retry_policy) @service = args[:service] if args.key?(:service) @service_account_email = args[:service_account_email] if args.key?(:service_account_email) @trigger = args[:trigger] if args.key?(:trigger) @trigger_region = args[:trigger_region] if args.key?(:trigger_region) end |