triggers
Creates, updates, deletes, gets or lists a triggers
resource.
Overview
Name | triggers |
Type | Resource |
Id | google.eventarc.triggers |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
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. |
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 | object | Output only. The reason(s) why a trigger is in FAILED state. |
createTime | string (google-datetime) | Output only. The creation time. |
destination | object | Required. Destination specifies where the events should be sent to. (id: Destination) |
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. |
eventDataContentType | string | Optional. EventDataContentType specifies the type of payload in MIME format that is expected from the CloudEvent data field. This is set to application/json if the value is not defined. |
eventFilters | array | 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. |
labels | object | Optional. User labels attached to the triggers that can be used to group resources. |
satisfiesPzs | boolean | Output only. Whether or not this Trigger satisfies the requirements of physical zone separation |
serviceAccount | string | Optional. The IAM service account email associated with the trigger. The service account represents the identity of the trigger. The iam.serviceAccounts.actAs permission must be granted on the service account to allow a principal to impersonate the service account. For more information, see the Roles and permissions page specific to the trigger destination. |
transport | object | Optional. To deliver messages, Eventarc might use other Google Cloud products as a transport intermediary. This field contains a reference to that transport intermediary. This information can be used for debugging purposes. (id: Transport) |
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. |
updateTime | string (google-datetime) | Output only. The last-modified time. |
Successful response
Name | Datatype | Description |
---|---|---|
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. |
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 | object | Output only. The reason(s) why a trigger is in FAILED state. |
createTime | string (google-datetime) | Output only. The creation time. |
destination | object | Required. Destination specifies where the events should be sent to. (id: Destination) |
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. |
eventDataContentType | string | Optional. EventDataContentType specifies the type of payload in MIME format that is expected from the CloudEvent data field. This is set to application/json if the value is not defined. |
eventFilters | array | 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. |
labels | object | Optional. User labels attached to the triggers that can be used to group resources. |
satisfiesPzs | boolean | Output only. Whether or not this Trigger satisfies the requirements of physical zone separation |
serviceAccount | string | Optional. The IAM service account email associated with the trigger. The service account represents the identity of the trigger. The iam.serviceAccounts.actAs permission must be granted on the service account to allow a principal to impersonate the service account. For more information, see the Roles and permissions page specific to the trigger destination. |
transport | object | Optional. To deliver messages, Eventarc might use other Google Cloud products as a transport intermediary. This field contains a reference to that transport intermediary. This information can be used for debugging purposes. (id: Transport) |
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. |
updateTime | string (google-datetime) | Output only. The last-modified time. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , triggersId | Get a single trigger. | |
list | select | projectsId , locationsId | pageSize , pageToken , orderBy , filter | List triggers. |
create | insert | projectsId , locationsId | triggerId , validateOnly | Create a new trigger in a particular project and location. |
patch | update | projectsId , locationsId , triggersId | updateMask , allowMissing , validateOnly | Update a single trigger. |
delete | delete | projectsId , locationsId , triggersId | etag , allowMissing , validateOnly | Delete a single trigger. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
projectsId | string | |
triggersId | string | |
allowMissing | boolean | |
etag | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
triggerId | string | |
updateMask | string (google-fieldmask) | |
validateOnly | boolean |
SELECT
examples
- get
- list
Get a single trigger.
SELECT
name,
channel,
conditions,
createTime,
destination,
etag,
eventDataContentType,
eventFilters,
labels,
satisfiesPzs,
serviceAccount,
transport,
uid,
updateTime
FROM google.eventarc.triggers
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND triggersId = '{{ triggersId }}' -- required;
List triggers.
SELECT
name,
channel,
conditions,
createTime,
destination,
etag,
eventDataContentType,
eventFilters,
labels,
satisfiesPzs,
serviceAccount,
transport,
uid,
updateTime
FROM google.eventarc.triggers
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND orderBy = '{{ orderBy }}'
AND filter = '{{ filter }}';
INSERT
examples
- create
- Manifest
Create a new trigger in a particular project and location.
INSERT INTO google.eventarc.triggers (
data__name,
data__eventFilters,
data__serviceAccount,
data__destination,
data__transport,
data__labels,
data__channel,
data__eventDataContentType,
projectsId,
locationsId,
triggerId,
validateOnly
)
SELECT
'{{ name }}',
'{{ eventFilters }}',
'{{ serviceAccount }}',
'{{ destination }}',
'{{ transport }}',
'{{ labels }}',
'{{ channel }}',
'{{ eventDataContentType }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ triggerId }}',
'{{ validateOnly }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: triggers
props:
- name: projectsId
value: string
description: Required parameter for the triggers resource.
- name: locationsId
value: string
description: Required parameter for the triggers resource.
- name: name
value: string
description: >
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.
- name: eventFilters
value: array
description: >
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.
- name: serviceAccount
value: string
description: >
Optional. The IAM service account email associated with the trigger. The service account represents the identity of the trigger. The `iam.serviceAccounts.actAs` permission must be granted on the service account to allow a principal to impersonate the service account. For more information, see the [Roles and permissions](https://cloud.google.com/eventarc/docs/all-roles-permissions) page specific to the trigger destination.
- name: destination
value: object
description: >
Required. Destination specifies where the events should be sent to.
- name: transport
value: object
description: >
Optional. To deliver messages, Eventarc might use other Google Cloud products as a transport intermediary. This field contains a reference to that transport intermediary. This information can be used for debugging purposes.
- name: labels
value: object
description: >
Optional. User labels attached to the triggers that can be used to group resources.
- name: channel
value: string
description: >
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.
- name: eventDataContentType
value: string
description: >
Optional. EventDataContentType specifies the type of payload in MIME format that is expected from the CloudEvent data field. This is set to `application/json` if the value is not defined.
- name: triggerId
value: string
- name: validateOnly
value: boolean
UPDATE
examples
- patch
Update a single trigger.
UPDATE google.eventarc.triggers
SET
data__name = '{{ name }}',
data__eventFilters = '{{ eventFilters }}',
data__serviceAccount = '{{ serviceAccount }}',
data__destination = '{{ destination }}',
data__transport = '{{ transport }}',
data__labels = '{{ labels }}',
data__channel = '{{ channel }}',
data__eventDataContentType = '{{ eventDataContentType }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND triggersId = '{{ triggersId }}' --required
AND updateMask = '{{ updateMask}}'
AND allowMissing = {{ allowMissing}}
AND validateOnly = {{ validateOnly}}
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- delete
Delete a single trigger.
DELETE FROM google.eventarc.triggers
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND triggersId = '{{ triggersId }}' --required
AND etag = '{{ etag }}'
AND allowMissing = '{{ allowMissing }}'
AND validateOnly = '{{ validateOnly }}';