Skip to main content

kafka_schema_subject_config

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

Overview

Namekafka_schema_subject_config
TypeResource
Iddigitalocean.databases.kafka_schema_subject_config

Fields

The following fields are returned by SELECT queries:

A JSON object with a key of compatibility_level.

NameDatatypeDescription
subject_namestringThe name of the schema subject.
compatibility_levelstringThe compatibility level of the schema registry.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
databases_get_kafka_schema_subject_configselectdatabase_cluster_uuid, subject_nameTo retrieve the Schema Registry configuration for a Subject of a Kafka cluster, send a GET request to
/v2/databases/$DATABASE_ID/schema-registry/config/$SUBJECT_NAME.
The response is a JSON object with a compatibility_level key, which is set to an object
containing any database configuration parameters.
databases_update_kafka_schema_subject_configreplacedatabase_cluster_uuid, subject_name, data__compatibility_levelTo update the Schema Registry configuration for a Subject of a Kafka cluster, send a PUT request to
/v2/databases/$DATABASE_ID/schema-registry/config/$SUBJECT_NAME.
The response is a JSON object with a compatibility_level key, which is set to an object
containing any database configuration parameters.

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
database_cluster_uuidstring (uuid)A unique identifier for a database cluster. (example: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30)
subject_namestringThe name of the Kafka schema subject. (example: customer-schema)

SELECT examples

To retrieve the Schema Registry configuration for a Subject of a Kafka cluster, send a GET request to
/v2/databases/$DATABASE_ID/schema-registry/config/$SUBJECT_NAME.
The response is a JSON object with a compatibility_level key, which is set to an object
containing any database configuration parameters.

SELECT
subject_name,
compatibility_level
FROM digitalocean.databases.kafka_schema_subject_config
WHERE database_cluster_uuid = '{{ database_cluster_uuid }}' -- required
AND subject_name = '{{ subject_name }}' -- required;

REPLACE examples

To update the Schema Registry configuration for a Subject of a Kafka cluster, send a PUT request to
/v2/databases/$DATABASE_ID/schema-registry/config/$SUBJECT_NAME.
The response is a JSON object with a compatibility_level key, which is set to an object
containing any database configuration parameters.

REPLACE digitalocean.databases.kafka_schema_subject_config
SET
data__compatibility_level = '{{ compatibility_level }}'
WHERE
database_cluster_uuid = '{{ database_cluster_uuid }}' --required
AND subject_name = '{{ subject_name }}' --required
AND data__compatibility_level = '{{ compatibility_level }}' --required
RETURNING
subject_name,
compatibility_level;