Skip to main content

channels

Creates, updates, deletes, gets or lists a channels resource.

Overview

Namechannels
TypeResource
Idgoogle.eventarc.channels

Fields

NameDatatypeDescription
namestringRequired. The resource name of the channel. Must be unique within the location on the project and must be in projects/{project}/locations/{location}/channels/{channel_id} format.
activationTokenstringOutput only. The activation token for the channel. The token must be used by the provider to register the channel for publishing.
createTimestringOutput only. The creation time.
cryptoKeyNamestringResource name of a KMS crypto key (managed by the user) used to encrypt/decrypt their event data. It must match the pattern projects/*/locations/*/keyRings/*/cryptoKeys/*.
providerstringThe name of the event provider (e.g. Eventarc SaaS partner) associated with the channel. This provider will be granted permissions to publish events to the channel. Format: projects/{project}/locations/{location}/providers/{provider_id}.
pubsubTopicstringOutput only. The name of the Pub/Sub topic created and managed by Eventarc system as a transport for the event delivery. Format: projects/{project}/topics/{topic_id}.
satisfiesPzsbooleanOutput only. Whether or not this Channel satisfies the requirements of physical zone separation
statestringOutput only. The state of a Channel.
uidstringOutput only. Server assigned unique identifier for the channel. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
updateTimestringOutput only. The last-modified time.

Methods

NameAccessible byRequired ParamsDescription
getSELECTchannelsId, locationsId, projectsIdGet a single Channel.
listSELECTlocationsId, projectsIdList channels.
createINSERTlocationsId, projectsIdCreate a new channel in a particular project and location.
deleteDELETEchannelsId, locationsId, projectsIdDelete a single channel.
patchUPDATEchannelsId, locationsId, projectsIdUpdate a single channel.

SELECT examples

List channels.

SELECT
name,
activationToken,
createTime,
cryptoKeyName,
provider,
pubsubTopic,
satisfiesPzs,
state,
uid,
updateTime
FROM google.eventarc.channels
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new channels resource.

/*+ create */
INSERT INTO google.eventarc.channels (
locationsId,
projectsId,
name,
provider,
cryptoKeyName
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ provider }}',
'{{ cryptoKeyName }}'
;

UPDATE example

Updates a channels resource.

/*+ update */
UPDATE google.eventarc.channels
SET
name = '{{ name }}',
provider = '{{ provider }}',
cryptoKeyName = '{{ cryptoKeyName }}'
WHERE
channelsId = '{{ channelsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified channels resource.

/*+ delete */
DELETE FROM google.eventarc.channels
WHERE channelsId = '{{ channelsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';