import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * 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. * * ## Import * * ```sh * $ pulumi import volcenginecc:kafka/topic:Topic example "instance_id|topic_name" * ``` */ export declare class Topic extends pulumi.CustomResource { /** * Get an existing Topic resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: TopicState, opts?: pulumi.CustomResourceOptions): Topic; /** * Returns true if the given object is an instance of Topic. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Topic; readonly accessPolicies: pulumi.Output; /** * 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. */ readonly allAuthority: pulumi.Output; /** * 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. */ readonly cleanupPolicies: pulumi.Output; /** * Topic creation time. */ readonly createdTime: pulumi.Output; /** * Topic description. Maximum length: 128 characters. */ readonly description: pulumi.Output; /** * Instance ID. */ readonly instanceId: pulumi.Output; /** * Message retention period, in hours. The retention period at the Topic level ranges from 1 to 2160 hours (90 days). */ readonly logRetentionHours: pulumi.Output; /** * 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. */ readonly parameters: pulumi.Output; /** * 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. */ readonly partitionNumber: pulumi.Output; /** * Number of Topic replicas. Can be set to 2 or 3; the default is 3. */ readonly replicaNumber: pulumi.Output; /** * Topic status. */ readonly status: pulumi.Output; readonly tags: pulumi.Output; /** * 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 (.). */ readonly topicName: pulumi.Output; /** * 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. */ readonly usedStoragePercentageInInstance: pulumi.Output; /** * Total storage space currently used by the Topic. */ readonly usedStorageSpaceInBytes: pulumi.Output; /** * Create a Topic resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: TopicArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Topic resources. */ export interface TopicState { accessPolicies?: pulumi.Input[]>; /** * 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. */ allAuthority?: pulumi.Input; /** * 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. */ cleanupPolicies?: pulumi.Input[]>; /** * Topic creation time. */ createdTime?: pulumi.Input; /** * Topic description. Maximum length: 128 characters. */ description?: pulumi.Input; /** * Instance ID. */ instanceId?: pulumi.Input; /** * Message retention period, in hours. The retention period at the Topic level ranges from 1 to 2160 hours (90 days). */ logRetentionHours?: pulumi.Input; /** * 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. */ parameters?: pulumi.Input; /** * 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. */ partitionNumber?: pulumi.Input; /** * Number of Topic replicas. Can be set to 2 or 3; the default is 3. */ replicaNumber?: pulumi.Input; /** * Topic status. */ status?: pulumi.Input; tags?: pulumi.Input[]>; /** * 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 (.). */ topicName?: pulumi.Input; /** * 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. */ usedStoragePercentageInInstance?: pulumi.Input; /** * Total storage space currently used by the Topic. */ usedStorageSpaceInBytes?: pulumi.Input; } /** * The set of arguments for constructing a Topic resource. */ export interface TopicArgs { accessPolicies?: pulumi.Input[]>; /** * 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. */ allAuthority?: pulumi.Input; /** * 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. */ cleanupPolicies?: pulumi.Input[]>; /** * Topic description. Maximum length: 128 characters. */ description?: pulumi.Input; /** * Instance ID. */ instanceId: pulumi.Input; /** * 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. */ parameters?: pulumi.Input; /** * 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. */ partitionNumber: pulumi.Input; /** * Number of Topic replicas. Can be set to 2 or 3; the default is 3. */ replicaNumber?: pulumi.Input; tags?: pulumi.Input[]>; /** * 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 (.). */ topicName: pulumi.Input; }