topics
Creates, updates, deletes, gets or lists a topics
resource.
Overview
Name | topics |
Type | Resource |
Id | digitalocean.databases.topics |
Fields
Name | Datatype | Description |
---|---|---|
column_anon | `` |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
databases_get_kafka_topic | SELECT | database_cluster_uuid, topic_name | To retrieve a given topic by name from the set of a Kafka cluster's topics, send a GET request to /v2/databases/$DATABASE_ID/topics/$TOPIC_NAME . The result will be a JSON object with a topic key. |
databases_list_kafka_topics | SELECT | database_cluster_uuid | To list all of a Kafka cluster's topics, send a GET request to /v2/databases/$DATABASE_ID/topics . The result will be a JSON object with a topics key. |
databases_create_kafka_topic | INSERT | database_cluster_uuid | To create a topic attached to a Kafka cluster, send a POST request to /v2/databases/$DATABASE_ID/topics . The result will be a JSON object with a topic key. |
databases_delete_kafka_topic | DELETE | database_cluster_uuid, topic_name | To delete a single topic within a Kafka cluster, send a DELETE request to /v2/databases/$DATABASE_ID/topics/$TOPIC_NAME . A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. |
databases_update_kafka_topic | EXEC | database_cluster_uuid, topic_name | To update a topic attached to a Kafka cluster, send a PUT request to /v2/databases/$DATABASE_ID/topics/$TOPIC_NAME . The result will be a JSON object with a topic key. |
SELECT
examples
To list all of a Kafka cluster's topics, send a GET request to /v2/databases/$DATABASE_ID/topics
. The result will be a JSON object with a topics
key.
SELECT
column_anon
FROM digitalocean.databases.topics
WHERE database_cluster_uuid = '{{ database_cluster_uuid }}';
INSERT
example
Use the following StackQL query and manifest file to create a new topics
resource.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO digitalocean.databases.topics (
data__name,
data__replication_factor,
data__partition_count,
data__config,
database_cluster_uuid
)
SELECT
'{{ name }}',
'{{ replication_factor }}',
'{{ partition_count }}',
'{{ config }}',
'{{ database_cluster_uuid }}'
;
/*+ create */
INSERT INTO digitalocean.databases.topics (
database_cluster_uuid
)
SELECT
'{{ database_cluster_uuid }}'
;
- name: topics
props:
- name: database_cluster_uuid
value: string
- name: name
value: string
- name: replication_factor
value: integer
- name: partition_count
value: integer
- name: config
props:
- name: cleanup_policy
value: string
- name: compression_type
value: string
- name: delete_retention_ms
value: integer
- name: file_delete_delay_ms
value: integer
- name: flush_messages
value: integer
- name: flush_ms
value: integer
- name: index_interval_bytes
value: integer
- name: max_compaction_lag_ms
value: integer
- name: max_message_bytes
value: integer
- name: message_down_conversion_enable
value: boolean
- name: message_format_version
value: string
- name: message_timestamp_type
value: string
- name: min_cleanable_dirty_ratio
value: number
- name: min_compaction_lag_ms
value: integer
- name: min_insync_replicas
value: integer
- name: preallocate
value: boolean
- name: retention_bytes
value: integer
- name: retention_ms
value: integer
- name: segment_bytes
value: integer
- name: segment_jitter_ms
value: integer
- name: segment_ms
value: integer
DELETE
example
Deletes the specified topics
resource.
/*+ delete */
DELETE FROM digitalocean.databases.topics
WHERE database_cluster_uuid = '{{ database_cluster_uuid }}'
AND topic_name = '{{ topic_name }}';