Skip to main content

message_buses

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

Overview

Namemessage_buses
TypeResource
Idgoogle.eventarc.message_buses

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. Resource name of the form projects/{project}/locations/{location}/messageBuses/{message_bus}
annotationsobjectOptional. Resource annotations.
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/*.
displayNamestringOptional. Resource display name.
etagstringOutput only. This checksum is computed by the server based on the value of other fields, and might be sent only on update and delete requests to ensure that the client has an up-to-date value before proceeding.
labelsobjectOptional. Resource labels.
loggingConfigobjectOptional. Config to control Platform logging for the Message Bus. This log configuration is applied to the Message Bus itself, and all the Enrollments attached to it. (id: LoggingConfig)
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, messageBusesIdGet a single MessageBus.
listselectprojectsId, locationsIdpageSize, pageToken, orderBy, filterList message buses.
createinsertprojectsId, locationsIdmessageBusId, validateOnlyCreate a new MessageBus in a particular project and location.
patchupdateprojectsId, locationsId, messageBusesIdupdateMask, allowMissing, validateOnlyUpdate a single message bus.
deletedeleteprojectsId, locationsId, messageBusesIdetag, allowMissing, validateOnlyDelete a single message bus.

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
locationsIdstring
messageBusesIdstring
projectsIdstring
allowMissingboolean
etagstring
filterstring
messageBusIdstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)
validateOnlyboolean

SELECT examples

Get a single MessageBus.

SELECT
name,
annotations,
createTime,
cryptoKeyName,
displayName,
etag,
labels,
loggingConfig,
uid,
updateTime
FROM google.eventarc.message_buses
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND messageBusesId = '{{ messageBusesId }}' -- required;

INSERT examples

Create a new MessageBus in a particular project and location.

INSERT INTO google.eventarc.message_buses (
data__name,
data__labels,
data__annotations,
data__displayName,
data__cryptoKeyName,
data__loggingConfig,
projectsId,
locationsId,
messageBusId,
validateOnly
)
SELECT
'{{ name }}',
'{{ labels }}',
'{{ annotations }}',
'{{ displayName }}',
'{{ cryptoKeyName }}',
'{{ loggingConfig }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ messageBusId }}',
'{{ validateOnly }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Update a single message bus.

UPDATE google.eventarc.message_buses
SET
data__name = '{{ name }}',
data__labels = '{{ labels }}',
data__annotations = '{{ annotations }}',
data__displayName = '{{ displayName }}',
data__cryptoKeyName = '{{ cryptoKeyName }}',
data__loggingConfig = '{{ loggingConfig }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND messageBusesId = '{{ messageBusesId }}' --required
AND updateMask = '{{ updateMask}}'
AND allowMissing = {{ allowMissing}}
AND validateOnly = {{ validateOnly}}
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Delete a single message bus.

DELETE FROM google.eventarc.message_buses
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND messageBusesId = '{{ messageBusesId }}' --required
AND etag = '{{ etag }}'
AND allowMissing = '{{ allowMissing }}'
AND validateOnly = '{{ validateOnly }}';