1. Packages
  2. Packages
  3. Tencentcloud Provider
  4. API Docs
  5. ClsTopic
Viewing docs for tencentcloud 1.83.23
published on Friday, Aug 14, 2026 by tencentcloudstack
Viewing docs for tencentcloud 1.83.23
published on Friday, Aug 14, 2026 by tencentcloudstack

    Provides a resource to create a cls topic.

    NOTE: Field encryption can only be enabled, not disabled.

    NOTE: Field custom_kms_info is for user-defined KMS key. If not set, the CLS default key (alias KMS-CLS) is used.

    Example Usage

    Create a standard cls topic

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.ClsLogset("example", {
        logsetName: "tf_example",
        tags: {
            tagKey: "tagValue",
        },
    });
    const exampleClsTopic = new tencentcloud.ClsTopic("example", {
        topicName: "tf_example",
        logsetId: example.clsLogsetId,
        autoSplit: false,
        maxSplitPartitions: 20,
        partitionCount: 1,
        period: 30,
        storageType: "hot",
        describes: "Test Demo.",
        hotPeriod: 10,
        tags: {
            tagKey: "tagValue",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.ClsLogset("example",
        logset_name="tf_example",
        tags={
            "tagKey": "tagValue",
        })
    example_cls_topic = tencentcloud.ClsTopic("example",
        topic_name="tf_example",
        logset_id=example.cls_logset_id,
        auto_split=False,
        max_split_partitions=20,
        partition_count=1,
        period=30,
        storage_type="hot",
        describes="Test Demo.",
        hot_period=10,
        tags={
            "tagKey": "tagValue",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := tencentcloud.NewClsLogset(ctx, "example", &tencentcloud.ClsLogsetArgs{
    			LogsetName: pulumi.String("tf_example"),
    			Tags: pulumi.StringMap{
    				"tagKey": pulumi.String("tagValue"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewClsTopic(ctx, "example", &tencentcloud.ClsTopicArgs{
    			TopicName:          pulumi.String("tf_example"),
    			LogsetId:           example.ClsLogsetId,
    			AutoSplit:          pulumi.Bool(false),
    			MaxSplitPartitions: pulumi.Float64(20),
    			PartitionCount:     pulumi.Float64(1),
    			Period:             pulumi.Float64(30),
    			StorageType:        pulumi.String("hot"),
    			Describes:          pulumi.String("Test Demo."),
    			HotPeriod:          pulumi.Float64(10),
    			Tags: pulumi.StringMap{
    				"tagKey": pulumi.String("tagValue"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Tencentcloud.ClsLogset("example", new()
        {
            LogsetName = "tf_example",
            Tags = 
            {
                { "tagKey", "tagValue" },
            },
        });
    
        var exampleClsTopic = new Tencentcloud.ClsTopic("example", new()
        {
            TopicName = "tf_example",
            LogsetId = example.ClsLogsetId,
            AutoSplit = false,
            MaxSplitPartitions = 20,
            PartitionCount = 1,
            Period = 30,
            StorageType = "hot",
            Describes = "Test Demo.",
            HotPeriod = 10,
            Tags = 
            {
                { "tagKey", "tagValue" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.ClsLogset;
    import com.pulumi.tencentcloud.ClsLogsetArgs;
    import com.pulumi.tencentcloud.ClsTopic;
    import com.pulumi.tencentcloud.ClsTopicArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new ClsLogset("example", ClsLogsetArgs.builder()
                .logsetName("tf_example")
                .tags(Map.of("tagKey", "tagValue"))
                .build());
    
            var exampleClsTopic = new ClsTopic("exampleClsTopic", ClsTopicArgs.builder()
                .topicName("tf_example")
                .logsetId(example.clsLogsetId())
                .autoSplit(false)
                .maxSplitPartitions(20.0)
                .partitionCount(1.0)
                .period(30.0)
                .storageType("hot")
                .describes("Test Demo.")
                .hotPeriod(10.0)
                .tags(Map.of("tagKey", "tagValue"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:ClsLogset
        properties:
          logsetName: tf_example
          tags:
            tagKey: tagValue
      exampleClsTopic:
        type: tencentcloud:ClsTopic
        name: example
        properties:
          topicName: tf_example
          logsetId: ${example.clsLogsetId}
          autoSplit: false
          maxSplitPartitions: 20
          partitionCount: 1
          period: 30
          storageType: hot
          describes: Test Demo.
          hotPeriod: 10
          tags:
            tagKey: tagValue
    
    Example coming soon!
    

    Create a cls topic with web tracking

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.ClsLogset("example", {
        logsetName: "tf_example",
        tags: {
            tagKey: "tagValue",
        },
    });
    const exampleClsTopic = new tencentcloud.ClsTopic("example", {
        topicName: "tf_example",
        logsetId: example.clsLogsetId,
        autoSplit: false,
        maxSplitPartitions: 20,
        partitionCount: 1,
        period: 30,
        storageType: "hot",
        describes: "Test Demo.",
        hotPeriod: 10,
        isWebTracking: true,
        "extends": {
            anonymousAccess: {
                operations: [
                    "trackLog",
                    "realtimeProducer",
                ],
                conditions: [{
                    attributes: "VpcID",
                    rule: 1,
                    conditionValue: "vpc-ahr3xajx",
                }],
            },
        },
        tags: {
            tagKey: "tagValue",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.ClsLogset("example",
        logset_name="tf_example",
        tags={
            "tagKey": "tagValue",
        })
    example_cls_topic = tencentcloud.ClsTopic("example",
        topic_name="tf_example",
        logset_id=example.cls_logset_id,
        auto_split=False,
        max_split_partitions=20,
        partition_count=1,
        period=30,
        storage_type="hot",
        describes="Test Demo.",
        hot_period=10,
        is_web_tracking=True,
        extends={
            "anonymous_access": {
                "operations": [
                    "trackLog",
                    "realtimeProducer",
                ],
                "conditions": [{
                    "attributes": "VpcID",
                    "rule": 1,
                    "condition_value": "vpc-ahr3xajx",
                }],
            },
        },
        tags={
            "tagKey": "tagValue",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := tencentcloud.NewClsLogset(ctx, "example", &tencentcloud.ClsLogsetArgs{
    			LogsetName: pulumi.String("tf_example"),
    			Tags: pulumi.StringMap{
    				"tagKey": pulumi.String("tagValue"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewClsTopic(ctx, "example", &tencentcloud.ClsTopicArgs{
    			TopicName:          pulumi.String("tf_example"),
    			LogsetId:           example.ClsLogsetId,
    			AutoSplit:          pulumi.Bool(false),
    			MaxSplitPartitions: pulumi.Float64(20),
    			PartitionCount:     pulumi.Float64(1),
    			Period:             pulumi.Float64(30),
    			StorageType:        pulumi.String("hot"),
    			Describes:          pulumi.String("Test Demo."),
    			HotPeriod:          pulumi.Float64(10),
    			IsWebTracking:      pulumi.Bool(true),
    			Extends: &tencentcloud.ClsTopicExtendsArgs{
    				AnonymousAccess: &tencentcloud.ClsTopicExtendsAnonymousAccessArgs{
    					Operations: pulumi.StringArray{
    						pulumi.String("trackLog"),
    						pulumi.String("realtimeProducer"),
    					},
    					Conditions: tencentcloud.ClsTopicExtendsAnonymousAccessConditionArray{
    						&tencentcloud.ClsTopicExtendsAnonymousAccessConditionArgs{
    							Attributes:     pulumi.String("VpcID"),
    							Rule:           pulumi.Float64(1),
    							ConditionValue: pulumi.String("vpc-ahr3xajx"),
    						},
    					},
    				},
    			},
    			Tags: pulumi.StringMap{
    				"tagKey": pulumi.String("tagValue"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Tencentcloud.ClsLogset("example", new()
        {
            LogsetName = "tf_example",
            Tags = 
            {
                { "tagKey", "tagValue" },
            },
        });
    
        var exampleClsTopic = new Tencentcloud.ClsTopic("example", new()
        {
            TopicName = "tf_example",
            LogsetId = example.ClsLogsetId,
            AutoSplit = false,
            MaxSplitPartitions = 20,
            PartitionCount = 1,
            Period = 30,
            StorageType = "hot",
            Describes = "Test Demo.",
            HotPeriod = 10,
            IsWebTracking = true,
            Extends = new Tencentcloud.Inputs.ClsTopicExtendsArgs
            {
                AnonymousAccess = new Tencentcloud.Inputs.ClsTopicExtendsAnonymousAccessArgs
                {
                    Operations = new[]
                    {
                        "trackLog",
                        "realtimeProducer",
                    },
                    Conditions = new[]
                    {
                        new Tencentcloud.Inputs.ClsTopicExtendsAnonymousAccessConditionArgs
                        {
                            Attributes = "VpcID",
                            Rule = 1,
                            ConditionValue = "vpc-ahr3xajx",
                        },
                    },
                },
            },
            Tags = 
            {
                { "tagKey", "tagValue" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.ClsLogset;
    import com.pulumi.tencentcloud.ClsLogsetArgs;
    import com.pulumi.tencentcloud.ClsTopic;
    import com.pulumi.tencentcloud.ClsTopicArgs;
    import com.pulumi.tencentcloud.inputs.ClsTopicExtendsArgs;
    import com.pulumi.tencentcloud.inputs.ClsTopicExtendsAnonymousAccessArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new ClsLogset("example", ClsLogsetArgs.builder()
                .logsetName("tf_example")
                .tags(Map.of("tagKey", "tagValue"))
                .build());
    
            var exampleClsTopic = new ClsTopic("exampleClsTopic", ClsTopicArgs.builder()
                .topicName("tf_example")
                .logsetId(example.clsLogsetId())
                .autoSplit(false)
                .maxSplitPartitions(20.0)
                .partitionCount(1.0)
                .period(30.0)
                .storageType("hot")
                .describes("Test Demo.")
                .hotPeriod(10.0)
                .isWebTracking(true)
                .extends_(ClsTopicExtendsArgs.builder()
                    .anonymousAccess(ClsTopicExtendsAnonymousAccessArgs.builder()
                        .operations(                    
                            "trackLog",
                            "realtimeProducer")
                        .conditions(ClsTopicExtendsAnonymousAccessConditionArgs.builder()
                            .attributes("VpcID")
                            .rule(1.0)
                            .conditionValue("vpc-ahr3xajx")
                            .build())
                        .build())
                    .build())
                .tags(Map.of("tagKey", "tagValue"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:ClsLogset
        properties:
          logsetName: tf_example
          tags:
            tagKey: tagValue
      exampleClsTopic:
        type: tencentcloud:ClsTopic
        name: example
        properties:
          topicName: tf_example
          logsetId: ${example.clsLogsetId}
          autoSplit: false
          maxSplitPartitions: 20
          partitionCount: 1
          period: 30
          storageType: hot
          describes: Test Demo.
          hotPeriod: 10
          isWebTracking: true
          extends:
            anonymousAccess:
              operations:
                - trackLog
                - realtimeProducer
              conditions:
                - attributes: VpcID
                  rule: 1
                  conditionValue: vpc-ahr3xajx
          tags:
            tagKey: tagValue
    
    Example coming soon!
    

    Create a cls metric topic(biz_type=1)

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.ClsLogset("example", {
        logsetName: "tf_example",
        tags: {
            tagKey: "tagValue",
        },
    });
    const exampleClsTopic = new tencentcloud.ClsTopic("example", {
        topicName: "tf_example",
        logsetId: example.clsLogsetId,
        autoSplit: false,
        maxSplitPartitions: 20,
        partitionCount: 1,
        period: 30,
        storageType: "hot",
        describes: "Test Demo.",
        bizType: 1,
        tags: {
            tagKey: "tagValue",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.ClsLogset("example",
        logset_name="tf_example",
        tags={
            "tagKey": "tagValue",
        })
    example_cls_topic = tencentcloud.ClsTopic("example",
        topic_name="tf_example",
        logset_id=example.cls_logset_id,
        auto_split=False,
        max_split_partitions=20,
        partition_count=1,
        period=30,
        storage_type="hot",
        describes="Test Demo.",
        biz_type=1,
        tags={
            "tagKey": "tagValue",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := tencentcloud.NewClsLogset(ctx, "example", &tencentcloud.ClsLogsetArgs{
    			LogsetName: pulumi.String("tf_example"),
    			Tags: pulumi.StringMap{
    				"tagKey": pulumi.String("tagValue"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewClsTopic(ctx, "example", &tencentcloud.ClsTopicArgs{
    			TopicName:          pulumi.String("tf_example"),
    			LogsetId:           example.ClsLogsetId,
    			AutoSplit:          pulumi.Bool(false),
    			MaxSplitPartitions: pulumi.Float64(20),
    			PartitionCount:     pulumi.Float64(1),
    			Period:             pulumi.Float64(30),
    			StorageType:        pulumi.String("hot"),
    			Describes:          pulumi.String("Test Demo."),
    			BizType:            pulumi.Float64(1),
    			Tags: pulumi.StringMap{
    				"tagKey": pulumi.String("tagValue"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Tencentcloud.ClsLogset("example", new()
        {
            LogsetName = "tf_example",
            Tags = 
            {
                { "tagKey", "tagValue" },
            },
        });
    
        var exampleClsTopic = new Tencentcloud.ClsTopic("example", new()
        {
            TopicName = "tf_example",
            LogsetId = example.ClsLogsetId,
            AutoSplit = false,
            MaxSplitPartitions = 20,
            PartitionCount = 1,
            Period = 30,
            StorageType = "hot",
            Describes = "Test Demo.",
            BizType = 1,
            Tags = 
            {
                { "tagKey", "tagValue" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.ClsLogset;
    import com.pulumi.tencentcloud.ClsLogsetArgs;
    import com.pulumi.tencentcloud.ClsTopic;
    import com.pulumi.tencentcloud.ClsTopicArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new ClsLogset("example", ClsLogsetArgs.builder()
                .logsetName("tf_example")
                .tags(Map.of("tagKey", "tagValue"))
                .build());
    
            var exampleClsTopic = new ClsTopic("exampleClsTopic", ClsTopicArgs.builder()
                .topicName("tf_example")
                .logsetId(example.clsLogsetId())
                .autoSplit(false)
                .maxSplitPartitions(20.0)
                .partitionCount(1.0)
                .period(30.0)
                .storageType("hot")
                .describes("Test Demo.")
                .bizType(1.0)
                .tags(Map.of("tagKey", "tagValue"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:ClsLogset
        properties:
          logsetName: tf_example
          tags:
            tagKey: tagValue
      exampleClsTopic:
        type: tencentcloud:ClsTopic
        name: example
        properties:
          topicName: tf_example
          logsetId: ${example.clsLogsetId}
          autoSplit: false
          maxSplitPartitions: 20
          partitionCount: 1
          period: 30
          storageType: hot
          describes: Test Demo.
          bizType: 1
          tags:
            tagKey: tagValue
    
    Example coming soon!
    

    Create a cls topic with custom KMS key (encryption=1)

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.ClsLogset("example", {
        logsetName: "tf_example",
        tags: {
            tagKey: "tagValue",
        },
    });
    const exampleClsTopic = new tencentcloud.ClsTopic("example", {
        topicName: "tf_example",
        logsetId: example.clsLogsetId,
        autoSplit: false,
        maxSplitPartitions: 20,
        partitionCount: 1,
        period: 30,
        storageType: "hot",
        describes: "Test Demo.",
        encryption: 1,
        customKmsInfo: {
            kmsRegion: "ap-guangzhou",
            kmsKeyId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        },
        tags: {
            tagKey: "tagValue",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.ClsLogset("example",
        logset_name="tf_example",
        tags={
            "tagKey": "tagValue",
        })
    example_cls_topic = tencentcloud.ClsTopic("example",
        topic_name="tf_example",
        logset_id=example.cls_logset_id,
        auto_split=False,
        max_split_partitions=20,
        partition_count=1,
        period=30,
        storage_type="hot",
        describes="Test Demo.",
        encryption=1,
        custom_kms_info={
            "kms_region": "ap-guangzhou",
            "kms_key_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        },
        tags={
            "tagKey": "tagValue",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := tencentcloud.NewClsLogset(ctx, "example", &tencentcloud.ClsLogsetArgs{
    			LogsetName: pulumi.String("tf_example"),
    			Tags: pulumi.StringMap{
    				"tagKey": pulumi.String("tagValue"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewClsTopic(ctx, "example", &tencentcloud.ClsTopicArgs{
    			TopicName:          pulumi.String("tf_example"),
    			LogsetId:           example.ClsLogsetId,
    			AutoSplit:          pulumi.Bool(false),
    			MaxSplitPartitions: pulumi.Float64(20),
    			PartitionCount:     pulumi.Float64(1),
    			Period:             pulumi.Float64(30),
    			StorageType:        pulumi.String("hot"),
    			Describes:          pulumi.String("Test Demo."),
    			Encryption:         pulumi.Float64(1),
    			CustomKmsInfo: &tencentcloud.ClsTopicCustomKmsInfoArgs{
    				KmsRegion: pulumi.String("ap-guangzhou"),
    				KmsKeyId:  pulumi.String("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
    			},
    			Tags: pulumi.StringMap{
    				"tagKey": pulumi.String("tagValue"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Tencentcloud.ClsLogset("example", new()
        {
            LogsetName = "tf_example",
            Tags = 
            {
                { "tagKey", "tagValue" },
            },
        });
    
        var exampleClsTopic = new Tencentcloud.ClsTopic("example", new()
        {
            TopicName = "tf_example",
            LogsetId = example.ClsLogsetId,
            AutoSplit = false,
            MaxSplitPartitions = 20,
            PartitionCount = 1,
            Period = 30,
            StorageType = "hot",
            Describes = "Test Demo.",
            Encryption = 1,
            CustomKmsInfo = new Tencentcloud.Inputs.ClsTopicCustomKmsInfoArgs
            {
                KmsRegion = "ap-guangzhou",
                KmsKeyId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
            },
            Tags = 
            {
                { "tagKey", "tagValue" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.ClsLogset;
    import com.pulumi.tencentcloud.ClsLogsetArgs;
    import com.pulumi.tencentcloud.ClsTopic;
    import com.pulumi.tencentcloud.ClsTopicArgs;
    import com.pulumi.tencentcloud.inputs.ClsTopicCustomKmsInfoArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new ClsLogset("example", ClsLogsetArgs.builder()
                .logsetName("tf_example")
                .tags(Map.of("tagKey", "tagValue"))
                .build());
    
            var exampleClsTopic = new ClsTopic("exampleClsTopic", ClsTopicArgs.builder()
                .topicName("tf_example")
                .logsetId(example.clsLogsetId())
                .autoSplit(false)
                .maxSplitPartitions(20.0)
                .partitionCount(1.0)
                .period(30.0)
                .storageType("hot")
                .describes("Test Demo.")
                .encryption(1.0)
                .customKmsInfo(ClsTopicCustomKmsInfoArgs.builder()
                    .kmsRegion("ap-guangzhou")
                    .kmsKeyId("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
                    .build())
                .tags(Map.of("tagKey", "tagValue"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:ClsLogset
        properties:
          logsetName: tf_example
          tags:
            tagKey: tagValue
      exampleClsTopic:
        type: tencentcloud:ClsTopic
        name: example
        properties:
          topicName: tf_example
          logsetId: ${example.clsLogsetId}
          autoSplit: false
          maxSplitPartitions: 20
          partitionCount: 1
          period: 30
          storageType: hot
          describes: Test Demo.
          encryption: 1
          customKmsInfo:
            kmsRegion: ap-guangzhou
            kmsKeyId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
          tags:
            tagKey: tagValue
    
    Example coming soon!
    

    Create ClsTopic Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ClsTopic(name: string, args: ClsTopicArgs, opts?: CustomResourceOptions);
    @overload
    def ClsTopic(resource_name: str,
                 args: ClsTopicArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def ClsTopic(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 logset_id: Optional[str] = None,
                 topic_name: Optional[str] = None,
                 is_web_tracking: Optional[bool] = None,
                 cls_topic_id: Optional[str] = None,
                 describes: Optional[str] = None,
                 encryption: Optional[float] = None,
                 extends: Optional[ClsTopicExtendsArgs] = None,
                 hot_period: Optional[float] = None,
                 auto_split: Optional[bool] = None,
                 custom_kms_info: Optional[ClsTopicCustomKmsInfoArgs] = None,
                 max_split_partitions: Optional[float] = None,
                 partition_count: Optional[float] = None,
                 period: Optional[float] = None,
                 storage_type: Optional[str] = None,
                 tags: Optional[Mapping[str, str]] = None,
                 biz_type: Optional[float] = None)
    func NewClsTopic(ctx *Context, name string, args ClsTopicArgs, opts ...ResourceOption) (*ClsTopic, error)
    public ClsTopic(string name, ClsTopicArgs args, CustomResourceOptions? opts = null)
    public ClsTopic(String name, ClsTopicArgs args)
    public ClsTopic(String name, ClsTopicArgs args, CustomResourceOptions options)
    
    type: tencentcloud:ClsTopic
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "tencentcloud_cls_topic" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ClsTopicArgs
    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 ClsTopicArgs
    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 ClsTopicArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ClsTopicArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ClsTopicArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ClsTopic 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 ClsTopic resource accepts the following input properties:

    LogsetId string
    Logset ID. Get the logset ID via DescribeLogsets API.
    TopicName string
    Log topic name. Constraints: cannot be an empty string, cannot contain the | character, and cannot use the following reserved names: cls_service_log, loglistener_status, loglistener_alarm, loglistener_business, cls_service_metric.
    AutoSplit bool
    Whether to enable automatic split. Default value: true.
    BizType double
    Topic type. 0: log topic (default), 1: metric topic.
    ClsTopicId string
    ID of the resource.
    CustomKmsInfo ClsTopicCustomKmsInfo
    User-defined KMS key information. If empty, the default key (alias KMS-CLS) is used.
    Describes string
    Log topic description.
    Encryption double
    Encryption-related parameters. Supported for encryption-enabled regions and allowlisted users; cannot be passed in other scenarios. 0 or not passed: no encryption; 1: kms-cls cloud product key encryption. Once enabled, it cannot be disabled. Supported regions: ap-beijing, ap-guangzhou, ap-shanghai, ap-singapore, ap-bangkok, ap-jakarta, eu-frankfurt, ap-seoul, ap-tokyo.
    Extends ClsTopicExtends
    Topic extension information.
    HotPeriod double
    0: turn off log settling. Non-0: the number of days of standard storage after enabling log settling. HotPeriod must be greater than or equal to 7 and less than Period. Only effective when storage_type is hot. Not supported for metric topics.
    IsWebTracking bool
    Free authentication switch. false: closed (default); true: enabled. When enabled, anonymous access to the log topic will be supported for specified operations. Not supported for metric topics.
    MaxSplitPartitions double
    Maximum number of partitions allowed for the topic if automatic split is enabled. Default value: 50.
    PartitionCount double
    Number of log topic partitions. Default: 1, maximum: 10.
    Period double
    Retention period, unit: days. Log topic (standard storage): 1 to 3600 days, value 3640 means permanent retention. Log topic (infrequent storage): 7 to 3600 days, value 3640 means permanent retention. Metric topic: 1 to 3600 days, value 3640 means permanent retention.
    StorageType string
    Log topic storage type. Valid values: hot: standard storage; cold: infrequent storage. Default value: hot. Not supported for metric topics.
    Tags Dictionary<string, string>
    Tag description list. Up to 10 tag key-value pairs are supported, and the same resource can only be bound to the same tag key.
    LogsetId string
    Logset ID. Get the logset ID via DescribeLogsets API.
    TopicName string
    Log topic name. Constraints: cannot be an empty string, cannot contain the | character, and cannot use the following reserved names: cls_service_log, loglistener_status, loglistener_alarm, loglistener_business, cls_service_metric.
    AutoSplit bool
    Whether to enable automatic split. Default value: true.
    BizType float64
    Topic type. 0: log topic (default), 1: metric topic.
    ClsTopicId string
    ID of the resource.
    CustomKmsInfo ClsTopicCustomKmsInfoArgs
    User-defined KMS key information. If empty, the default key (alias KMS-CLS) is used.
    Describes string
    Log topic description.
    Encryption float64
    Encryption-related parameters. Supported for encryption-enabled regions and allowlisted users; cannot be passed in other scenarios. 0 or not passed: no encryption; 1: kms-cls cloud product key encryption. Once enabled, it cannot be disabled. Supported regions: ap-beijing, ap-guangzhou, ap-shanghai, ap-singapore, ap-bangkok, ap-jakarta, eu-frankfurt, ap-seoul, ap-tokyo.
    Extends ClsTopicExtendsArgs
    Topic extension information.
    HotPeriod float64
    0: turn off log settling. Non-0: the number of days of standard storage after enabling log settling. HotPeriod must be greater than or equal to 7 and less than Period. Only effective when storage_type is hot. Not supported for metric topics.
    IsWebTracking bool
    Free authentication switch. false: closed (default); true: enabled. When enabled, anonymous access to the log topic will be supported for specified operations. Not supported for metric topics.
    MaxSplitPartitions float64
    Maximum number of partitions allowed for the topic if automatic split is enabled. Default value: 50.
    PartitionCount float64
    Number of log topic partitions. Default: 1, maximum: 10.
    Period float64
    Retention period, unit: days. Log topic (standard storage): 1 to 3600 days, value 3640 means permanent retention. Log topic (infrequent storage): 7 to 3600 days, value 3640 means permanent retention. Metric topic: 1 to 3600 days, value 3640 means permanent retention.
    StorageType string
    Log topic storage type. Valid values: hot: standard storage; cold: infrequent storage. Default value: hot. Not supported for metric topics.
    Tags map[string]string
    Tag description list. Up to 10 tag key-value pairs are supported, and the same resource can only be bound to the same tag key.
    logset_id string
    Logset ID. Get the logset ID via DescribeLogsets API.
    topic_name string
    Log topic name. Constraints: cannot be an empty string, cannot contain the | character, and cannot use the following reserved names: cls_service_log, loglistener_status, loglistener_alarm, loglistener_business, cls_service_metric.
    auto_split bool
    Whether to enable automatic split. Default value: true.
    biz_type number
    Topic type. 0: log topic (default), 1: metric topic.
    cls_topic_id string
    ID of the resource.
    custom_kms_info object
    User-defined KMS key information. If empty, the default key (alias KMS-CLS) is used.
    describes string
    Log topic description.
    encryption number
    Encryption-related parameters. Supported for encryption-enabled regions and allowlisted users; cannot be passed in other scenarios. 0 or not passed: no encryption; 1: kms-cls cloud product key encryption. Once enabled, it cannot be disabled. Supported regions: ap-beijing, ap-guangzhou, ap-shanghai, ap-singapore, ap-bangkok, ap-jakarta, eu-frankfurt, ap-seoul, ap-tokyo.
    extends object
    Topic extension information.
    hot_period number
    0: turn off log settling. Non-0: the number of days of standard storage after enabling log settling. HotPeriod must be greater than or equal to 7 and less than Period. Only effective when storage_type is hot. Not supported for metric topics.
    is_web_tracking bool
    Free authentication switch. false: closed (default); true: enabled. When enabled, anonymous access to the log topic will be supported for specified operations. Not supported for metric topics.
    max_split_partitions number
    Maximum number of partitions allowed for the topic if automatic split is enabled. Default value: 50.
    partition_count number
    Number of log topic partitions. Default: 1, maximum: 10.
    period number
    Retention period, unit: days. Log topic (standard storage): 1 to 3600 days, value 3640 means permanent retention. Log topic (infrequent storage): 7 to 3600 days, value 3640 means permanent retention. Metric topic: 1 to 3600 days, value 3640 means permanent retention.
    storage_type string
    Log topic storage type. Valid values: hot: standard storage; cold: infrequent storage. Default value: hot. Not supported for metric topics.
    tags map(string)
    Tag description list. Up to 10 tag key-value pairs are supported, and the same resource can only be bound to the same tag key.
    logsetId String
    Logset ID. Get the logset ID via DescribeLogsets API.
    topicName String
    Log topic name. Constraints: cannot be an empty string, cannot contain the | character, and cannot use the following reserved names: cls_service_log, loglistener_status, loglistener_alarm, loglistener_business, cls_service_metric.
    autoSplit Boolean
    Whether to enable automatic split. Default value: true.
    bizType Double
    Topic type. 0: log topic (default), 1: metric topic.
    clsTopicId String
    ID of the resource.
    customKmsInfo ClsTopicCustomKmsInfo
    User-defined KMS key information. If empty, the default key (alias KMS-CLS) is used.
    describes String
    Log topic description.
    encryption Double
    Encryption-related parameters. Supported for encryption-enabled regions and allowlisted users; cannot be passed in other scenarios. 0 or not passed: no encryption; 1: kms-cls cloud product key encryption. Once enabled, it cannot be disabled. Supported regions: ap-beijing, ap-guangzhou, ap-shanghai, ap-singapore, ap-bangkok, ap-jakarta, eu-frankfurt, ap-seoul, ap-tokyo.
    extends_ ClsTopicExtends
    Topic extension information.
    hotPeriod Double
    0: turn off log settling. Non-0: the number of days of standard storage after enabling log settling. HotPeriod must be greater than or equal to 7 and less than Period. Only effective when storage_type is hot. Not supported for metric topics.
    isWebTracking Boolean
    Free authentication switch. false: closed (default); true: enabled. When enabled, anonymous access to the log topic will be supported for specified operations. Not supported for metric topics.
    maxSplitPartitions Double
    Maximum number of partitions allowed for the topic if automatic split is enabled. Default value: 50.
    partitionCount Double
    Number of log topic partitions. Default: 1, maximum: 10.
    period Double
    Retention period, unit: days. Log topic (standard storage): 1 to 3600 days, value 3640 means permanent retention. Log topic (infrequent storage): 7 to 3600 days, value 3640 means permanent retention. Metric topic: 1 to 3600 days, value 3640 means permanent retention.
    storageType String
    Log topic storage type. Valid values: hot: standard storage; cold: infrequent storage. Default value: hot. Not supported for metric topics.
    tags Map<String,String>
    Tag description list. Up to 10 tag key-value pairs are supported, and the same resource can only be bound to the same tag key.
    logsetId string
    Logset ID. Get the logset ID via DescribeLogsets API.
    topicName string
    Log topic name. Constraints: cannot be an empty string, cannot contain the | character, and cannot use the following reserved names: cls_service_log, loglistener_status, loglistener_alarm, loglistener_business, cls_service_metric.
    autoSplit boolean
    Whether to enable automatic split. Default value: true.
    bizType number
    Topic type. 0: log topic (default), 1: metric topic.
    clsTopicId string
    ID of the resource.
    customKmsInfo ClsTopicCustomKmsInfo
    User-defined KMS key information. If empty, the default key (alias KMS-CLS) is used.
    describes string
    Log topic description.
    encryption number
    Encryption-related parameters. Supported for encryption-enabled regions and allowlisted users; cannot be passed in other scenarios. 0 or not passed: no encryption; 1: kms-cls cloud product key encryption. Once enabled, it cannot be disabled. Supported regions: ap-beijing, ap-guangzhou, ap-shanghai, ap-singapore, ap-bangkok, ap-jakarta, eu-frankfurt, ap-seoul, ap-tokyo.
    extends ClsTopicExtends
    Topic extension information.
    hotPeriod number
    0: turn off log settling. Non-0: the number of days of standard storage after enabling log settling. HotPeriod must be greater than or equal to 7 and less than Period. Only effective when storage_type is hot. Not supported for metric topics.
    isWebTracking boolean
    Free authentication switch. false: closed (default); true: enabled. When enabled, anonymous access to the log topic will be supported for specified operations. Not supported for metric topics.
    maxSplitPartitions number
    Maximum number of partitions allowed for the topic if automatic split is enabled. Default value: 50.
    partitionCount number
    Number of log topic partitions. Default: 1, maximum: 10.
    period number
    Retention period, unit: days. Log topic (standard storage): 1 to 3600 days, value 3640 means permanent retention. Log topic (infrequent storage): 7 to 3600 days, value 3640 means permanent retention. Metric topic: 1 to 3600 days, value 3640 means permanent retention.
    storageType string
    Log topic storage type. Valid values: hot: standard storage; cold: infrequent storage. Default value: hot. Not supported for metric topics.
    tags {[key: string]: string}
    Tag description list. Up to 10 tag key-value pairs are supported, and the same resource can only be bound to the same tag key.
    logset_id str
    Logset ID. Get the logset ID via DescribeLogsets API.
    topic_name str
    Log topic name. Constraints: cannot be an empty string, cannot contain the | character, and cannot use the following reserved names: cls_service_log, loglistener_status, loglistener_alarm, loglistener_business, cls_service_metric.
    auto_split bool
    Whether to enable automatic split. Default value: true.
    biz_type float
    Topic type. 0: log topic (default), 1: metric topic.
    cls_topic_id str
    ID of the resource.
    custom_kms_info ClsTopicCustomKmsInfoArgs
    User-defined KMS key information. If empty, the default key (alias KMS-CLS) is used.
    describes str
    Log topic description.
    encryption float
    Encryption-related parameters. Supported for encryption-enabled regions and allowlisted users; cannot be passed in other scenarios. 0 or not passed: no encryption; 1: kms-cls cloud product key encryption. Once enabled, it cannot be disabled. Supported regions: ap-beijing, ap-guangzhou, ap-shanghai, ap-singapore, ap-bangkok, ap-jakarta, eu-frankfurt, ap-seoul, ap-tokyo.
    extends ClsTopicExtendsArgs
    Topic extension information.
    hot_period float
    0: turn off log settling. Non-0: the number of days of standard storage after enabling log settling. HotPeriod must be greater than or equal to 7 and less than Period. Only effective when storage_type is hot. Not supported for metric topics.
    is_web_tracking bool
    Free authentication switch. false: closed (default); true: enabled. When enabled, anonymous access to the log topic will be supported for specified operations. Not supported for metric topics.
    max_split_partitions float
    Maximum number of partitions allowed for the topic if automatic split is enabled. Default value: 50.
    partition_count float
    Number of log topic partitions. Default: 1, maximum: 10.
    period float
    Retention period, unit: days. Log topic (standard storage): 1 to 3600 days, value 3640 means permanent retention. Log topic (infrequent storage): 7 to 3600 days, value 3640 means permanent retention. Metric topic: 1 to 3600 days, value 3640 means permanent retention.
    storage_type str
    Log topic storage type. Valid values: hot: standard storage; cold: infrequent storage. Default value: hot. Not supported for metric topics.
    tags Mapping[str, str]
    Tag description list. Up to 10 tag key-value pairs are supported, and the same resource can only be bound to the same tag key.
    logsetId String
    Logset ID. Get the logset ID via DescribeLogsets API.
    topicName String
    Log topic name. Constraints: cannot be an empty string, cannot contain the | character, and cannot use the following reserved names: cls_service_log, loglistener_status, loglistener_alarm, loglistener_business, cls_service_metric.
    autoSplit Boolean
    Whether to enable automatic split. Default value: true.
    bizType Number
    Topic type. 0: log topic (default), 1: metric topic.
    clsTopicId String
    ID of the resource.
    customKmsInfo Property Map
    User-defined KMS key information. If empty, the default key (alias KMS-CLS) is used.
    describes String
    Log topic description.
    encryption Number
    Encryption-related parameters. Supported for encryption-enabled regions and allowlisted users; cannot be passed in other scenarios. 0 or not passed: no encryption; 1: kms-cls cloud product key encryption. Once enabled, it cannot be disabled. Supported regions: ap-beijing, ap-guangzhou, ap-shanghai, ap-singapore, ap-bangkok, ap-jakarta, eu-frankfurt, ap-seoul, ap-tokyo.
    extends Property Map
    Topic extension information.
    hotPeriod Number
    0: turn off log settling. Non-0: the number of days of standard storage after enabling log settling. HotPeriod must be greater than or equal to 7 and less than Period. Only effective when storage_type is hot. Not supported for metric topics.
    isWebTracking Boolean
    Free authentication switch. false: closed (default); true: enabled. When enabled, anonymous access to the log topic will be supported for specified operations. Not supported for metric topics.
    maxSplitPartitions Number
    Maximum number of partitions allowed for the topic if automatic split is enabled. Default value: 50.
    partitionCount Number
    Number of log topic partitions. Default: 1, maximum: 10.
    period Number
    Retention period, unit: days. Log topic (standard storage): 1 to 3600 days, value 3640 means permanent retention. Log topic (infrequent storage): 7 to 3600 days, value 3640 means permanent retention. Metric topic: 1 to 3600 days, value 3640 means permanent retention.
    storageType String
    Log topic storage type. Valid values: hot: standard storage; cold: infrequent storage. Default value: hot. Not supported for metric topics.
    tags Map<String>
    Tag description list. Up to 10 tag key-value pairs are supported, and the same resource can only be bound to the same tag key.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ClsTopic resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ClsTopic Resource

    Get an existing ClsTopic 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?: ClsTopicState, opts?: CustomResourceOptions): ClsTopic
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auto_split: Optional[bool] = None,
            biz_type: Optional[float] = None,
            cls_topic_id: Optional[str] = None,
            custom_kms_info: Optional[ClsTopicCustomKmsInfoArgs] = None,
            describes: Optional[str] = None,
            encryption: Optional[float] = None,
            extends: Optional[ClsTopicExtendsArgs] = None,
            hot_period: Optional[float] = None,
            is_web_tracking: Optional[bool] = None,
            logset_id: Optional[str] = None,
            max_split_partitions: Optional[float] = None,
            partition_count: Optional[float] = None,
            period: Optional[float] = None,
            storage_type: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            topic_name: Optional[str] = None) -> ClsTopic
    func GetClsTopic(ctx *Context, name string, id IDInput, state *ClsTopicState, opts ...ResourceOption) (*ClsTopic, error)
    public static ClsTopic Get(string name, Input<string> id, ClsTopicState? state, CustomResourceOptions? opts = null)
    public static ClsTopic get(String name, Output<String> id, ClsTopicState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:ClsTopic    get:      id: ${id}
    import {
      to = tencentcloud_cls_topic.example
      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.
    The following state arguments are supported:
    AutoSplit bool
    Whether to enable automatic split. Default value: true.
    BizType double
    Topic type. 0: log topic (default), 1: metric topic.
    ClsTopicId string
    ID of the resource.
    CustomKmsInfo ClsTopicCustomKmsInfo
    User-defined KMS key information. If empty, the default key (alias KMS-CLS) is used.
    Describes string
    Log topic description.
    Encryption double
    Encryption-related parameters. Supported for encryption-enabled regions and allowlisted users; cannot be passed in other scenarios. 0 or not passed: no encryption; 1: kms-cls cloud product key encryption. Once enabled, it cannot be disabled. Supported regions: ap-beijing, ap-guangzhou, ap-shanghai, ap-singapore, ap-bangkok, ap-jakarta, eu-frankfurt, ap-seoul, ap-tokyo.
    Extends ClsTopicExtends
    Topic extension information.
    HotPeriod double
    0: turn off log settling. Non-0: the number of days of standard storage after enabling log settling. HotPeriod must be greater than or equal to 7 and less than Period. Only effective when storage_type is hot. Not supported for metric topics.
    IsWebTracking bool
    Free authentication switch. false: closed (default); true: enabled. When enabled, anonymous access to the log topic will be supported for specified operations. Not supported for metric topics.
    LogsetId string
    Logset ID. Get the logset ID via DescribeLogsets API.
    MaxSplitPartitions double
    Maximum number of partitions allowed for the topic if automatic split is enabled. Default value: 50.
    PartitionCount double
    Number of log topic partitions. Default: 1, maximum: 10.
    Period double
    Retention period, unit: days. Log topic (standard storage): 1 to 3600 days, value 3640 means permanent retention. Log topic (infrequent storage): 7 to 3600 days, value 3640 means permanent retention. Metric topic: 1 to 3600 days, value 3640 means permanent retention.
    StorageType string
    Log topic storage type. Valid values: hot: standard storage; cold: infrequent storage. Default value: hot. Not supported for metric topics.
    Tags Dictionary<string, string>
    Tag description list. Up to 10 tag key-value pairs are supported, and the same resource can only be bound to the same tag key.
    TopicName string
    Log topic name. Constraints: cannot be an empty string, cannot contain the | character, and cannot use the following reserved names: cls_service_log, loglistener_status, loglistener_alarm, loglistener_business, cls_service_metric.
    AutoSplit bool
    Whether to enable automatic split. Default value: true.
    BizType float64
    Topic type. 0: log topic (default), 1: metric topic.
    ClsTopicId string
    ID of the resource.
    CustomKmsInfo ClsTopicCustomKmsInfoArgs
    User-defined KMS key information. If empty, the default key (alias KMS-CLS) is used.
    Describes string
    Log topic description.
    Encryption float64
    Encryption-related parameters. Supported for encryption-enabled regions and allowlisted users; cannot be passed in other scenarios. 0 or not passed: no encryption; 1: kms-cls cloud product key encryption. Once enabled, it cannot be disabled. Supported regions: ap-beijing, ap-guangzhou, ap-shanghai, ap-singapore, ap-bangkok, ap-jakarta, eu-frankfurt, ap-seoul, ap-tokyo.
    Extends ClsTopicExtendsArgs
    Topic extension information.
    HotPeriod float64
    0: turn off log settling. Non-0: the number of days of standard storage after enabling log settling. HotPeriod must be greater than or equal to 7 and less than Period. Only effective when storage_type is hot. Not supported for metric topics.
    IsWebTracking bool
    Free authentication switch. false: closed (default); true: enabled. When enabled, anonymous access to the log topic will be supported for specified operations. Not supported for metric topics.
    LogsetId string
    Logset ID. Get the logset ID via DescribeLogsets API.
    MaxSplitPartitions float64
    Maximum number of partitions allowed for the topic if automatic split is enabled. Default value: 50.
    PartitionCount float64
    Number of log topic partitions. Default: 1, maximum: 10.
    Period float64
    Retention period, unit: days. Log topic (standard storage): 1 to 3600 days, value 3640 means permanent retention. Log topic (infrequent storage): 7 to 3600 days, value 3640 means permanent retention. Metric topic: 1 to 3600 days, value 3640 means permanent retention.
    StorageType string
    Log topic storage type. Valid values: hot: standard storage; cold: infrequent storage. Default value: hot. Not supported for metric topics.
    Tags map[string]string
    Tag description list. Up to 10 tag key-value pairs are supported, and the same resource can only be bound to the same tag key.
    TopicName string
    Log topic name. Constraints: cannot be an empty string, cannot contain the | character, and cannot use the following reserved names: cls_service_log, loglistener_status, loglistener_alarm, loglistener_business, cls_service_metric.
    auto_split bool
    Whether to enable automatic split. Default value: true.
    biz_type number
    Topic type. 0: log topic (default), 1: metric topic.
    cls_topic_id string
    ID of the resource.
    custom_kms_info object
    User-defined KMS key information. If empty, the default key (alias KMS-CLS) is used.
    describes string
    Log topic description.
    encryption number
    Encryption-related parameters. Supported for encryption-enabled regions and allowlisted users; cannot be passed in other scenarios. 0 or not passed: no encryption; 1: kms-cls cloud product key encryption. Once enabled, it cannot be disabled. Supported regions: ap-beijing, ap-guangzhou, ap-shanghai, ap-singapore, ap-bangkok, ap-jakarta, eu-frankfurt, ap-seoul, ap-tokyo.
    extends object
    Topic extension information.
    hot_period number
    0: turn off log settling. Non-0: the number of days of standard storage after enabling log settling. HotPeriod must be greater than or equal to 7 and less than Period. Only effective when storage_type is hot. Not supported for metric topics.
    is_web_tracking bool
    Free authentication switch. false: closed (default); true: enabled. When enabled, anonymous access to the log topic will be supported for specified operations. Not supported for metric topics.
    logset_id string
    Logset ID. Get the logset ID via DescribeLogsets API.
    max_split_partitions number
    Maximum number of partitions allowed for the topic if automatic split is enabled. Default value: 50.
    partition_count number
    Number of log topic partitions. Default: 1, maximum: 10.
    period number
    Retention period, unit: days. Log topic (standard storage): 1 to 3600 days, value 3640 means permanent retention. Log topic (infrequent storage): 7 to 3600 days, value 3640 means permanent retention. Metric topic: 1 to 3600 days, value 3640 means permanent retention.
    storage_type string
    Log topic storage type. Valid values: hot: standard storage; cold: infrequent storage. Default value: hot. Not supported for metric topics.
    tags map(string)
    Tag description list. Up to 10 tag key-value pairs are supported, and the same resource can only be bound to the same tag key.
    topic_name string
    Log topic name. Constraints: cannot be an empty string, cannot contain the | character, and cannot use the following reserved names: cls_service_log, loglistener_status, loglistener_alarm, loglistener_business, cls_service_metric.
    autoSplit Boolean
    Whether to enable automatic split. Default value: true.
    bizType Double
    Topic type. 0: log topic (default), 1: metric topic.
    clsTopicId String
    ID of the resource.
    customKmsInfo ClsTopicCustomKmsInfo
    User-defined KMS key information. If empty, the default key (alias KMS-CLS) is used.
    describes String
    Log topic description.
    encryption Double
    Encryption-related parameters. Supported for encryption-enabled regions and allowlisted users; cannot be passed in other scenarios. 0 or not passed: no encryption; 1: kms-cls cloud product key encryption. Once enabled, it cannot be disabled. Supported regions: ap-beijing, ap-guangzhou, ap-shanghai, ap-singapore, ap-bangkok, ap-jakarta, eu-frankfurt, ap-seoul, ap-tokyo.
    extends_ ClsTopicExtends
    Topic extension information.
    hotPeriod Double
    0: turn off log settling. Non-0: the number of days of standard storage after enabling log settling. HotPeriod must be greater than or equal to 7 and less than Period. Only effective when storage_type is hot. Not supported for metric topics.
    isWebTracking Boolean
    Free authentication switch. false: closed (default); true: enabled. When enabled, anonymous access to the log topic will be supported for specified operations. Not supported for metric topics.
    logsetId String
    Logset ID. Get the logset ID via DescribeLogsets API.
    maxSplitPartitions Double
    Maximum number of partitions allowed for the topic if automatic split is enabled. Default value: 50.
    partitionCount Double
    Number of log topic partitions. Default: 1, maximum: 10.
    period Double
    Retention period, unit: days. Log topic (standard storage): 1 to 3600 days, value 3640 means permanent retention. Log topic (infrequent storage): 7 to 3600 days, value 3640 means permanent retention. Metric topic: 1 to 3600 days, value 3640 means permanent retention.
    storageType String
    Log topic storage type. Valid values: hot: standard storage; cold: infrequent storage. Default value: hot. Not supported for metric topics.
    tags Map<String,String>
    Tag description list. Up to 10 tag key-value pairs are supported, and the same resource can only be bound to the same tag key.
    topicName String
    Log topic name. Constraints: cannot be an empty string, cannot contain the | character, and cannot use the following reserved names: cls_service_log, loglistener_status, loglistener_alarm, loglistener_business, cls_service_metric.
    autoSplit boolean
    Whether to enable automatic split. Default value: true.
    bizType number
    Topic type. 0: log topic (default), 1: metric topic.
    clsTopicId string
    ID of the resource.
    customKmsInfo ClsTopicCustomKmsInfo
    User-defined KMS key information. If empty, the default key (alias KMS-CLS) is used.
    describes string
    Log topic description.
    encryption number
    Encryption-related parameters. Supported for encryption-enabled regions and allowlisted users; cannot be passed in other scenarios. 0 or not passed: no encryption; 1: kms-cls cloud product key encryption. Once enabled, it cannot be disabled. Supported regions: ap-beijing, ap-guangzhou, ap-shanghai, ap-singapore, ap-bangkok, ap-jakarta, eu-frankfurt, ap-seoul, ap-tokyo.
    extends ClsTopicExtends
    Topic extension information.
    hotPeriod number
    0: turn off log settling. Non-0: the number of days of standard storage after enabling log settling. HotPeriod must be greater than or equal to 7 and less than Period. Only effective when storage_type is hot. Not supported for metric topics.
    isWebTracking boolean
    Free authentication switch. false: closed (default); true: enabled. When enabled, anonymous access to the log topic will be supported for specified operations. Not supported for metric topics.
    logsetId string
    Logset ID. Get the logset ID via DescribeLogsets API.
    maxSplitPartitions number
    Maximum number of partitions allowed for the topic if automatic split is enabled. Default value: 50.
    partitionCount number
    Number of log topic partitions. Default: 1, maximum: 10.
    period number
    Retention period, unit: days. Log topic (standard storage): 1 to 3600 days, value 3640 means permanent retention. Log topic (infrequent storage): 7 to 3600 days, value 3640 means permanent retention. Metric topic: 1 to 3600 days, value 3640 means permanent retention.
    storageType string
    Log topic storage type. Valid values: hot: standard storage; cold: infrequent storage. Default value: hot. Not supported for metric topics.
    tags {[key: string]: string}
    Tag description list. Up to 10 tag key-value pairs are supported, and the same resource can only be bound to the same tag key.
    topicName string
    Log topic name. Constraints: cannot be an empty string, cannot contain the | character, and cannot use the following reserved names: cls_service_log, loglistener_status, loglistener_alarm, loglistener_business, cls_service_metric.
    auto_split bool
    Whether to enable automatic split. Default value: true.
    biz_type float
    Topic type. 0: log topic (default), 1: metric topic.
    cls_topic_id str
    ID of the resource.
    custom_kms_info ClsTopicCustomKmsInfoArgs
    User-defined KMS key information. If empty, the default key (alias KMS-CLS) is used.
    describes str
    Log topic description.
    encryption float
    Encryption-related parameters. Supported for encryption-enabled regions and allowlisted users; cannot be passed in other scenarios. 0 or not passed: no encryption; 1: kms-cls cloud product key encryption. Once enabled, it cannot be disabled. Supported regions: ap-beijing, ap-guangzhou, ap-shanghai, ap-singapore, ap-bangkok, ap-jakarta, eu-frankfurt, ap-seoul, ap-tokyo.
    extends ClsTopicExtendsArgs
    Topic extension information.
    hot_period float
    0: turn off log settling. Non-0: the number of days of standard storage after enabling log settling. HotPeriod must be greater than or equal to 7 and less than Period. Only effective when storage_type is hot. Not supported for metric topics.
    is_web_tracking bool
    Free authentication switch. false: closed (default); true: enabled. When enabled, anonymous access to the log topic will be supported for specified operations. Not supported for metric topics.
    logset_id str
    Logset ID. Get the logset ID via DescribeLogsets API.
    max_split_partitions float
    Maximum number of partitions allowed for the topic if automatic split is enabled. Default value: 50.
    partition_count float
    Number of log topic partitions. Default: 1, maximum: 10.
    period float
    Retention period, unit: days. Log topic (standard storage): 1 to 3600 days, value 3640 means permanent retention. Log topic (infrequent storage): 7 to 3600 days, value 3640 means permanent retention. Metric topic: 1 to 3600 days, value 3640 means permanent retention.
    storage_type str
    Log topic storage type. Valid values: hot: standard storage; cold: infrequent storage. Default value: hot. Not supported for metric topics.
    tags Mapping[str, str]
    Tag description list. Up to 10 tag key-value pairs are supported, and the same resource can only be bound to the same tag key.
    topic_name str
    Log topic name. Constraints: cannot be an empty string, cannot contain the | character, and cannot use the following reserved names: cls_service_log, loglistener_status, loglistener_alarm, loglistener_business, cls_service_metric.
    autoSplit Boolean
    Whether to enable automatic split. Default value: true.
    bizType Number
    Topic type. 0: log topic (default), 1: metric topic.
    clsTopicId String
    ID of the resource.
    customKmsInfo Property Map
    User-defined KMS key information. If empty, the default key (alias KMS-CLS) is used.
    describes String
    Log topic description.
    encryption Number
    Encryption-related parameters. Supported for encryption-enabled regions and allowlisted users; cannot be passed in other scenarios. 0 or not passed: no encryption; 1: kms-cls cloud product key encryption. Once enabled, it cannot be disabled. Supported regions: ap-beijing, ap-guangzhou, ap-shanghai, ap-singapore, ap-bangkok, ap-jakarta, eu-frankfurt, ap-seoul, ap-tokyo.
    extends Property Map
    Topic extension information.
    hotPeriod Number
    0: turn off log settling. Non-0: the number of days of standard storage after enabling log settling. HotPeriod must be greater than or equal to 7 and less than Period. Only effective when storage_type is hot. Not supported for metric topics.
    isWebTracking Boolean
    Free authentication switch. false: closed (default); true: enabled. When enabled, anonymous access to the log topic will be supported for specified operations. Not supported for metric topics.
    logsetId String
    Logset ID. Get the logset ID via DescribeLogsets API.
    maxSplitPartitions Number
    Maximum number of partitions allowed for the topic if automatic split is enabled. Default value: 50.
    partitionCount Number
    Number of log topic partitions. Default: 1, maximum: 10.
    period Number
    Retention period, unit: days. Log topic (standard storage): 1 to 3600 days, value 3640 means permanent retention. Log topic (infrequent storage): 7 to 3600 days, value 3640 means permanent retention. Metric topic: 1 to 3600 days, value 3640 means permanent retention.
    storageType String
    Log topic storage type. Valid values: hot: standard storage; cold: infrequent storage. Default value: hot. Not supported for metric topics.
    tags Map<String>
    Tag description list. Up to 10 tag key-value pairs are supported, and the same resource can only be bound to the same tag key.
    topicName String
    Log topic name. Constraints: cannot be an empty string, cannot contain the | character, and cannot use the following reserved names: cls_service_log, loglistener_status, loglistener_alarm, loglistener_business, cls_service_metric.

    Supporting Types

    ClsTopicCustomKmsInfo, ClsTopicCustomKmsInfoArgs

    KmsKeyId string
    KMS key ID.
    KmsRegion string
    KMS region. Refer to Tencent Cloud KMS documentation for supported regions. Format: ap-guangzhou.
    KmsKeyId string
    KMS key ID.
    KmsRegion string
    KMS region. Refer to Tencent Cloud KMS documentation for supported regions. Format: ap-guangzhou.
    kms_key_id string
    KMS key ID.
    kms_region string
    KMS region. Refer to Tencent Cloud KMS documentation for supported regions. Format: ap-guangzhou.
    kmsKeyId String
    KMS key ID.
    kmsRegion String
    KMS region. Refer to Tencent Cloud KMS documentation for supported regions. Format: ap-guangzhou.
    kmsKeyId string
    KMS key ID.
    kmsRegion string
    KMS region. Refer to Tencent Cloud KMS documentation for supported regions. Format: ap-guangzhou.
    kms_key_id str
    KMS key ID.
    kms_region str
    KMS region. Refer to Tencent Cloud KMS documentation for supported regions. Format: ap-guangzhou.
    kmsKeyId String
    KMS key ID.
    kmsRegion String
    KMS region. Refer to Tencent Cloud KMS documentation for supported regions. Format: ap-guangzhou.

    ClsTopicExtends, ClsTopicExtendsArgs

    AnonymousAccess ClsTopicExtendsAnonymousAccess
    Log topic authentication free configuration information.
    AnonymousAccess ClsTopicExtendsAnonymousAccess
    Log topic authentication free configuration information.
    anonymous_access object
    Log topic authentication free configuration information.
    anonymousAccess ClsTopicExtendsAnonymousAccess
    Log topic authentication free configuration information.
    anonymousAccess ClsTopicExtendsAnonymousAccess
    Log topic authentication free configuration information.
    anonymous_access ClsTopicExtendsAnonymousAccess
    Log topic authentication free configuration information.
    anonymousAccess Property Map
    Log topic authentication free configuration information.

    ClsTopicExtendsAnonymousAccess, ClsTopicExtendsAnonymousAccessArgs

    Conditions List<ClsTopicExtendsAnonymousAccessCondition>
    Operation list, supporting trackLog (JS/HTTP upload log) and realtimeProducer (kafka protocol upload log).
    Operations List<string>
    Operation list, supporting trackLog (JS/HTTP upload log) and realtimeProducer (kafka protocol upload log).
    Conditions []ClsTopicExtendsAnonymousAccessCondition
    Operation list, supporting trackLog (JS/HTTP upload log) and realtimeProducer (kafka protocol upload log).
    Operations []string
    Operation list, supporting trackLog (JS/HTTP upload log) and realtimeProducer (kafka protocol upload log).
    conditions list(object)
    Operation list, supporting trackLog (JS/HTTP upload log) and realtimeProducer (kafka protocol upload log).
    operations list(string)
    Operation list, supporting trackLog (JS/HTTP upload log) and realtimeProducer (kafka protocol upload log).
    conditions List<ClsTopicExtendsAnonymousAccessCondition>
    Operation list, supporting trackLog (JS/HTTP upload log) and realtimeProducer (kafka protocol upload log).
    operations List<String>
    Operation list, supporting trackLog (JS/HTTP upload log) and realtimeProducer (kafka protocol upload log).
    conditions ClsTopicExtendsAnonymousAccessCondition[]
    Operation list, supporting trackLog (JS/HTTP upload log) and realtimeProducer (kafka protocol upload log).
    operations string[]
    Operation list, supporting trackLog (JS/HTTP upload log) and realtimeProducer (kafka protocol upload log).
    conditions Sequence[ClsTopicExtendsAnonymousAccessCondition]
    Operation list, supporting trackLog (JS/HTTP upload log) and realtimeProducer (kafka protocol upload log).
    operations Sequence[str]
    Operation list, supporting trackLog (JS/HTTP upload log) and realtimeProducer (kafka protocol upload log).
    conditions List<Property Map>
    Operation list, supporting trackLog (JS/HTTP upload log) and realtimeProducer (kafka protocol upload log).
    operations List<String>
    Operation list, supporting trackLog (JS/HTTP upload log) and realtimeProducer (kafka protocol upload log).

    ClsTopicExtendsAnonymousAccessCondition, ClsTopicExtendsAnonymousAccessConditionArgs

    Attributes string
    Condition attribute, currently only VpcID is supported.
    ConditionValue string
    The value of the corresponding conditional attribute.
    Rule double
    Conditional rule, 1: equal, 2: not equal.
    Attributes string
    Condition attribute, currently only VpcID is supported.
    ConditionValue string
    The value of the corresponding conditional attribute.
    Rule float64
    Conditional rule, 1: equal, 2: not equal.
    attributes string
    Condition attribute, currently only VpcID is supported.
    condition_value string
    The value of the corresponding conditional attribute.
    rule number
    Conditional rule, 1: equal, 2: not equal.
    attributes String
    Condition attribute, currently only VpcID is supported.
    conditionValue String
    The value of the corresponding conditional attribute.
    rule Double
    Conditional rule, 1: equal, 2: not equal.
    attributes string
    Condition attribute, currently only VpcID is supported.
    conditionValue string
    The value of the corresponding conditional attribute.
    rule number
    Conditional rule, 1: equal, 2: not equal.
    attributes str
    Condition attribute, currently only VpcID is supported.
    condition_value str
    The value of the corresponding conditional attribute.
    rule float
    Conditional rule, 1: equal, 2: not equal.
    attributes String
    Condition attribute, currently only VpcID is supported.
    conditionValue String
    The value of the corresponding conditional attribute.
    rule Number
    Conditional rule, 1: equal, 2: not equal.

    Import

    cls topic can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/clsTopic:ClsTopic example 2f5764c1-c833-44c5-84c7-950979b2a278
    

    cls metric topic (biz_type=1) can be imported using the id with “#1” suffix, e.g.

    $ pulumi import tencentcloud:index/clsTopic:ClsTopic example 2f5764c1-c833-44c5-84c7-950979b2a278#1
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    Viewing docs for tencentcloud 1.83.23
    published on Friday, Aug 14, 2026 by tencentcloudstack

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial