1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. ClsTopic
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.ClsTopic

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a cls topic.

    Example Usage

    Create a standard cls topic

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const exampleClsLogset = new tencentcloud.ClsLogset("exampleClsLogset", {
        logsetName: "tf_example",
        tags: {
            tagKey: "tagValue",
        },
    });
    const exampleClsTopic = new tencentcloud.ClsTopic("exampleClsTopic", {
        topicName: "tf_example",
        logsetId: exampleClsLogset.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_cls_logset = tencentcloud.ClsLogset("exampleClsLogset",
        logset_name="tf_example",
        tags={
            "tagKey": "tagValue",
        })
    example_cls_topic = tencentcloud.ClsTopic("exampleClsTopic",
        topic_name="tf_example",
        logset_id=example_cls_logset.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 {
    		exampleClsLogset, err := tencentcloud.NewClsLogset(ctx, "exampleClsLogset", &tencentcloud.ClsLogsetArgs{
    			LogsetName: pulumi.String("tf_example"),
    			Tags: pulumi.StringMap{
    				"tagKey": pulumi.String("tagValue"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewClsTopic(ctx, "exampleClsTopic", &tencentcloud.ClsTopicArgs{
    			TopicName:          pulumi.String("tf_example"),
    			LogsetId:           exampleClsLogset.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 exampleClsLogset = new Tencentcloud.ClsLogset("exampleClsLogset", new()
        {
            LogsetName = "tf_example",
            Tags = 
            {
                { "tagKey", "tagValue" },
            },
        });
    
        var exampleClsTopic = new Tencentcloud.ClsTopic("exampleClsTopic", new()
        {
            TopicName = "tf_example",
            LogsetId = exampleClsLogset.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 exampleClsLogset = new ClsLogset("exampleClsLogset", ClsLogsetArgs.builder()
                .logsetName("tf_example")
                .tags(Map.of("tagKey", "tagValue"))
                .build());
    
            var exampleClsTopic = new ClsTopic("exampleClsTopic", ClsTopicArgs.builder()
                .topicName("tf_example")
                .logsetId(exampleClsLogset.clsLogsetId())
                .autoSplit(false)
                .maxSplitPartitions(20)
                .partitionCount(1)
                .period(30)
                .storageType("hot")
                .describes("Test Demo.")
                .hotPeriod(10)
                .tags(Map.of("tagKey", "tagValue"))
                .build());
    
        }
    }
    
    resources:
      exampleClsLogset:
        type: tencentcloud:ClsLogset
        properties:
          logsetName: tf_example
          tags:
            tagKey: tagValue
      exampleClsTopic:
        type: tencentcloud:ClsTopic
        properties:
          topicName: tf_example
          logsetId: ${exampleClsLogset.clsLogsetId}
          autoSplit: false
          maxSplitPartitions: 20
          partitionCount: 1
          period: 30
          storageType: hot
          describes: Test Demo.
          hotPeriod: 10
          tags:
            tagKey: tagValue
    

    Create a cls topic with web tracking

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const exampleClsLogset = new tencentcloud.ClsLogset("exampleClsLogset", {
        logsetName: "tf_example",
        tags: {
            tagKey: "tagValue",
        },
    });
    const exampleClsTopic = new tencentcloud.ClsTopic("exampleClsTopic", {
        topicName: "tf_example",
        logsetId: exampleClsLogset.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_cls_logset = tencentcloud.ClsLogset("exampleClsLogset",
        logset_name="tf_example",
        tags={
            "tagKey": "tagValue",
        })
    example_cls_topic = tencentcloud.ClsTopic("exampleClsTopic",
        topic_name="tf_example",
        logset_id=example_cls_logset.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 {
    		exampleClsLogset, err := tencentcloud.NewClsLogset(ctx, "exampleClsLogset", &tencentcloud.ClsLogsetArgs{
    			LogsetName: pulumi.String("tf_example"),
    			Tags: pulumi.StringMap{
    				"tagKey": pulumi.String("tagValue"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewClsTopic(ctx, "exampleClsTopic", &tencentcloud.ClsTopicArgs{
    			TopicName:          pulumi.String("tf_example"),
    			LogsetId:           exampleClsLogset.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 exampleClsLogset = new Tencentcloud.ClsLogset("exampleClsLogset", new()
        {
            LogsetName = "tf_example",
            Tags = 
            {
                { "tagKey", "tagValue" },
            },
        });
    
        var exampleClsTopic = new Tencentcloud.ClsTopic("exampleClsTopic", new()
        {
            TopicName = "tf_example",
            LogsetId = exampleClsLogset.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 exampleClsLogset = new ClsLogset("exampleClsLogset", ClsLogsetArgs.builder()
                .logsetName("tf_example")
                .tags(Map.of("tagKey", "tagValue"))
                .build());
    
            var exampleClsTopic = new ClsTopic("exampleClsTopic", ClsTopicArgs.builder()
                .topicName("tf_example")
                .logsetId(exampleClsLogset.clsLogsetId())
                .autoSplit(false)
                .maxSplitPartitions(20)
                .partitionCount(1)
                .period(30)
                .storageType("hot")
                .describes("Test Demo.")
                .hotPeriod(10)
                .isWebTracking(true)
                .extends_(ClsTopicExtendsArgs.builder()
                    .anonymousAccess(ClsTopicExtendsAnonymousAccessArgs.builder()
                        .operations(                    
                            "trackLog",
                            "realtimeProducer")
                        .conditions(ClsTopicExtendsAnonymousAccessConditionArgs.builder()
                            .attributes("VpcID")
                            .rule(1)
                            .conditionValue("vpc-ahr3xajx")
                            .build())
                        .build())
                    .build())
                .tags(Map.of("tagKey", "tagValue"))
                .build());
    
        }
    }
    
    resources:
      exampleClsLogset:
        type: tencentcloud:ClsLogset
        properties:
          logsetName: tf_example
          tags:
            tagKey: tagValue
      exampleClsTopic:
        type: tencentcloud:ClsTopic
        properties:
          topicName: tf_example
          logsetId: ${exampleClsLogset.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
    

    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,
                 extends: Optional[ClsTopicExtendsArgs] = None,
                 auto_split: Optional[bool] = None,
                 hot_period: Optional[float] = None,
                 is_web_tracking: Optional[bool] = None,
                 describes: 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,
                 cls_topic_id: Optional[str] = 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.
    
    

    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.
    TopicName string
    Log topic name.
    AutoSplit bool
    Whether to enable automatic split. Default value: true.
    ClsTopicId string
    ID of the resource.
    Describes string
    Log Topic Description.
    Extends ClsTopicExtends
    Log Subject Extension Information.
    HotPeriod double
    0: Turn off log sinking. Non 0: The number of days of standard storage after enabling log settling. HotPeriod needs to be greater than or equal to 7 and less than Period. Only effective when StorageType is hot.
    IsWebTracking bool
    No authentication switch. False: closed; True: Enable. The default is false. After activation, anonymous access to the log topic will be supported for specified operations.
    MaxSplitPartitions double
    Maximum number of partitions to split into for this topic if automatic split is enabled. Default value: 50.
    PartitionCount double
    Number of log topic partitions. Default value: 1. Maximum value: 10.
    Period double
    Lifecycle in days. Value range: 1~366. Default value: 30.
    StorageType string
    Log topic storage class. Valid values: hot: real-time storage; cold: offline storage. Default value: hot. If cold is passed in, please contact the customer service to add the log topic to the allowlist first.
    Tags Dictionary<string, string>
    Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
    LogsetId string
    Logset ID.
    TopicName string
    Log topic name.
    AutoSplit bool
    Whether to enable automatic split. Default value: true.
    ClsTopicId string
    ID of the resource.
    Describes string
    Log Topic Description.
    Extends ClsTopicExtendsArgs
    Log Subject Extension Information.
    HotPeriod float64
    0: Turn off log sinking. Non 0: The number of days of standard storage after enabling log settling. HotPeriod needs to be greater than or equal to 7 and less than Period. Only effective when StorageType is hot.
    IsWebTracking bool
    No authentication switch. False: closed; True: Enable. The default is false. After activation, anonymous access to the log topic will be supported for specified operations.
    MaxSplitPartitions float64
    Maximum number of partitions to split into for this topic if automatic split is enabled. Default value: 50.
    PartitionCount float64
    Number of log topic partitions. Default value: 1. Maximum value: 10.
    Period float64
    Lifecycle in days. Value range: 1~366. Default value: 30.
    StorageType string
    Log topic storage class. Valid values: hot: real-time storage; cold: offline storage. Default value: hot. If cold is passed in, please contact the customer service to add the log topic to the allowlist first.
    Tags map[string]string
    Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
    logsetId String
    Logset ID.
    topicName String
    Log topic name.
    autoSplit Boolean
    Whether to enable automatic split. Default value: true.
    clsTopicId String
    ID of the resource.
    describes String
    Log Topic Description.
    extends_ ClsTopicExtends
    Log Subject Extension Information.
    hotPeriod Double
    0: Turn off log sinking. Non 0: The number of days of standard storage after enabling log settling. HotPeriod needs to be greater than or equal to 7 and less than Period. Only effective when StorageType is hot.
    isWebTracking Boolean
    No authentication switch. False: closed; True: Enable. The default is false. After activation, anonymous access to the log topic will be supported for specified operations.
    maxSplitPartitions Double
    Maximum number of partitions to split into for this topic if automatic split is enabled. Default value: 50.
    partitionCount Double
    Number of log topic partitions. Default value: 1. Maximum value: 10.
    period Double
    Lifecycle in days. Value range: 1~366. Default value: 30.
    storageType String
    Log topic storage class. Valid values: hot: real-time storage; cold: offline storage. Default value: hot. If cold is passed in, please contact the customer service to add the log topic to the allowlist first.
    tags Map<String,String>
    Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
    logsetId string
    Logset ID.
    topicName string
    Log topic name.
    autoSplit boolean
    Whether to enable automatic split. Default value: true.
    clsTopicId string
    ID of the resource.
    describes string
    Log Topic Description.
    extends ClsTopicExtends
    Log Subject Extension Information.
    hotPeriod number
    0: Turn off log sinking. Non 0: The number of days of standard storage after enabling log settling. HotPeriod needs to be greater than or equal to 7 and less than Period. Only effective when StorageType is hot.
    isWebTracking boolean
    No authentication switch. False: closed; True: Enable. The default is false. After activation, anonymous access to the log topic will be supported for specified operations.
    maxSplitPartitions number
    Maximum number of partitions to split into for this topic if automatic split is enabled. Default value: 50.
    partitionCount number
    Number of log topic partitions. Default value: 1. Maximum value: 10.
    period number
    Lifecycle in days. Value range: 1~366. Default value: 30.
    storageType string
    Log topic storage class. Valid values: hot: real-time storage; cold: offline storage. Default value: hot. If cold is passed in, please contact the customer service to add the log topic to the allowlist first.
    tags {[key: string]: string}
    Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
    logset_id str
    Logset ID.
    topic_name str
    Log topic name.
    auto_split bool
    Whether to enable automatic split. Default value: true.
    cls_topic_id str
    ID of the resource.
    describes str
    Log Topic Description.
    extends ClsTopicExtendsArgs
    Log Subject Extension Information.
    hot_period float
    0: Turn off log sinking. Non 0: The number of days of standard storage after enabling log settling. HotPeriod needs to be greater than or equal to 7 and less than Period. Only effective when StorageType is hot.
    is_web_tracking bool
    No authentication switch. False: closed; True: Enable. The default is false. After activation, anonymous access to the log topic will be supported for specified operations.
    max_split_partitions float
    Maximum number of partitions to split into for this topic if automatic split is enabled. Default value: 50.
    partition_count float
    Number of log topic partitions. Default value: 1. Maximum value: 10.
    period float
    Lifecycle in days. Value range: 1~366. Default value: 30.
    storage_type str
    Log topic storage class. Valid values: hot: real-time storage; cold: offline storage. Default value: hot. If cold is passed in, please contact the customer service to add the log topic to the allowlist first.
    tags Mapping[str, str]
    Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
    logsetId String
    Logset ID.
    topicName String
    Log topic name.
    autoSplit Boolean
    Whether to enable automatic split. Default value: true.
    clsTopicId String
    ID of the resource.
    describes String
    Log Topic Description.
    extends Property Map
    Log Subject Extension Information.
    hotPeriod Number
    0: Turn off log sinking. Non 0: The number of days of standard storage after enabling log settling. HotPeriod needs to be greater than or equal to 7 and less than Period. Only effective when StorageType is hot.
    isWebTracking Boolean
    No authentication switch. False: closed; True: Enable. The default is false. After activation, anonymous access to the log topic will be supported for specified operations.
    maxSplitPartitions Number
    Maximum number of partitions to split into for this topic if automatic split is enabled. Default value: 50.
    partitionCount Number
    Number of log topic partitions. Default value: 1. Maximum value: 10.
    period Number
    Lifecycle in days. Value range: 1~366. Default value: 30.
    storageType String
    Log topic storage class. Valid values: hot: real-time storage; cold: offline storage. Default value: hot. If cold is passed in, please contact the customer service to add the log topic to the allowlist first.
    tags Map<String>
    Tag description list. Up to 10 tag key-value pairs are supported and must be unique.

    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 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,
            cls_topic_id: Optional[str] = None,
            describes: Optional[str] = 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}
    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.
    ClsTopicId string
    ID of the resource.
    Describes string
    Log Topic Description.
    Extends ClsTopicExtends
    Log Subject Extension Information.
    HotPeriod double
    0: Turn off log sinking. Non 0: The number of days of standard storage after enabling log settling. HotPeriod needs to be greater than or equal to 7 and less than Period. Only effective when StorageType is hot.
    IsWebTracking bool
    No authentication switch. False: closed; True: Enable. The default is false. After activation, anonymous access to the log topic will be supported for specified operations.
    LogsetId string
    Logset ID.
    MaxSplitPartitions double
    Maximum number of partitions to split into for this topic if automatic split is enabled. Default value: 50.
    PartitionCount double
    Number of log topic partitions. Default value: 1. Maximum value: 10.
    Period double
    Lifecycle in days. Value range: 1~366. Default value: 30.
    StorageType string
    Log topic storage class. Valid values: hot: real-time storage; cold: offline storage. Default value: hot. If cold is passed in, please contact the customer service to add the log topic to the allowlist first.
    Tags Dictionary<string, string>
    Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
    TopicName string
    Log topic name.
    AutoSplit bool
    Whether to enable automatic split. Default value: true.
    ClsTopicId string
    ID of the resource.
    Describes string
    Log Topic Description.
    Extends ClsTopicExtendsArgs
    Log Subject Extension Information.
    HotPeriod float64
    0: Turn off log sinking. Non 0: The number of days of standard storage after enabling log settling. HotPeriod needs to be greater than or equal to 7 and less than Period. Only effective when StorageType is hot.
    IsWebTracking bool
    No authentication switch. False: closed; True: Enable. The default is false. After activation, anonymous access to the log topic will be supported for specified operations.
    LogsetId string
    Logset ID.
    MaxSplitPartitions float64
    Maximum number of partitions to split into for this topic if automatic split is enabled. Default value: 50.
    PartitionCount float64
    Number of log topic partitions. Default value: 1. Maximum value: 10.
    Period float64
    Lifecycle in days. Value range: 1~366. Default value: 30.
    StorageType string
    Log topic storage class. Valid values: hot: real-time storage; cold: offline storage. Default value: hot. If cold is passed in, please contact the customer service to add the log topic to the allowlist first.
    Tags map[string]string
    Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
    TopicName string
    Log topic name.
    autoSplit Boolean
    Whether to enable automatic split. Default value: true.
    clsTopicId String
    ID of the resource.
    describes String
    Log Topic Description.
    extends_ ClsTopicExtends
    Log Subject Extension Information.
    hotPeriod Double
    0: Turn off log sinking. Non 0: The number of days of standard storage after enabling log settling. HotPeriod needs to be greater than or equal to 7 and less than Period. Only effective when StorageType is hot.
    isWebTracking Boolean
    No authentication switch. False: closed; True: Enable. The default is false. After activation, anonymous access to the log topic will be supported for specified operations.
    logsetId String
    Logset ID.
    maxSplitPartitions Double
    Maximum number of partitions to split into for this topic if automatic split is enabled. Default value: 50.
    partitionCount Double
    Number of log topic partitions. Default value: 1. Maximum value: 10.
    period Double
    Lifecycle in days. Value range: 1~366. Default value: 30.
    storageType String
    Log topic storage class. Valid values: hot: real-time storage; cold: offline storage. Default value: hot. If cold is passed in, please contact the customer service to add the log topic to the allowlist first.
    tags Map<String,String>
    Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
    topicName String
    Log topic name.
    autoSplit boolean
    Whether to enable automatic split. Default value: true.
    clsTopicId string
    ID of the resource.
    describes string
    Log Topic Description.
    extends ClsTopicExtends
    Log Subject Extension Information.
    hotPeriod number
    0: Turn off log sinking. Non 0: The number of days of standard storage after enabling log settling. HotPeriod needs to be greater than or equal to 7 and less than Period. Only effective when StorageType is hot.
    isWebTracking boolean
    No authentication switch. False: closed; True: Enable. The default is false. After activation, anonymous access to the log topic will be supported for specified operations.
    logsetId string
    Logset ID.
    maxSplitPartitions number
    Maximum number of partitions to split into for this topic if automatic split is enabled. Default value: 50.
    partitionCount number
    Number of log topic partitions. Default value: 1. Maximum value: 10.
    period number
    Lifecycle in days. Value range: 1~366. Default value: 30.
    storageType string
    Log topic storage class. Valid values: hot: real-time storage; cold: offline storage. Default value: hot. If cold is passed in, please contact the customer service to add the log topic to the allowlist first.
    tags {[key: string]: string}
    Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
    topicName string
    Log topic name.
    auto_split bool
    Whether to enable automatic split. Default value: true.
    cls_topic_id str
    ID of the resource.
    describes str
    Log Topic Description.
    extends ClsTopicExtendsArgs
    Log Subject Extension Information.
    hot_period float
    0: Turn off log sinking. Non 0: The number of days of standard storage after enabling log settling. HotPeriod needs to be greater than or equal to 7 and less than Period. Only effective when StorageType is hot.
    is_web_tracking bool
    No authentication switch. False: closed; True: Enable. The default is false. After activation, anonymous access to the log topic will be supported for specified operations.
    logset_id str
    Logset ID.
    max_split_partitions float
    Maximum number of partitions to split into for this topic if automatic split is enabled. Default value: 50.
    partition_count float
    Number of log topic partitions. Default value: 1. Maximum value: 10.
    period float
    Lifecycle in days. Value range: 1~366. Default value: 30.
    storage_type str
    Log topic storage class. Valid values: hot: real-time storage; cold: offline storage. Default value: hot. If cold is passed in, please contact the customer service to add the log topic to the allowlist first.
    tags Mapping[str, str]
    Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
    topic_name str
    Log topic name.
    autoSplit Boolean
    Whether to enable automatic split. Default value: true.
    clsTopicId String
    ID of the resource.
    describes String
    Log Topic Description.
    extends Property Map
    Log Subject Extension Information.
    hotPeriod Number
    0: Turn off log sinking. Non 0: The number of days of standard storage after enabling log settling. HotPeriod needs to be greater than or equal to 7 and less than Period. Only effective when StorageType is hot.
    isWebTracking Boolean
    No authentication switch. False: closed; True: Enable. The default is false. After activation, anonymous access to the log topic will be supported for specified operations.
    logsetId String
    Logset ID.
    maxSplitPartitions Number
    Maximum number of partitions to split into for this topic if automatic split is enabled. Default value: 50.
    partitionCount Number
    Number of log topic partitions. Default value: 1. Maximum value: 10.
    period Number
    Lifecycle in days. Value range: 1~366. Default value: 30.
    storageType String
    Log topic storage class. Valid values: hot: real-time storage; cold: offline storage. Default value: hot. If cold is passed in, please contact the customer service to add the log topic to the allowlist first.
    tags Map<String>
    Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
    topicName String
    Log topic name.

    Supporting Types

    ClsTopicExtends, ClsTopicExtendsArgs

    AnonymousAccess ClsTopicExtendsAnonymousAccess
    Log topic authentication free configuration information.
    AnonymousAccess ClsTopicExtendsAnonymousAccess
    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<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.
    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
    

    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.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack