Class: Google::Apis::EventarcV1::Trigger

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/eventarc_v1/classes.rb,
lib/google/apis/eventarc_v1/representations.rb,
lib/google/apis/eventarc_v1/representations.rb

Overview

A representation of the trigger resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Trigger

Returns a new instance of Trigger.



1438
1439
1440
# File 'lib/google/apis/eventarc_v1/classes.rb', line 1438

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#channelString

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 propertychannel`

Returns:

  • (String)


1364
1365
1366
# File 'lib/google/apis/eventarc_v1/classes.rb', line 1364

def channel
  @channel
end

#conditionsHash<String,Google::Apis::EventarcV1::StateCondition>

Output only. The reason(s) why a trigger is in FAILED state. Corresponds to the JSON property conditions



1369
1370
1371
# File 'lib/google/apis/eventarc_v1/classes.rb', line 1369

def conditions
  @conditions
end

#create_timeString

Output only. The creation time. Corresponds to the JSON property createTime

Returns:

  • (String)


1374
1375
1376
# File 'lib/google/apis/eventarc_v1/classes.rb', line 1374

def create_time
  @create_time
end

#destinationGoogle::Apis::EventarcV1::Destination

Represents a target of an invocation over HTTP. Corresponds to the JSON property destination



1379
1380
1381
# File 'lib/google/apis/eventarc_v1/classes.rb', line 1379

def destination
  @destination
end

#etagString

Output only. This checksum is computed by the server based on the value of other fields, and might be sent only on create requests to ensure that the client has an up-to-date value before proceeding. Corresponds to the JSON property etag

Returns:

  • (String)


1386
1387
1388
# File 'lib/google/apis/eventarc_v1/classes.rb', line 1386

def etag
  @etag
end

#event_filtersArray<Google::Apis::EventarcV1::EventFilter>

Required. Unordered list. The list of filters that applies to event attributes. Only events that match all the provided filters are sent to the destination. Corresponds to the JSON property eventFilters



1392
1393
1394
# File 'lib/google/apis/eventarc_v1/classes.rb', line 1392

def event_filters
  @event_filters
end

#labelsHash<String,String>

Optional. User labels attached to the triggers that can be used to group resources. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


1398
1399
1400
# File 'lib/google/apis/eventarc_v1/classes.rb', line 1398

def labels
  @labels
end

#nameString

Required. The resource name of the trigger. Must be unique within the location of the project and must be in projects/project/locations/location/ triggers/trigger`format. Corresponds to the JSON propertyname`

Returns:

  • (String)


1405
1406
1407
# File 'lib/google/apis/eventarc_v1/classes.rb', line 1405

def name
  @name
end

#service_accountString

Optional. The IAM service account email associated with the trigger. The service account represents the identity of the trigger. The principal who calls this API must have the iam.serviceAccounts.actAs permission in the service account. See https://cloud.google.com/iam/docs/understanding-service- accounts?hl=en#sa_common for more information. For Cloud Run destinations, this service account is used to generate identity tokens when invoking the service. See https://cloud.google.com/run/docs/triggering/pubsub-push#create- service-account for information on how to invoke authenticated Cloud Run services. To create Audit Log triggers, the service account should also have the roles/eventarc.eventReceiver IAM role. Corresponds to the JSON property serviceAccount

Returns:

  • (String)


1419
1420
1421
# File 'lib/google/apis/eventarc_v1/classes.rb', line 1419

def 
  @service_account
end

#transportGoogle::Apis::EventarcV1::Transport

Represents the transport intermediaries created for the trigger to deliver events. Corresponds to the JSON property transport



1425
1426
1427
# File 'lib/google/apis/eventarc_v1/classes.rb', line 1425

def transport
  @transport
end

#uidString

Output only. Server-assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted. Corresponds to the JSON property uid

Returns:

  • (String)


1431
1432
1433
# File 'lib/google/apis/eventarc_v1/classes.rb', line 1431

def uid
  @uid
end

#update_timeString

Output only. The last-modified time. Corresponds to the JSON property updateTime

Returns:

  • (String)


1436
1437
1438
# File 'lib/google/apis/eventarc_v1/classes.rb', line 1436

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
# File 'lib/google/apis/eventarc_v1/classes.rb', line 1443

def update!(**args)
  @channel = args[:channel] if args.key?(:channel)
  @conditions = args[:conditions] if args.key?(:conditions)
  @create_time = args[:create_time] if args.key?(:create_time)
  @destination = args[:destination] if args.key?(:destination)
  @etag = args[:etag] if args.key?(:etag)
  @event_filters = args[:event_filters] if args.key?(:event_filters)
  @labels = args[:labels] if args.key?(:labels)
  @name = args[:name] if args.key?(:name)
  @service_account = args[:service_account] if args.key?(:service_account)
  @transport = args[:transport] if args.key?(:transport)
  @uid = args[:uid] if args.key?(:uid)
  @update_time = args[:update_time] if args.key?(:update_time)
end