Skip to main content

enrollments

Creates, updates, deletes, gets or lists an enrollments resource.

Overview

Nameenrollments
TypeResource
Idgoogle.eventarc.enrollments

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. Resource name of the form projects/{project}/locations/{location}/enrollments/{enrollment}
annotationsobjectOptional. Resource annotations.
celMatchstringRequired. A CEL expression identifying which messages this enrollment applies to.
createTimestring (google-datetime)Output only. The creation time.
destinationstringRequired. Destination is the Pipeline that the Enrollment is delivering to. It must point to the full resource name of a Pipeline. Format: "projects/{PROJECT_ID}/locations/{region}/pipelines/{PIPELINE_ID)"
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.
messageBusstringRequired. Immutable. Resource name of the message bus identifying the source of the messages. It matches the form projects/{project}/locations/{location}/messageBuses/{messageBus}.
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, enrollmentsIdGet a single Enrollment.
listselectprojectsId, locationsIdpageSize, pageToken, orderBy, filterList Enrollments.
createinsertprojectsId, locationsIdenrollmentId, validateOnlyCreate a new Enrollment in a particular project and location.
patchupdateprojectsId, locationsId, enrollmentsIdupdateMask, allowMissing, validateOnlyUpdate a single Enrollment.
deletedeleteprojectsId, locationsId, enrollmentsIdetag, allowMissing, validateOnlyDelete a single Enrollment.

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

SELECT examples

Get a single Enrollment.

SELECT
name,
annotations,
celMatch,
createTime,
destination,
displayName,
etag,
labels,
messageBus,
uid,
updateTime
FROM google.eventarc.enrollments
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND enrollmentsId = '{{ enrollmentsId }}' -- required;

INSERT examples

Create a new Enrollment in a particular project and location.

INSERT INTO google.eventarc.enrollments (
data__name,
data__labels,
data__annotations,
data__displayName,
data__celMatch,
data__messageBus,
data__destination,
projectsId,
locationsId,
enrollmentId,
validateOnly
)
SELECT
'{{ name }}',
'{{ labels }}',
'{{ annotations }}',
'{{ displayName }}',
'{{ celMatch }}',
'{{ messageBus }}',
'{{ destination }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ enrollmentId }}',
'{{ validateOnly }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Update a single Enrollment.

UPDATE google.eventarc.enrollments
SET
data__name = '{{ name }}',
data__labels = '{{ labels }}',
data__annotations = '{{ annotations }}',
data__displayName = '{{ displayName }}',
data__celMatch = '{{ celMatch }}',
data__messageBus = '{{ messageBus }}',
data__destination = '{{ destination }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND enrollmentsId = '{{ enrollmentsId }}' --required
AND updateMask = '{{ updateMask}}'
AND allowMissing = {{ allowMissing}}
AND validateOnly = {{ validateOnly}}
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Delete a single Enrollment.

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