Skip to main content

channels

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

Overview

Namechannels
TypeResource
Idgoogle.eventarc.channels

Fields

The following fields are returned by SELECT queries:

Successful response

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.
createTimestring (google-datetime)Output only. The creation time.
cryptoKeyNamestringOptional. Resource 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/*.
labelsobjectOptional. Resource labels.
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.
updateTimestring (google-datetime)Output only. The last-modified time.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, channelsIdGet a single Channel.
listselectprojectsId, locationsIdpageSize, pageToken, orderByList channels.
createinsertprojectsId, locationsIdchannelId, validateOnlyCreate a new channel in a particular project and location.
patchupdateprojectsId, locationsId, channelsIdupdateMask, validateOnlyUpdate a single channel.
deletedeleteprojectsId, locationsId, channelsIdvalidateOnlyDelete a single channel.

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.

NameDatatypeDescription
channelsIdstring
locationsIdstring
projectsIdstring
channelIdstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)
validateOnlyboolean

SELECT examples

Get a single Channel.

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

INSERT examples

Create a new channel in a particular project and location.

INSERT INTO google.eventarc.channels (
data__name,
data__provider,
data__cryptoKeyName,
data__labels,
projectsId,
locationsId,
channelId,
validateOnly
)
SELECT
'{{ name }}',
'{{ provider }}',
'{{ cryptoKeyName }}',
'{{ labels }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ channelId }}',
'{{ validateOnly }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Update a single channel.

UPDATE google.eventarc.channels
SET
data__name = '{{ name }}',
data__provider = '{{ provider }}',
data__cryptoKeyName = '{{ cryptoKeyName }}',
data__labels = '{{ labels }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND channelsId = '{{ channelsId }}' --required
AND updateMask = '{{ updateMask}}'
AND validateOnly = {{ validateOnly}}
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Delete a single channel.

DELETE FROM google.eventarc.channels
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND channelsId = '{{ channelsId }}' --required
AND validateOnly = '{{ validateOnly }}';