published on Thursday, Apr 23, 2026 by Volcengine
published on Thursday, Apr 23, 2026 by Volcengine
Topic refers to the message subject and is used to categorize messages. Supports resource management at the Topic level, including creating, viewing, and deleting Topics.
Example Usage
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
resources:
kafkaTopicDemo:
type: volcenginecc:kafka:Topic
name: KafkaTopicDemo
properties:
accessPolicies:
- user_name: KafkaTopicDemo-A
access_policy: Pub
- user_name: KafkaTopicDemo-B
access_policy: Sub
- user_name: KafkaTopicDemo-C
access_policy: PubSub
allAuthority: true
cleanupPolicies:
- delete
- compact
description: KafkaTopicDemo
instanceId: kafka-c****f
parameters: '{"LogRetentionHours":"3","MessageMaxByte":"2","MinInsyncReplicaNumber":"1"}'
partitionNumber: 1
replicaNumber: 1
topicName: KafkaTopicDemo
tags:
- key: env
value: test
Create Topic Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Topic(name: string, args: TopicArgs, opts?: CustomResourceOptions);@overload
def Topic(resource_name: str,
args: TopicArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Topic(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
partition_number: Optional[int] = None,
topic_name: Optional[str] = None,
access_policies: Optional[Sequence[TopicAccessPolicyArgs]] = None,
all_authority: Optional[bool] = None,
cleanup_policies: Optional[Sequence[str]] = None,
description: Optional[str] = None,
parameters: Optional[str] = None,
replica_number: Optional[int] = None,
tags: Optional[Sequence[TopicTagArgs]] = None)func NewTopic(ctx *Context, name string, args TopicArgs, opts ...ResourceOption) (*Topic, error)public Topic(string name, TopicArgs args, CustomResourceOptions? opts = null)type: volcenginecc:kafka:Topic
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args TopicArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args TopicArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args TopicArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TopicArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TopicArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Topic Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Topic resource accepts the following input properties:
- Instance
Id string - Instance ID.
- Partition
Number int - Number of Topic partitions. The range is 1–300. If other Topics have already been created in the instance, the total number of partitions across all Topics must not exceed the partition limit of the instance. If the number of partitions does not meet your business needs, you can purchase more partitions to increase the partition limit of the instance.
- Topic
Name string - Name of the Topic to be created. 3–64 characters. Must start with a letter or number. Supported characters include letters, numbers, hyphens (-), underscores (_), and periods (.).
- Access
Policies List<Volcengine.Topic Access Policy> - bool
- Whether read/write permissions are enabled by default for all users on the Topic to be created. true: (default) All users have read/write permissions for this Topic. false: Not all users have read/write permissions for this Topic. By default, users inherit their default permissions for this Topic. If the default permissions do not meet your requirements, you can specify custom permissions for a user on this Topic through AccessPolicies.
- Cleanup
Policies List<string> - Topic message cleanup policy supports the following three options: [delete]: The default message cleanup policy. When disk space is sufficient, messages are retained within the maximum retention period; when disk space is insufficient, old messages are deleted early to ensure service availability. [compact]: The COMPACT message cleanup policy consolidates messages by Key, retaining only the latest value for messages with the same Key, and removing older records. [delete,compact]: Configures both DELETE and COMPACT message cleanup policies. Messages will be deleted as soon as they meet any of the cleanup criteria.
- Description string
- Topic description. Maximum length: 128 characters.
- Parameters string
- Topic-level parameter configuration. Parameters description MinInsyncReplicaNumber:2: Minimum number of in-sync replicas. If the number of in-sync replicas is less than the configured value, messages cannot be written to the Topic. Higher values increase data reliability but reduce availability. The default is replica count minus 1. For Topic availability, it is recommended to set this to replica count minus 1. MessageMaxByte:12: Maximum message size, in MB, range 1–12. By default, inherits the instance's maximum message size setting. LogRetentionHours:72: Message retention period, in hours, range 0–2160 (up to 90 days). By default, inherits the instance's message retention period setting.
- Replica
Number int - Number of Topic replicas. Can be set to 2 or 3; the default is 3.
-
List<Volcengine.
Topic Tag>
- Instance
Id string - Instance ID.
- Partition
Number int - Number of Topic partitions. The range is 1–300. If other Topics have already been created in the instance, the total number of partitions across all Topics must not exceed the partition limit of the instance. If the number of partitions does not meet your business needs, you can purchase more partitions to increase the partition limit of the instance.
- Topic
Name string - Name of the Topic to be created. 3–64 characters. Must start with a letter or number. Supported characters include letters, numbers, hyphens (-), underscores (_), and periods (.).
- Access
Policies []TopicAccess Policy Args - bool
- Whether read/write permissions are enabled by default for all users on the Topic to be created. true: (default) All users have read/write permissions for this Topic. false: Not all users have read/write permissions for this Topic. By default, users inherit their default permissions for this Topic. If the default permissions do not meet your requirements, you can specify custom permissions for a user on this Topic through AccessPolicies.
- Cleanup
Policies []string - Topic message cleanup policy supports the following three options: [delete]: The default message cleanup policy. When disk space is sufficient, messages are retained within the maximum retention period; when disk space is insufficient, old messages are deleted early to ensure service availability. [compact]: The COMPACT message cleanup policy consolidates messages by Key, retaining only the latest value for messages with the same Key, and removing older records. [delete,compact]: Configures both DELETE and COMPACT message cleanup policies. Messages will be deleted as soon as they meet any of the cleanup criteria.
- Description string
- Topic description. Maximum length: 128 characters.
- Parameters string
- Topic-level parameter configuration. Parameters description MinInsyncReplicaNumber:2: Minimum number of in-sync replicas. If the number of in-sync replicas is less than the configured value, messages cannot be written to the Topic. Higher values increase data reliability but reduce availability. The default is replica count minus 1. For Topic availability, it is recommended to set this to replica count minus 1. MessageMaxByte:12: Maximum message size, in MB, range 1–12. By default, inherits the instance's maximum message size setting. LogRetentionHours:72: Message retention period, in hours, range 0–2160 (up to 90 days). By default, inherits the instance's message retention period setting.
- Replica
Number int - Number of Topic replicas. Can be set to 2 or 3; the default is 3.
-
[]Topic
Tag Args
- instance
Id String - Instance ID.
- partition
Number Integer - Number of Topic partitions. The range is 1–300. If other Topics have already been created in the instance, the total number of partitions across all Topics must not exceed the partition limit of the instance. If the number of partitions does not meet your business needs, you can purchase more partitions to increase the partition limit of the instance.
- topic
Name String - Name of the Topic to be created. 3–64 characters. Must start with a letter or number. Supported characters include letters, numbers, hyphens (-), underscores (_), and periods (.).
- access
Policies List<TopicAccess Policy> - Boolean
- Whether read/write permissions are enabled by default for all users on the Topic to be created. true: (default) All users have read/write permissions for this Topic. false: Not all users have read/write permissions for this Topic. By default, users inherit their default permissions for this Topic. If the default permissions do not meet your requirements, you can specify custom permissions for a user on this Topic through AccessPolicies.
- cleanup
Policies List<String> - Topic message cleanup policy supports the following three options: [delete]: The default message cleanup policy. When disk space is sufficient, messages are retained within the maximum retention period; when disk space is insufficient, old messages are deleted early to ensure service availability. [compact]: The COMPACT message cleanup policy consolidates messages by Key, retaining only the latest value for messages with the same Key, and removing older records. [delete,compact]: Configures both DELETE and COMPACT message cleanup policies. Messages will be deleted as soon as they meet any of the cleanup criteria.
- description String
- Topic description. Maximum length: 128 characters.
- parameters String
- Topic-level parameter configuration. Parameters description MinInsyncReplicaNumber:2: Minimum number of in-sync replicas. If the number of in-sync replicas is less than the configured value, messages cannot be written to the Topic. Higher values increase data reliability but reduce availability. The default is replica count minus 1. For Topic availability, it is recommended to set this to replica count minus 1. MessageMaxByte:12: Maximum message size, in MB, range 1–12. By default, inherits the instance's maximum message size setting. LogRetentionHours:72: Message retention period, in hours, range 0–2160 (up to 90 days). By default, inherits the instance's message retention period setting.
- replica
Number Integer - Number of Topic replicas. Can be set to 2 or 3; the default is 3.
-
List<Topic
Tag>
- instance
Id string - Instance ID.
- partition
Number number - Number of Topic partitions. The range is 1–300. If other Topics have already been created in the instance, the total number of partitions across all Topics must not exceed the partition limit of the instance. If the number of partitions does not meet your business needs, you can purchase more partitions to increase the partition limit of the instance.
- topic
Name string - Name of the Topic to be created. 3–64 characters. Must start with a letter or number. Supported characters include letters, numbers, hyphens (-), underscores (_), and periods (.).
- access
Policies TopicAccess Policy[] - boolean
- Whether read/write permissions are enabled by default for all users on the Topic to be created. true: (default) All users have read/write permissions for this Topic. false: Not all users have read/write permissions for this Topic. By default, users inherit their default permissions for this Topic. If the default permissions do not meet your requirements, you can specify custom permissions for a user on this Topic through AccessPolicies.
- cleanup
Policies string[] - Topic message cleanup policy supports the following three options: [delete]: The default message cleanup policy. When disk space is sufficient, messages are retained within the maximum retention period; when disk space is insufficient, old messages are deleted early to ensure service availability. [compact]: The COMPACT message cleanup policy consolidates messages by Key, retaining only the latest value for messages with the same Key, and removing older records. [delete,compact]: Configures both DELETE and COMPACT message cleanup policies. Messages will be deleted as soon as they meet any of the cleanup criteria.
- description string
- Topic description. Maximum length: 128 characters.
- parameters string
- Topic-level parameter configuration. Parameters description MinInsyncReplicaNumber:2: Minimum number of in-sync replicas. If the number of in-sync replicas is less than the configured value, messages cannot be written to the Topic. Higher values increase data reliability but reduce availability. The default is replica count minus 1. For Topic availability, it is recommended to set this to replica count minus 1. MessageMaxByte:12: Maximum message size, in MB, range 1–12. By default, inherits the instance's maximum message size setting. LogRetentionHours:72: Message retention period, in hours, range 0–2160 (up to 90 days). By default, inherits the instance's message retention period setting.
- replica
Number number - Number of Topic replicas. Can be set to 2 or 3; the default is 3.
-
Topic
Tag[]
- instance_
id str - Instance ID.
- partition_
number int - Number of Topic partitions. The range is 1–300. If other Topics have already been created in the instance, the total number of partitions across all Topics must not exceed the partition limit of the instance. If the number of partitions does not meet your business needs, you can purchase more partitions to increase the partition limit of the instance.
- topic_
name str - Name of the Topic to be created. 3–64 characters. Must start with a letter or number. Supported characters include letters, numbers, hyphens (-), underscores (_), and periods (.).
- access_
policies Sequence[TopicAccess Policy Args] - bool
- Whether read/write permissions are enabled by default for all users on the Topic to be created. true: (default) All users have read/write permissions for this Topic. false: Not all users have read/write permissions for this Topic. By default, users inherit their default permissions for this Topic. If the default permissions do not meet your requirements, you can specify custom permissions for a user on this Topic through AccessPolicies.
- cleanup_
policies Sequence[str] - Topic message cleanup policy supports the following three options: [delete]: The default message cleanup policy. When disk space is sufficient, messages are retained within the maximum retention period; when disk space is insufficient, old messages are deleted early to ensure service availability. [compact]: The COMPACT message cleanup policy consolidates messages by Key, retaining only the latest value for messages with the same Key, and removing older records. [delete,compact]: Configures both DELETE and COMPACT message cleanup policies. Messages will be deleted as soon as they meet any of the cleanup criteria.
- description str
- Topic description. Maximum length: 128 characters.
- parameters str
- Topic-level parameter configuration. Parameters description MinInsyncReplicaNumber:2: Minimum number of in-sync replicas. If the number of in-sync replicas is less than the configured value, messages cannot be written to the Topic. Higher values increase data reliability but reduce availability. The default is replica count minus 1. For Topic availability, it is recommended to set this to replica count minus 1. MessageMaxByte:12: Maximum message size, in MB, range 1–12. By default, inherits the instance's maximum message size setting. LogRetentionHours:72: Message retention period, in hours, range 0–2160 (up to 90 days). By default, inherits the instance's message retention period setting.
- replica_
number int - Number of Topic replicas. Can be set to 2 or 3; the default is 3.
-
Sequence[Topic
Tag Args]
- instance
Id String - Instance ID.
- partition
Number Number - Number of Topic partitions. The range is 1–300. If other Topics have already been created in the instance, the total number of partitions across all Topics must not exceed the partition limit of the instance. If the number of partitions does not meet your business needs, you can purchase more partitions to increase the partition limit of the instance.
- topic
Name String - Name of the Topic to be created. 3–64 characters. Must start with a letter or number. Supported characters include letters, numbers, hyphens (-), underscores (_), and periods (.).
- access
Policies List<Property Map> - Boolean
- Whether read/write permissions are enabled by default for all users on the Topic to be created. true: (default) All users have read/write permissions for this Topic. false: Not all users have read/write permissions for this Topic. By default, users inherit their default permissions for this Topic. If the default permissions do not meet your requirements, you can specify custom permissions for a user on this Topic through AccessPolicies.
- cleanup
Policies List<String> - Topic message cleanup policy supports the following three options: [delete]: The default message cleanup policy. When disk space is sufficient, messages are retained within the maximum retention period; when disk space is insufficient, old messages are deleted early to ensure service availability. [compact]: The COMPACT message cleanup policy consolidates messages by Key, retaining only the latest value for messages with the same Key, and removing older records. [delete,compact]: Configures both DELETE and COMPACT message cleanup policies. Messages will be deleted as soon as they meet any of the cleanup criteria.
- description String
- Topic description. Maximum length: 128 characters.
- parameters String
- Topic-level parameter configuration. Parameters description MinInsyncReplicaNumber:2: Minimum number of in-sync replicas. If the number of in-sync replicas is less than the configured value, messages cannot be written to the Topic. Higher values increase data reliability but reduce availability. The default is replica count minus 1. For Topic availability, it is recommended to set this to replica count minus 1. MessageMaxByte:12: Maximum message size, in MB, range 1–12. By default, inherits the instance's maximum message size setting. LogRetentionHours:72: Message retention period, in hours, range 0–2160 (up to 90 days). By default, inherits the instance's message retention period setting.
- replica
Number Number - Number of Topic replicas. Can be set to 2 or 3; the default is 3.
- List<Property Map>
Outputs
All input properties are implicitly available as output properties. Additionally, the Topic resource produces the following output properties:
- Created
Time string - Topic creation time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Log
Retention intHours - Message retention period, in hours. The retention period at the Topic level ranges from 1 to 2160 hours (90 days).
- Status string
- Topic status.
- Used
Storage doublePercentage In Instance - The current Topic data size as a percentage of the instance's total storage space. Displayed on the console as a percentage with two decimal places.
- Used
Storage intSpace In Bytes - Total storage space currently used by the Topic.
- Created
Time string - Topic creation time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Log
Retention intHours - Message retention period, in hours. The retention period at the Topic level ranges from 1 to 2160 hours (90 days).
- Status string
- Topic status.
- Used
Storage float64Percentage In Instance - The current Topic data size as a percentage of the instance's total storage space. Displayed on the console as a percentage with two decimal places.
- Used
Storage intSpace In Bytes - Total storage space currently used by the Topic.
- created
Time String - Topic creation time.
- id String
- The provider-assigned unique ID for this managed resource.
- log
Retention IntegerHours - Message retention period, in hours. The retention period at the Topic level ranges from 1 to 2160 hours (90 days).
- status String
- Topic status.
- used
Storage DoublePercentage In Instance - The current Topic data size as a percentage of the instance's total storage space. Displayed on the console as a percentage with two decimal places.
- used
Storage IntegerSpace In Bytes - Total storage space currently used by the Topic.
- created
Time string - Topic creation time.
- id string
- The provider-assigned unique ID for this managed resource.
- log
Retention numberHours - Message retention period, in hours. The retention period at the Topic level ranges from 1 to 2160 hours (90 days).
- status string
- Topic status.
- used
Storage numberPercentage In Instance - The current Topic data size as a percentage of the instance's total storage space. Displayed on the console as a percentage with two decimal places.
- used
Storage numberSpace In Bytes - Total storage space currently used by the Topic.
- created_
time str - Topic creation time.
- id str
- The provider-assigned unique ID for this managed resource.
- log_
retention_ inthours - Message retention period, in hours. The retention period at the Topic level ranges from 1 to 2160 hours (90 days).
- status str
- Topic status.
- used_
storage_ floatpercentage_ in_ instance - The current Topic data size as a percentage of the instance's total storage space. Displayed on the console as a percentage with two decimal places.
- used_
storage_ intspace_ in_ bytes - Total storage space currently used by the Topic.
- created
Time String - Topic creation time.
- id String
- The provider-assigned unique ID for this managed resource.
- log
Retention NumberHours - Message retention period, in hours. The retention period at the Topic level ranges from 1 to 2160 hours (90 days).
- status String
- Topic status.
- used
Storage NumberPercentage In Instance - The current Topic data size as a percentage of the instance's total storage space. Displayed on the console as a percentage with two decimal places.
- used
Storage NumberSpace In Bytes - Total storage space currently used by the Topic.
Look up Existing Topic Resource
Get an existing Topic resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: TopicState, opts?: CustomResourceOptions): Topic@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_policies: Optional[Sequence[TopicAccessPolicyArgs]] = None,
all_authority: Optional[bool] = None,
cleanup_policies: Optional[Sequence[str]] = None,
created_time: Optional[str] = None,
description: Optional[str] = None,
instance_id: Optional[str] = None,
log_retention_hours: Optional[int] = None,
parameters: Optional[str] = None,
partition_number: Optional[int] = None,
replica_number: Optional[int] = None,
status: Optional[str] = None,
tags: Optional[Sequence[TopicTagArgs]] = None,
topic_name: Optional[str] = None,
used_storage_percentage_in_instance: Optional[float] = None,
used_storage_space_in_bytes: Optional[int] = None) -> Topicfunc GetTopic(ctx *Context, name string, id IDInput, state *TopicState, opts ...ResourceOption) (*Topic, error)public static Topic Get(string name, Input<string> id, TopicState? state, CustomResourceOptions? opts = null)public static Topic get(String name, Output<String> id, TopicState state, CustomResourceOptions options)resources: _: type: volcenginecc:kafka:Topic get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Access
Policies List<Volcengine.Topic Access Policy> - bool
- Whether read/write permissions are enabled by default for all users on the Topic to be created. true: (default) All users have read/write permissions for this Topic. false: Not all users have read/write permissions for this Topic. By default, users inherit their default permissions for this Topic. If the default permissions do not meet your requirements, you can specify custom permissions for a user on this Topic through AccessPolicies.
- Cleanup
Policies List<string> - Topic message cleanup policy supports the following three options: [delete]: The default message cleanup policy. When disk space is sufficient, messages are retained within the maximum retention period; when disk space is insufficient, old messages are deleted early to ensure service availability. [compact]: The COMPACT message cleanup policy consolidates messages by Key, retaining only the latest value for messages with the same Key, and removing older records. [delete,compact]: Configures both DELETE and COMPACT message cleanup policies. Messages will be deleted as soon as they meet any of the cleanup criteria.
- Created
Time string - Topic creation time.
- Description string
- Topic description. Maximum length: 128 characters.
- Instance
Id string - Instance ID.
- Log
Retention intHours - Message retention period, in hours. The retention period at the Topic level ranges from 1 to 2160 hours (90 days).
- Parameters string
- Topic-level parameter configuration. Parameters description MinInsyncReplicaNumber:2: Minimum number of in-sync replicas. If the number of in-sync replicas is less than the configured value, messages cannot be written to the Topic. Higher values increase data reliability but reduce availability. The default is replica count minus 1. For Topic availability, it is recommended to set this to replica count minus 1. MessageMaxByte:12: Maximum message size, in MB, range 1–12. By default, inherits the instance's maximum message size setting. LogRetentionHours:72: Message retention period, in hours, range 0–2160 (up to 90 days). By default, inherits the instance's message retention period setting.
- Partition
Number int - Number of Topic partitions. The range is 1–300. If other Topics have already been created in the instance, the total number of partitions across all Topics must not exceed the partition limit of the instance. If the number of partitions does not meet your business needs, you can purchase more partitions to increase the partition limit of the instance.
- Replica
Number int - Number of Topic replicas. Can be set to 2 or 3; the default is 3.
- Status string
- Topic status.
-
List<Volcengine.
Topic Tag> - Topic
Name string - Name of the Topic to be created. 3–64 characters. Must start with a letter or number. Supported characters include letters, numbers, hyphens (-), underscores (_), and periods (.).
- Used
Storage doublePercentage In Instance - The current Topic data size as a percentage of the instance's total storage space. Displayed on the console as a percentage with two decimal places.
- Used
Storage intSpace In Bytes - Total storage space currently used by the Topic.
- Access
Policies []TopicAccess Policy Args - bool
- Whether read/write permissions are enabled by default for all users on the Topic to be created. true: (default) All users have read/write permissions for this Topic. false: Not all users have read/write permissions for this Topic. By default, users inherit their default permissions for this Topic. If the default permissions do not meet your requirements, you can specify custom permissions for a user on this Topic through AccessPolicies.
- Cleanup
Policies []string - Topic message cleanup policy supports the following three options: [delete]: The default message cleanup policy. When disk space is sufficient, messages are retained within the maximum retention period; when disk space is insufficient, old messages are deleted early to ensure service availability. [compact]: The COMPACT message cleanup policy consolidates messages by Key, retaining only the latest value for messages with the same Key, and removing older records. [delete,compact]: Configures both DELETE and COMPACT message cleanup policies. Messages will be deleted as soon as they meet any of the cleanup criteria.
- Created
Time string - Topic creation time.
- Description string
- Topic description. Maximum length: 128 characters.
- Instance
Id string - Instance ID.
- Log
Retention intHours - Message retention period, in hours. The retention period at the Topic level ranges from 1 to 2160 hours (90 days).
- Parameters string
- Topic-level parameter configuration. Parameters description MinInsyncReplicaNumber:2: Minimum number of in-sync replicas. If the number of in-sync replicas is less than the configured value, messages cannot be written to the Topic. Higher values increase data reliability but reduce availability. The default is replica count minus 1. For Topic availability, it is recommended to set this to replica count minus 1. MessageMaxByte:12: Maximum message size, in MB, range 1–12. By default, inherits the instance's maximum message size setting. LogRetentionHours:72: Message retention period, in hours, range 0–2160 (up to 90 days). By default, inherits the instance's message retention period setting.
- Partition
Number int - Number of Topic partitions. The range is 1–300. If other Topics have already been created in the instance, the total number of partitions across all Topics must not exceed the partition limit of the instance. If the number of partitions does not meet your business needs, you can purchase more partitions to increase the partition limit of the instance.
- Replica
Number int - Number of Topic replicas. Can be set to 2 or 3; the default is 3.
- Status string
- Topic status.
-
[]Topic
Tag Args - Topic
Name string - Name of the Topic to be created. 3–64 characters. Must start with a letter or number. Supported characters include letters, numbers, hyphens (-), underscores (_), and periods (.).
- Used
Storage float64Percentage In Instance - The current Topic data size as a percentage of the instance's total storage space. Displayed on the console as a percentage with two decimal places.
- Used
Storage intSpace In Bytes - Total storage space currently used by the Topic.
- access
Policies List<TopicAccess Policy> - Boolean
- Whether read/write permissions are enabled by default for all users on the Topic to be created. true: (default) All users have read/write permissions for this Topic. false: Not all users have read/write permissions for this Topic. By default, users inherit their default permissions for this Topic. If the default permissions do not meet your requirements, you can specify custom permissions for a user on this Topic through AccessPolicies.
- cleanup
Policies List<String> - Topic message cleanup policy supports the following three options: [delete]: The default message cleanup policy. When disk space is sufficient, messages are retained within the maximum retention period; when disk space is insufficient, old messages are deleted early to ensure service availability. [compact]: The COMPACT message cleanup policy consolidates messages by Key, retaining only the latest value for messages with the same Key, and removing older records. [delete,compact]: Configures both DELETE and COMPACT message cleanup policies. Messages will be deleted as soon as they meet any of the cleanup criteria.
- created
Time String - Topic creation time.
- description String
- Topic description. Maximum length: 128 characters.
- instance
Id String - Instance ID.
- log
Retention IntegerHours - Message retention period, in hours. The retention period at the Topic level ranges from 1 to 2160 hours (90 days).
- parameters String
- Topic-level parameter configuration. Parameters description MinInsyncReplicaNumber:2: Minimum number of in-sync replicas. If the number of in-sync replicas is less than the configured value, messages cannot be written to the Topic. Higher values increase data reliability but reduce availability. The default is replica count minus 1. For Topic availability, it is recommended to set this to replica count minus 1. MessageMaxByte:12: Maximum message size, in MB, range 1–12. By default, inherits the instance's maximum message size setting. LogRetentionHours:72: Message retention period, in hours, range 0–2160 (up to 90 days). By default, inherits the instance's message retention period setting.
- partition
Number Integer - Number of Topic partitions. The range is 1–300. If other Topics have already been created in the instance, the total number of partitions across all Topics must not exceed the partition limit of the instance. If the number of partitions does not meet your business needs, you can purchase more partitions to increase the partition limit of the instance.
- replica
Number Integer - Number of Topic replicas. Can be set to 2 or 3; the default is 3.
- status String
- Topic status.
-
List<Topic
Tag> - topic
Name String - Name of the Topic to be created. 3–64 characters. Must start with a letter or number. Supported characters include letters, numbers, hyphens (-), underscores (_), and periods (.).
- used
Storage DoublePercentage In Instance - The current Topic data size as a percentage of the instance's total storage space. Displayed on the console as a percentage with two decimal places.
- used
Storage IntegerSpace In Bytes - Total storage space currently used by the Topic.
- access
Policies TopicAccess Policy[] - boolean
- Whether read/write permissions are enabled by default for all users on the Topic to be created. true: (default) All users have read/write permissions for this Topic. false: Not all users have read/write permissions for this Topic. By default, users inherit their default permissions for this Topic. If the default permissions do not meet your requirements, you can specify custom permissions for a user on this Topic through AccessPolicies.
- cleanup
Policies string[] - Topic message cleanup policy supports the following three options: [delete]: The default message cleanup policy. When disk space is sufficient, messages are retained within the maximum retention period; when disk space is insufficient, old messages are deleted early to ensure service availability. [compact]: The COMPACT message cleanup policy consolidates messages by Key, retaining only the latest value for messages with the same Key, and removing older records. [delete,compact]: Configures both DELETE and COMPACT message cleanup policies. Messages will be deleted as soon as they meet any of the cleanup criteria.
- created
Time string - Topic creation time.
- description string
- Topic description. Maximum length: 128 characters.
- instance
Id string - Instance ID.
- log
Retention numberHours - Message retention period, in hours. The retention period at the Topic level ranges from 1 to 2160 hours (90 days).
- parameters string
- Topic-level parameter configuration. Parameters description MinInsyncReplicaNumber:2: Minimum number of in-sync replicas. If the number of in-sync replicas is less than the configured value, messages cannot be written to the Topic. Higher values increase data reliability but reduce availability. The default is replica count minus 1. For Topic availability, it is recommended to set this to replica count minus 1. MessageMaxByte:12: Maximum message size, in MB, range 1–12. By default, inherits the instance's maximum message size setting. LogRetentionHours:72: Message retention period, in hours, range 0–2160 (up to 90 days). By default, inherits the instance's message retention period setting.
- partition
Number number - Number of Topic partitions. The range is 1–300. If other Topics have already been created in the instance, the total number of partitions across all Topics must not exceed the partition limit of the instance. If the number of partitions does not meet your business needs, you can purchase more partitions to increase the partition limit of the instance.
- replica
Number number - Number of Topic replicas. Can be set to 2 or 3; the default is 3.
- status string
- Topic status.
-
Topic
Tag[] - topic
Name string - Name of the Topic to be created. 3–64 characters. Must start with a letter or number. Supported characters include letters, numbers, hyphens (-), underscores (_), and periods (.).
- used
Storage numberPercentage In Instance - The current Topic data size as a percentage of the instance's total storage space. Displayed on the console as a percentage with two decimal places.
- used
Storage numberSpace In Bytes - Total storage space currently used by the Topic.
- access_
policies Sequence[TopicAccess Policy Args] - bool
- Whether read/write permissions are enabled by default for all users on the Topic to be created. true: (default) All users have read/write permissions for this Topic. false: Not all users have read/write permissions for this Topic. By default, users inherit their default permissions for this Topic. If the default permissions do not meet your requirements, you can specify custom permissions for a user on this Topic through AccessPolicies.
- cleanup_
policies Sequence[str] - Topic message cleanup policy supports the following three options: [delete]: The default message cleanup policy. When disk space is sufficient, messages are retained within the maximum retention period; when disk space is insufficient, old messages are deleted early to ensure service availability. [compact]: The COMPACT message cleanup policy consolidates messages by Key, retaining only the latest value for messages with the same Key, and removing older records. [delete,compact]: Configures both DELETE and COMPACT message cleanup policies. Messages will be deleted as soon as they meet any of the cleanup criteria.
- created_
time str - Topic creation time.
- description str
- Topic description. Maximum length: 128 characters.
- instance_
id str - Instance ID.
- log_
retention_ inthours - Message retention period, in hours. The retention period at the Topic level ranges from 1 to 2160 hours (90 days).
- parameters str
- Topic-level parameter configuration. Parameters description MinInsyncReplicaNumber:2: Minimum number of in-sync replicas. If the number of in-sync replicas is less than the configured value, messages cannot be written to the Topic. Higher values increase data reliability but reduce availability. The default is replica count minus 1. For Topic availability, it is recommended to set this to replica count minus 1. MessageMaxByte:12: Maximum message size, in MB, range 1–12. By default, inherits the instance's maximum message size setting. LogRetentionHours:72: Message retention period, in hours, range 0–2160 (up to 90 days). By default, inherits the instance's message retention period setting.
- partition_
number int - Number of Topic partitions. The range is 1–300. If other Topics have already been created in the instance, the total number of partitions across all Topics must not exceed the partition limit of the instance. If the number of partitions does not meet your business needs, you can purchase more partitions to increase the partition limit of the instance.
- replica_
number int - Number of Topic replicas. Can be set to 2 or 3; the default is 3.
- status str
- Topic status.
-
Sequence[Topic
Tag Args] - topic_
name str - Name of the Topic to be created. 3–64 characters. Must start with a letter or number. Supported characters include letters, numbers, hyphens (-), underscores (_), and periods (.).
- used_
storage_ floatpercentage_ in_ instance - The current Topic data size as a percentage of the instance's total storage space. Displayed on the console as a percentage with two decimal places.
- used_
storage_ intspace_ in_ bytes - Total storage space currently used by the Topic.
- access
Policies List<Property Map> - Boolean
- Whether read/write permissions are enabled by default for all users on the Topic to be created. true: (default) All users have read/write permissions for this Topic. false: Not all users have read/write permissions for this Topic. By default, users inherit their default permissions for this Topic. If the default permissions do not meet your requirements, you can specify custom permissions for a user on this Topic through AccessPolicies.
- cleanup
Policies List<String> - Topic message cleanup policy supports the following three options: [delete]: The default message cleanup policy. When disk space is sufficient, messages are retained within the maximum retention period; when disk space is insufficient, old messages are deleted early to ensure service availability. [compact]: The COMPACT message cleanup policy consolidates messages by Key, retaining only the latest value for messages with the same Key, and removing older records. [delete,compact]: Configures both DELETE and COMPACT message cleanup policies. Messages will be deleted as soon as they meet any of the cleanup criteria.
- created
Time String - Topic creation time.
- description String
- Topic description. Maximum length: 128 characters.
- instance
Id String - Instance ID.
- log
Retention NumberHours - Message retention period, in hours. The retention period at the Topic level ranges from 1 to 2160 hours (90 days).
- parameters String
- Topic-level parameter configuration. Parameters description MinInsyncReplicaNumber:2: Minimum number of in-sync replicas. If the number of in-sync replicas is less than the configured value, messages cannot be written to the Topic. Higher values increase data reliability but reduce availability. The default is replica count minus 1. For Topic availability, it is recommended to set this to replica count minus 1. MessageMaxByte:12: Maximum message size, in MB, range 1–12. By default, inherits the instance's maximum message size setting. LogRetentionHours:72: Message retention period, in hours, range 0–2160 (up to 90 days). By default, inherits the instance's message retention period setting.
- partition
Number Number - Number of Topic partitions. The range is 1–300. If other Topics have already been created in the instance, the total number of partitions across all Topics must not exceed the partition limit of the instance. If the number of partitions does not meet your business needs, you can purchase more partitions to increase the partition limit of the instance.
- replica
Number Number - Number of Topic replicas. Can be set to 2 or 3; the default is 3.
- status String
- Topic status.
- List<Property Map>
- topic
Name String - Name of the Topic to be created. 3–64 characters. Must start with a letter or number. Supported characters include letters, numbers, hyphens (-), underscores (_), and periods (.).
- used
Storage NumberPercentage In Instance - The current Topic data size as a percentage of the instance's total storage space. Displayed on the console as a percentage with two decimal places.
- used
Storage NumberSpace In Bytes - Total storage space currently used by the Topic.
Supporting Types
TopicAccessPolicy, TopicAccessPolicyArgs
- Access
Policy string - SASL user access permissions for the current Topic. PubSub: publish and subscribe permissions. Pub: publish permission. Sub: subscribe permission.
- User
Name string - SASL username.
- Access
Policy string - SASL user access permissions for the current Topic. PubSub: publish and subscribe permissions. Pub: publish permission. Sub: subscribe permission.
- User
Name string - SASL username.
- access
Policy String - SASL user access permissions for the current Topic. PubSub: publish and subscribe permissions. Pub: publish permission. Sub: subscribe permission.
- user
Name String - SASL username.
- access
Policy string - SASL user access permissions for the current Topic. PubSub: publish and subscribe permissions. Pub: publish permission. Sub: subscribe permission.
- user
Name string - SASL username.
- access_
policy str - SASL user access permissions for the current Topic. PubSub: publish and subscribe permissions. Pub: publish permission. Sub: subscribe permission.
- user_
name str - SASL username.
- access
Policy String - SASL user access permissions for the current Topic. PubSub: publish and subscribe permissions. Pub: publish permission. Sub: subscribe permission.
- user
Name String - SASL username.
TopicTag, TopicTagArgs
Import
$ pulumi import volcenginecc:kafka/topic:Topic example "instance_id|topic_name"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcenginecc volcengine/pulumi-volcenginecc
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
volcengineccTerraform Provider.
published on Thursday, Apr 23, 2026 by Volcengine
