Skip to main content

topic_configs

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

Overview

Nametopic_configs
TypeResource
Idconfluent.kafka.topic_configs

Fields

The following fields are returned by SELECT queries:

The topic configuration parameter.

NameDatatypeDescription
namestring
cluster_idstring
topic_namestring
is_defaultboolean
is_read_onlyboolean
is_sensitiveboolean
kindstring
metadataobject
sourcestring
synonymsarray
valuestring

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_kafka_topic_configselectcluster_id, topic_name, name, kafka_endpoint_id, region, cloud_providerReturn the configuration parameter with the given name.
list_kafka_topic_configsselectcluster_id, topic_name, kafka_endpoint_id, region, cloud_providerReturn the list of configuration parameters that belong to the specified topic.
list_kafka_all_topic_configsselectcluster_id, kafka_endpoint_id, region, cloud_providerReturn the list of configuration parameters for all topics hosted by the specified
cluster.
update_kafka_topic_configreplacecluster_id, topic_name, name, kafka_endpoint_id, region, cloud_providerUpdate the configuration parameter with given name. To update the
number of partitions, see
https://docs.confluent.io/cloud/current/api.html#tag/Topic-(v3)/operation/updatePartitionCountKafkaTopic.
update_kafka_topic_config_batchreplacecluster_id, topic_name, kafka_endpoint_id, region, cloud_provider, dataUpdate or delete a set of topic configuration parameters.
Also supports a dry-run mode that only validates whether the operation would succeed if the
validate_only request property is explicitly specified and set to true.
delete_kafka_topic_configdeletecluster_id, topic_name, name, kafka_endpoint_id, region, cloud_providerReset the configuration parameter with given name to its default value.

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
cloud_providerstringCloud provider, lowercase: aws, gcp, or azure (from the cluster spec.cloud). (default: cloud)
cluster_idstringThe Kafka cluster ID. (example: cluster-1)
kafka_endpoint_idstringPer-cluster Kafka REST endpoint ID (the pkc-* host prefix from the Confluent UI Cluster -> Overview -> REST endpoint, or extract from confluent.managed_kafka_clusters.clusters spec.http_endpoint). (default: pkc-00000)
namestringThe configuration parameter name. (example: compression.type)
regionstringCloud region the cluster runs in, e.g. ap-southeast-2 (from the cluster spec.region). (default: region)
topic_namestringThe topic name. (example: topic-1)

SELECT examples

Return the configuration parameter with the given name.

SELECT
name,
cluster_id,
topic_name,
is_default,
is_read_only,
is_sensitive,
kind,
metadata,
source,
synonyms,
value
FROM confluent.kafka.topic_configs
WHERE cluster_id = '{{ cluster_id }}' -- required
AND topic_name = '{{ topic_name }}' -- required
AND name = '{{ name }}' -- required
AND kafka_endpoint_id = '{{ kafka_endpoint_id }}' -- required
AND region = '{{ region }}' -- required
AND cloud_provider = '{{ cloud_provider }}' -- required
;

REPLACE examples

Update the configuration parameter with given name. To update the
number of partitions, see
https://docs.confluent.io/cloud/current/api.html#tag/Topic-(v3)/operation/updatePartitionCountKafkaTopic.

REPLACE confluent.kafka.topic_configs
SET
value = '{{ value }}'
WHERE
cluster_id = '{{ cluster_id }}' --required
AND topic_name = '{{ topic_name }}' --required
AND name = '{{ name }}' --required
AND kafka_endpoint_id = '{{ kafka_endpoint_id }}' --required
AND region = '{{ region }}' --required
AND cloud_provider = '{{ cloud_provider }}' --required;

DELETE examples

Reset the configuration parameter with given name to its default value.

DELETE FROM confluent.kafka.topic_configs
WHERE cluster_id = '{{ cluster_id }}' --required
AND topic_name = '{{ topic_name }}' --required
AND name = '{{ name }}' --required
AND kafka_endpoint_id = '{{ kafka_endpoint_id }}' --required
AND region = '{{ region }}' --required
AND cloud_provider = '{{ cloud_provider }}' --required
;