triggers
Creates, updates, deletes, gets or lists a triggers
resource.
Overview
Name | triggers |
Type | Resource |
Id | google.eventarc.triggers |
Fields
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 | Output only. The creation time. |
destination | object | Represents a target of an invocation over HTTP. |
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 | Represents the transport intermediaries created for the trigger to deliver events. |
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 | Output only. The last-modified time. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, projectsId, triggersId | Get a single trigger. |
list | SELECT | locationsId, projectsId | List triggers. |
create | INSERT | locationsId, projectsId | Create a new trigger in a particular project and location. |
delete | DELETE | locationsId, projectsId, triggersId | Delete a single trigger. |
patch | UPDATE | locationsId, projectsId, triggersId | Update a single trigger. |
SELECT
examples
List triggers.
SELECT
name,
channel,
conditions,
createTime,
destination,
etag,
eventDataContentType,
eventFilters,
labels,
satisfiesPzs,
serviceAccount,
transport,
uid,
updateTime
FROM google.eventarc.triggers
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new triggers
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.eventarc.triggers (
locationsId,
projectsId,
name,
eventFilters,
serviceAccount,
destination,
transport,
labels,
channel,
eventDataContentType
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ eventFilters }}',
'{{ serviceAccount }}',
'{{ destination }}',
'{{ transport }}',
'{{ labels }}',
'{{ channel }}',
'{{ eventDataContentType }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: uid
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: eventFilters
value:
- - name: attribute
value: string
- name: value
value: string
- name: operator
value: string
- name: serviceAccount
value: string
- name: destination
value:
- name: cloudRun
value:
- name: service
value: string
- name: path
value: string
- name: region
value: string
- name: cloudFunction
value: string
- name: gke
value:
- name: cluster
value: string
- name: location
value: string
- name: namespace
value: string
- name: service
value: string
- name: path
value: string
- name: workflow
value: string
- name: httpEndpoint
value:
- name: uri
value: string
- name: networkConfig
value:
- name: networkAttachment
value: string
- name: transport
value:
- name: pubsub
value:
- name: topic
value: string
- name: subscription
value: string
- name: labels
value: object
- name: channel
value: string
- name: conditions
value: object
- name: eventDataContentType
value: string
- name: satisfiesPzs
value: boolean
- name: etag
value: string
UPDATE
example
Updates a triggers
resource.
/*+ update */
UPDATE google.eventarc.triggers
SET
name = '{{ name }}',
eventFilters = '{{ eventFilters }}',
serviceAccount = '{{ serviceAccount }}',
destination = '{{ destination }}',
transport = '{{ transport }}',
labels = '{{ labels }}',
channel = '{{ channel }}',
eventDataContentType = '{{ eventDataContentType }}'
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND triggersId = '{{ triggersId }}';
DELETE
example
Deletes the specified triggers
resource.
/*+ delete */
DELETE FROM google.eventarc.triggers
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND triggersId = '{{ triggersId }}';