Skip to main content

schemas

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

Overview​

Nameschemas
TypeResource
Idgoogle.managedkafka.schemas

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
referencesarrayOptional. The schema references used by the schema.
schemastringThe schema payload.
schemaTypestringOptional. The schema type of the schema. (SCHEMA_TYPE_UNSPECIFIED, AVRO, JSON, PROTOBUF)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, schemaRegistriesId, contextsId, schemasIdsubjectGet the schema for the given schema id.

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
contextsIdstring
locationsIdstring
projectsIdstring
schemaRegistriesIdstring
schemasIdstring
subjectstring

SELECT examples​

Get the schema for the given schema id.

SELECT
references,
schema,
schemaType
FROM google.managedkafka.schemas
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND schemaRegistriesId = '{{ schemaRegistriesId }}' -- required
AND contextsId = '{{ contextsId }}' -- required
AND schemasId = '{{ schemasId }}' -- required
AND subject = '{{ subject }}'
;