Skip to main content

google_api_sources

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

Overview

Namegoogle_api_sources
TypeResource
Idgoogle.eventarc.google_api_sources

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. Resource name of the form projects/{project}/locations/{location}/googleApiSources/{google_api_source}
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/*.
destinationstringRequired. Destination is the message bus that the GoogleApiSource is delivering to. It must be point to the full resource name of a MessageBus. Format: "projects/{PROJECT_ID}/locations/{region}/messagesBuses/{MESSAGE_BUS_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.
loggingConfigobjectOptional. Config to control Platform logging for the GoogleApiSource. (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, googleApiSourcesIdGet a single GoogleApiSource.
listselectprojectsId, locationsIdpageSize, pageToken, orderBy, filterList GoogleApiSources.
createinsertprojectsId, locationsIdgoogleApiSourceId, validateOnlyCreate a new GoogleApiSource in a particular project and location.
patchupdateprojectsId, locationsId, googleApiSourcesIdupdateMask, allowMissing, validateOnlyUpdate a single GoogleApiSource.
deletedeleteprojectsId, locationsId, googleApiSourcesIdetag, allowMissing, validateOnlyDelete a single GoogleApiSource.

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

SELECT examples

Get a single GoogleApiSource.

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

INSERT examples

Create a new GoogleApiSource in a particular project and location.

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

UPDATE examples

Update a single GoogleApiSource.

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

DELETE examples

Delete a single GoogleApiSource.

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