import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Log topic is the basic unit for log management in the log service. Log ingestion, search and analysis, and consumption are all performed at the log topic level. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcenginecc from "@volcengine/pulumi-volcenginecc"; * * const tlsTopicDemo = new volcenginecc.tls.Topic("TlsTopicDemo", { * ttl: 187, * hotTtl: 8, * coldTtl: 79, * archiveTtl: 100, * shardCount: 2, * autoSplit: true, * maxSplitShard: 256, * tags: [{ * key: "key1", * value: "v1", * }], * timeKey: "time", * timeFormat: "%Y-%m-%d %H:%M:%S", * logPublicIp: false, * topicName: "ccapi-test", * description: "test", * projectId: "c6fef4c1-041f-434e-b0f4-d5e9*****", * enableHotTtl: false, * allowConsume: false, * }); * ``` * * ## Import * * ```sh * $ pulumi import volcenginecc:tls/topic:Topic example "topic_id" * ``` */ 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; /** * Indicates whether Kafka protocol consumption is enabled for the log topic. true: enabled. false: not enabled. */ readonly allowConsume: pulumi.Output; /** * Archive storage duration. The value range is 60~3650. Archive storage can be enabled if any of the following conditions are met: Standard storage duration is 30 days or longer; standard storage duration is 7 days or longer and infrequent storage duration is 30 days or longer. This parameter is only effective when EnableHotTtl is set to true. */ readonly archiveTtl: pulumi.Output; /** * Enable automatic partition splitting. true: If the amount of data written exceeds the capacity of existing partitions for 5 consecutive minutes, the log service will automatically split partitions based on data volume to meet business needs, but the number of partitions after splitting cannot exceed the maximum split limit. New partitions created within the last 15 minutes will not be automatically split. false: Disable automatic partition splitting. */ readonly autoSplit: pulumi.Output; /** * Low-frequency storage duration. Value range: 30–3650. Low-frequency storage is available when standard storage duration is 7 days or longer. This parameter is effective only when EnableHotTtl is true. */ readonly coldTtl: pulumi.Output; /** * Kafka protocol consumption topic ID, formatted as out+log topic ID. When consuming log data from this log topic via the Kafka protocol, set Topic to this ID. */ readonly consumeTopic: pulumi.Output; /** * Log topic creation time. */ readonly createdTime: pulumi.Output; /** * Log topic description. Does not support <>, ', \, \, or any emoji symbols. Length: 0–64 characters. */ readonly description: pulumi.Output; /** * Enable tiered storage. When enabled, the log service supports standard storage, low-frequency storage, and archive storage. After setting HotTtl, ArchiveTtl, and ColdTtl, if data storage duration exceeds the corresponding value, data will automatically move to low-frequency or archive storage for continued retention until the total log retention duration reaches Ttl, after which backend services will automatically clean up the data. */ readonly enableHotTtl: pulumi.Output; /** * Enable WebTracking. When enabled, you can quickly collect frontend tracking data using WebTracking. true: Enable WebTracking. false (default): Disable WebTracking. After enabling Web Tracking for the log topic, data written via the WebTracks API does not require authentication, which grants anonymous write access to the public network and may result in dirty data. */ readonly enableTracking: pulumi.Output; /** * Standard storage duration. Default is 30 days; value range: 7–3650. This parameter is effective only when EnableHotTtl is true. */ readonly hotTtl: pulumi.Output; /** * Enable external IP recording. Enabled by default. When enabled, the log service automatically adds the following metadata fields to the log content: **tag****client_ip**: Public IP address of the device sending the log. If logs are written using the log service's private domain name, the private IP address is recorded. **tag****receive_time**: Time when the log reaches the server, formatted as a 10-digit Unix timestamp. */ readonly logPublicIp: pulumi.Output; /** * Maximum partition split count, which is the maximum number of partitions after splitting. Value range: 1–256, default is 256. Required only when automatic log partition splitting is enabled (AutoSplit is true). MaxSplitShard must be greater than the specified ShardCount; otherwise, the log service cannot automatically split partitions. */ readonly maxSplitShard: pulumi.Output; /** * Log project ID to which the log topic belongs. */ readonly projectId: pulumi.Output; /** * Number of log partitions. By default, 1 partition is created; value range: 1–10. Each partition provides write capacity of 5 MiB/s, 500 ops/s, and read capacity of 20 MiB/s, 100 ops/s. Plan partitions appropriately when creating a log topic; partition count cannot be modified after creation. */ readonly shardCount: pulumi.Output; readonly tags: pulumi.Output; /** * Time format */ readonly timeFormat: pulumi.Output; /** * Time field name */ readonly timeKey: pulumi.Output; /** * Log topic ID. */ readonly topicId: pulumi.Output; /** * Log topic name. */ readonly topicName: pulumi.Output; /** * Total log retention time in the log service. After the specified log storage duration is exceeded, expired logs in this log topic will be automatically cleared. Unit: days. Default is 30 days. Value range is 1–3650. Setting to 3650 days means permanent storage. */ readonly ttl: pulumi.Output; /** * Log topic modification time. */ readonly updatedTime: 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 { /** * Indicates whether Kafka protocol consumption is enabled for the log topic. true: enabled. false: not enabled. */ allowConsume?: pulumi.Input; /** * Archive storage duration. The value range is 60~3650. Archive storage can be enabled if any of the following conditions are met: Standard storage duration is 30 days or longer; standard storage duration is 7 days or longer and infrequent storage duration is 30 days or longer. This parameter is only effective when EnableHotTtl is set to true. */ archiveTtl?: pulumi.Input; /** * Enable automatic partition splitting. true: If the amount of data written exceeds the capacity of existing partitions for 5 consecutive minutes, the log service will automatically split partitions based on data volume to meet business needs, but the number of partitions after splitting cannot exceed the maximum split limit. New partitions created within the last 15 minutes will not be automatically split. false: Disable automatic partition splitting. */ autoSplit?: pulumi.Input; /** * Low-frequency storage duration. Value range: 30–3650. Low-frequency storage is available when standard storage duration is 7 days or longer. This parameter is effective only when EnableHotTtl is true. */ coldTtl?: pulumi.Input; /** * Kafka protocol consumption topic ID, formatted as out+log topic ID. When consuming log data from this log topic via the Kafka protocol, set Topic to this ID. */ consumeTopic?: pulumi.Input; /** * Log topic creation time. */ createdTime?: pulumi.Input; /** * Log topic description. Does not support <>, ', \, \, or any emoji symbols. Length: 0–64 characters. */ description?: pulumi.Input; /** * Enable tiered storage. When enabled, the log service supports standard storage, low-frequency storage, and archive storage. After setting HotTtl, ArchiveTtl, and ColdTtl, if data storage duration exceeds the corresponding value, data will automatically move to low-frequency or archive storage for continued retention until the total log retention duration reaches Ttl, after which backend services will automatically clean up the data. */ enableHotTtl?: pulumi.Input; /** * Enable WebTracking. When enabled, you can quickly collect frontend tracking data using WebTracking. true: Enable WebTracking. false (default): Disable WebTracking. After enabling Web Tracking for the log topic, data written via the WebTracks API does not require authentication, which grants anonymous write access to the public network and may result in dirty data. */ enableTracking?: pulumi.Input; /** * Standard storage duration. Default is 30 days; value range: 7–3650. This parameter is effective only when EnableHotTtl is true. */ hotTtl?: pulumi.Input; /** * Enable external IP recording. Enabled by default. When enabled, the log service automatically adds the following metadata fields to the log content: **tag****client_ip**: Public IP address of the device sending the log. If logs are written using the log service's private domain name, the private IP address is recorded. **tag****receive_time**: Time when the log reaches the server, formatted as a 10-digit Unix timestamp. */ logPublicIp?: pulumi.Input; /** * Maximum partition split count, which is the maximum number of partitions after splitting. Value range: 1–256, default is 256. Required only when automatic log partition splitting is enabled (AutoSplit is true). MaxSplitShard must be greater than the specified ShardCount; otherwise, the log service cannot automatically split partitions. */ maxSplitShard?: pulumi.Input; /** * Log project ID to which the log topic belongs. */ projectId?: pulumi.Input; /** * Number of log partitions. By default, 1 partition is created; value range: 1–10. Each partition provides write capacity of 5 MiB/s, 500 ops/s, and read capacity of 20 MiB/s, 100 ops/s. Plan partitions appropriately when creating a log topic; partition count cannot be modified after creation. */ shardCount?: pulumi.Input; tags?: pulumi.Input[]>; /** * Time format */ timeFormat?: pulumi.Input; /** * Time field name */ timeKey?: pulumi.Input; /** * Log topic ID. */ topicId?: pulumi.Input; /** * Log topic name. */ topicName?: pulumi.Input; /** * Total log retention time in the log service. After the specified log storage duration is exceeded, expired logs in this log topic will be automatically cleared. Unit: days. Default is 30 days. Value range is 1–3650. Setting to 3650 days means permanent storage. */ ttl?: pulumi.Input; /** * Log topic modification time. */ updatedTime?: pulumi.Input; } /** * The set of arguments for constructing a Topic resource. */ export interface TopicArgs { /** * Indicates whether Kafka protocol consumption is enabled for the log topic. true: enabled. false: not enabled. */ allowConsume?: pulumi.Input; /** * Archive storage duration. The value range is 60~3650. Archive storage can be enabled if any of the following conditions are met: Standard storage duration is 30 days or longer; standard storage duration is 7 days or longer and infrequent storage duration is 30 days or longer. This parameter is only effective when EnableHotTtl is set to true. */ archiveTtl?: pulumi.Input; /** * Enable automatic partition splitting. true: If the amount of data written exceeds the capacity of existing partitions for 5 consecutive minutes, the log service will automatically split partitions based on data volume to meet business needs, but the number of partitions after splitting cannot exceed the maximum split limit. New partitions created within the last 15 minutes will not be automatically split. false: Disable automatic partition splitting. */ autoSplit?: pulumi.Input; /** * Low-frequency storage duration. Value range: 30–3650. Low-frequency storage is available when standard storage duration is 7 days or longer. This parameter is effective only when EnableHotTtl is true. */ coldTtl?: pulumi.Input; /** * Log topic description. Does not support <>, ', \, \, or any emoji symbols. Length: 0–64 characters. */ description?: pulumi.Input; /** * Enable tiered storage. When enabled, the log service supports standard storage, low-frequency storage, and archive storage. After setting HotTtl, ArchiveTtl, and ColdTtl, if data storage duration exceeds the corresponding value, data will automatically move to low-frequency or archive storage for continued retention until the total log retention duration reaches Ttl, after which backend services will automatically clean up the data. */ enableHotTtl?: pulumi.Input; /** * Enable WebTracking. When enabled, you can quickly collect frontend tracking data using WebTracking. true: Enable WebTracking. false (default): Disable WebTracking. After enabling Web Tracking for the log topic, data written via the WebTracks API does not require authentication, which grants anonymous write access to the public network and may result in dirty data. */ enableTracking?: pulumi.Input; /** * Standard storage duration. Default is 30 days; value range: 7–3650. This parameter is effective only when EnableHotTtl is true. */ hotTtl?: pulumi.Input; /** * Enable external IP recording. Enabled by default. When enabled, the log service automatically adds the following metadata fields to the log content: **tag****client_ip**: Public IP address of the device sending the log. If logs are written using the log service's private domain name, the private IP address is recorded. **tag****receive_time**: Time when the log reaches the server, formatted as a 10-digit Unix timestamp. */ logPublicIp?: pulumi.Input; /** * Maximum partition split count, which is the maximum number of partitions after splitting. Value range: 1–256, default is 256. Required only when automatic log partition splitting is enabled (AutoSplit is true). MaxSplitShard must be greater than the specified ShardCount; otherwise, the log service cannot automatically split partitions. */ maxSplitShard?: pulumi.Input; /** * Log project ID to which the log topic belongs. */ projectId: pulumi.Input; /** * Number of log partitions. By default, 1 partition is created; value range: 1–10. Each partition provides write capacity of 5 MiB/s, 500 ops/s, and read capacity of 20 MiB/s, 100 ops/s. Plan partitions appropriately when creating a log topic; partition count cannot be modified after creation. */ shardCount: pulumi.Input; tags?: pulumi.Input[]>; /** * Time format */ timeFormat?: pulumi.Input; /** * Time field name */ timeKey?: pulumi.Input; /** * Log topic name. */ topicName: pulumi.Input; /** * Total log retention time in the log service. After the specified log storage duration is exceeded, expired logs in this log topic will be automatically cleared. Unit: days. Default is 30 days. Value range is 1–3650. Setting to 3650 days means permanent storage. */ ttl?: pulumi.Input; }