Skip to main content

config

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

Overview

Nameconfig
TypeResource
Idgoogle.managedkafka.config

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
aliasstringOptional. The subject to which this subject is an alias of. Only applicable for subject config.
compatibilitystringRequired. The compatibility type of the schema. The default value is BACKWARD. If unset in a SchemaSubject-level SchemaConfig, defaults to the global value. If unset in a SchemaRegistry-level SchemaConfig, reverts to the default value.
normalizebooleanOptional. If true, the schema will be normalized before being stored or looked up. The default is false. If unset in a SchemaSubject-level SchemaConfig, the global value will be used. If unset in a SchemaRegistry-level SchemaConfig, reverts to the default value.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, schemaRegistriesId, configIddefaultToGlobalGet schema config at global level or for a subject.
updatereplaceprojectsId, locationsId, schemaRegistriesId, configIdUpdate config at global level or for a subject. Creates a SchemaSubject-level SchemaConfig if it does not exist.
deletedeleteprojectsId, locationsId, schemaRegistriesId, configIdDelete schema config for a subject.

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
configIdstring
locationsIdstring
projectsIdstring
schemaRegistriesIdstring
defaultToGlobalboolean

SELECT examples

Get schema config at global level or for a subject.

SELECT
alias,
compatibility,
normalize
FROM google.managedkafka.config
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND schemaRegistriesId = '{{ schemaRegistriesId }}' -- required
AND configId = '{{ configId }}' -- required
AND defaultToGlobal = '{{ defaultToGlobal }}';

REPLACE examples

Update config at global level or for a subject. Creates a SchemaSubject-level SchemaConfig if it does not exist.

REPLACE google.managedkafka.config
SET
data__compatibility = '{{ compatibility }}',
data__normalize = {{ normalize }}
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND schemaRegistriesId = '{{ schemaRegistriesId }}' --required
AND configId = '{{ configId }}' --required
RETURNING
alias,
compatibility,
normalize;

DELETE examples

Delete schema config for a subject.

DELETE FROM google.managedkafka.config
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND schemaRegistriesId = '{{ schemaRegistriesId }}' --required
AND configId = '{{ configId }}' --required;