config
Creates, updates, deletes, gets or lists a config
resource.
Overview
Name | config |
Type | Resource |
Id | google.managedkafka.config |
Fields
The following fields are returned by SELECT
queries:
- get
Successful response
Name | Datatype | Description |
---|---|---|
alias | string | Optional. The subject to which this subject is an alias of. Only applicable for subject config. |
compatibility | string | Required. 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. |
normalize | boolean | Optional. 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:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , schemaRegistriesId , configId | defaultToGlobal | Get schema config at global level or for a subject. |
update | replace | projectsId , locationsId , schemaRegistriesId , configId | Update config at global level or for a subject. Creates a SchemaSubject-level SchemaConfig if it does not exist. | |
delete | delete | projectsId , locationsId , schemaRegistriesId , configId | Delete 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.
Name | Datatype | Description |
---|---|---|
configId | string | |
locationsId | string | |
projectsId | string | |
schemaRegistriesId | string | |
defaultToGlobal | boolean |
SELECT
examples
- get
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
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
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;