Google Cloud Eventarc V1 Client - Class Trigger (1.0.5)

Reference documentation and code samples for the Google Cloud Eventarc V1 Client class Trigger.

A representation of the trigger resource.

Generated from protobuf message google.cloud.eventarc.v1.Trigger

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

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.

↳ uid string

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.

↳ create_time Google\Protobuf\Timestamp

Output only. The creation time.

↳ update_time Google\Protobuf\Timestamp

Output only. The last-modified time.

↳ event_filters array<Google\Cloud\Eventarc\V1\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.

↳ service_account string

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.

↳ destination Google\Cloud\Eventarc\V1\Destination

Required. Destination specifies where the events should be sent to.

↳ transport Google\Cloud\Eventarc\V1\Transport

Optional. To deliver messages, Eventarc might use other GCP products as a transport intermediary. This field contains a reference to that transport intermediary. This information can be used for debugging purposes.

↳ labels array|Google\Protobuf\Internal\MapField

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

↳ 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.

↳ conditions array|Google\Protobuf\Internal\MapField

Output only. The reason(s) why a trigger is in FAILED state.

↳ etag string

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.

getName

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.

Returns
TypeDescription
string

setName

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.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getUid

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.

Returns
TypeDescription
string

setUid

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.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCreateTime

Output only. The creation time.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. The creation time.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getUpdateTime

Output only. The last-modified time.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. The last-modified time.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getEventFilters

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.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setEventFilters

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.

Parameter
NameDescription
var array<Google\Cloud\Eventarc\V1\EventFilter>
Returns
TypeDescription
$this

getServiceAccount

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.

Returns
TypeDescription
string

setServiceAccount

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.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDestination

Required. Destination specifies where the events should be sent to.

Returns
TypeDescription
Google\Cloud\Eventarc\V1\Destination|null

hasDestination

clearDestination

setDestination

Required. Destination specifies where the events should be sent to.

Parameter
NameDescription
var Google\Cloud\Eventarc\V1\Destination
Returns
TypeDescription
$this

getTransport

Optional. To deliver messages, Eventarc might use other GCP products as a transport intermediary. This field contains a reference to that transport intermediary. This information can be used for debugging purposes.

Returns
TypeDescription
Google\Cloud\Eventarc\V1\Transport|null

hasTransport

clearTransport

setTransport

Optional. To deliver messages, Eventarc might use other GCP products as a transport intermediary. This field contains a reference to that transport intermediary. This information can be used for debugging purposes.

Parameter
NameDescription
var Google\Cloud\Eventarc\V1\Transport
Returns
TypeDescription
$this

getLabels

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

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setLabels

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

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getChannel

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.

Returns
TypeDescription
string

setChannel

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.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getConditions

Output only. The reason(s) why a trigger is in FAILED state.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setConditions

Output only. The reason(s) why a trigger is in FAILED state.

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getEtag

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.

Returns
TypeDescription
string

setEtag

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.

Parameter
NameDescription
var string
Returns
TypeDescription
$this