kafka_schema_subject_config
Creates, updates, deletes, gets or lists a kafka_schema_subject_config
resource.
Overview
Name | kafka_schema_subject_config |
Type | Resource |
Id | digitalocean.databases.kafka_schema_subject_config |
Fields
The following fields are returned by SELECT
queries:
- databases_get_kafka_schema_subject_config
A JSON object with a key of compatibility_level
.
Name | Datatype | Description |
---|---|---|
subject_name | string | The name of the schema subject. |
compatibility_level | string | The compatibility level of the schema registry. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
databases_get_kafka_schema_subject_config | select | database_cluster_uuid , subject_name | 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 objectcontaining any database configuration parameters. | |
databases_update_kafka_schema_subject_config | replace | database_cluster_uuid , subject_name , data__compatibility_level | 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 objectcontaining 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.
Name | Datatype | Description |
---|---|---|
database_cluster_uuid | string (uuid) | A unique identifier for a database cluster. (example: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30) |
subject_name | string | The name of the Kafka schema subject. (example: customer-schema) |
SELECT
examples
- databases_get_kafka_schema_subject_config
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
- databases_update_kafka_schema_subject_config
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;