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

tencentcloud.getClsTopics

Explore with Pulumi AI

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

    Use this data source to query detailed information of CLS topics

    Example Usage

    Query all topics

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = tencentcloud.getClsTopics({});
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.get_cls_topics()
    
    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 {
    		_, err := tencentcloud.GetClsTopics(ctx, &tencentcloud.GetClsTopicsArgs{}, nil)
    		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 = Tencentcloud.GetClsTopics.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetClsTopicsArgs;
    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) {
            final var example = TencentcloudFunctions.getClsTopics();
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: tencentcloud:getClsTopics
          arguments: {}
    

    Query topics by filters

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = tencentcloud.getClsTopics({
        filters: [
            {
                key: "topicId",
                values: ["88babc9b-ab8f-4dd1-9b04-3e2925cf9c4c"],
            },
            {
                key: "topicName",
                values: ["tf-example"],
            },
            {
                key: "logsetId",
                values: ["3e8e0521-32db-4532-beeb-9beefa56d3ea"],
            },
            {
                key: "storageType",
                values: ["hot"],
            },
        ],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.get_cls_topics(filters=[
        {
            "key": "topicId",
            "values": ["88babc9b-ab8f-4dd1-9b04-3e2925cf9c4c"],
        },
        {
            "key": "topicName",
            "values": ["tf-example"],
        },
        {
            "key": "logsetId",
            "values": ["3e8e0521-32db-4532-beeb-9beefa56d3ea"],
        },
        {
            "key": "storageType",
            "values": ["hot"],
        },
    ])
    
    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 {
    		_, err := tencentcloud.GetClsTopics(ctx, &tencentcloud.GetClsTopicsArgs{
    			Filters: []tencentcloud.GetClsTopicsFilter{
    				{
    					Key: "topicId",
    					Values: []string{
    						"88babc9b-ab8f-4dd1-9b04-3e2925cf9c4c",
    					},
    				},
    				{
    					Key: "topicName",
    					Values: []string{
    						"tf-example",
    					},
    				},
    				{
    					Key: "logsetId",
    					Values: []string{
    						"3e8e0521-32db-4532-beeb-9beefa56d3ea",
    					},
    				},
    				{
    					Key: "storageType",
    					Values: []string{
    						"hot",
    					},
    				},
    			},
    		}, nil)
    		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 = Tencentcloud.GetClsTopics.Invoke(new()
        {
            Filters = new[]
            {
                new Tencentcloud.Inputs.GetClsTopicsFilterInputArgs
                {
                    Key = "topicId",
                    Values = new[]
                    {
                        "88babc9b-ab8f-4dd1-9b04-3e2925cf9c4c",
                    },
                },
                new Tencentcloud.Inputs.GetClsTopicsFilterInputArgs
                {
                    Key = "topicName",
                    Values = new[]
                    {
                        "tf-example",
                    },
                },
                new Tencentcloud.Inputs.GetClsTopicsFilterInputArgs
                {
                    Key = "logsetId",
                    Values = new[]
                    {
                        "3e8e0521-32db-4532-beeb-9beefa56d3ea",
                    },
                },
                new Tencentcloud.Inputs.GetClsTopicsFilterInputArgs
                {
                    Key = "storageType",
                    Values = new[]
                    {
                        "hot",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetClsTopicsArgs;
    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) {
            final var example = TencentcloudFunctions.getClsTopics(GetClsTopicsArgs.builder()
                .filters(            
                    GetClsTopicsFilterArgs.builder()
                        .key("topicId")
                        .values("88babc9b-ab8f-4dd1-9b04-3e2925cf9c4c")
                        .build(),
                    GetClsTopicsFilterArgs.builder()
                        .key("topicName")
                        .values("tf-example")
                        .build(),
                    GetClsTopicsFilterArgs.builder()
                        .key("logsetId")
                        .values("3e8e0521-32db-4532-beeb-9beefa56d3ea")
                        .build(),
                    GetClsTopicsFilterArgs.builder()
                        .key("storageType")
                        .values("hot")
                        .build())
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: tencentcloud:getClsTopics
          arguments:
            filters:
              - key: topicId
                values:
                  - 88babc9b-ab8f-4dd1-9b04-3e2925cf9c4c
              - key: topicName
                values:
                  - tf-example
              - key: logsetId
                values:
                  - 3e8e0521-32db-4532-beeb-9beefa56d3ea
              - key: storageType
                values:
                  - hot
    

    Using getClsTopics

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getClsTopics(args: GetClsTopicsArgs, opts?: InvokeOptions): Promise<GetClsTopicsResult>
    function getClsTopicsOutput(args: GetClsTopicsOutputArgs, opts?: InvokeOptions): Output<GetClsTopicsResult>
    def get_cls_topics(biz_type: Optional[float] = None,
                       filters: Optional[Sequence[GetClsTopicsFilter]] = None,
                       id: Optional[str] = None,
                       precise_search: Optional[float] = None,
                       result_output_file: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetClsTopicsResult
    def get_cls_topics_output(biz_type: Optional[pulumi.Input[float]] = None,
                       filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetClsTopicsFilterArgs]]]] = None,
                       id: Optional[pulumi.Input[str]] = None,
                       precise_search: Optional[pulumi.Input[float]] = None,
                       result_output_file: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetClsTopicsResult]
    func GetClsTopics(ctx *Context, args *GetClsTopicsArgs, opts ...InvokeOption) (*GetClsTopicsResult, error)
    func GetClsTopicsOutput(ctx *Context, args *GetClsTopicsOutputArgs, opts ...InvokeOption) GetClsTopicsResultOutput

    > Note: This function is named GetClsTopics in the Go SDK.

    public static class GetClsTopics 
    {
        public static Task<GetClsTopicsResult> InvokeAsync(GetClsTopicsArgs args, InvokeOptions? opts = null)
        public static Output<GetClsTopicsResult> Invoke(GetClsTopicsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetClsTopicsResult> getClsTopics(GetClsTopicsArgs args, InvokeOptions options)
    public static Output<GetClsTopicsResult> getClsTopics(GetClsTopicsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getClsTopics:getClsTopics
      arguments:
        # arguments dictionary

    The following arguments are supported:

    BizType double
    Topic type

    • 0 (default): Log topic.
    • 1: Metric topic.
    Filters List<GetClsTopicsFilter>
    Id string
    PreciseSearch double
    Match mode for Filters fields.

    • 0: Fuzzy match for topicName and logsetName. This is the default value.
    • 1: Exact match for topicName.
    • 2: Exact match for logsetName.
    • 3: Exact match for topicName and logsetName.
    ResultOutputFile string
    Used to save results.
    BizType float64
    Topic type

    • 0 (default): Log topic.
    • 1: Metric topic.
    Filters []GetClsTopicsFilter
    Id string
    PreciseSearch float64
    Match mode for Filters fields.

    • 0: Fuzzy match for topicName and logsetName. This is the default value.
    • 1: Exact match for topicName.
    • 2: Exact match for logsetName.
    • 3: Exact match for topicName and logsetName.
    ResultOutputFile string
    Used to save results.
    bizType Double
    Topic type

    • 0 (default): Log topic.
    • 1: Metric topic.
    filters List<GetClsTopicsFilter>
    id String
    preciseSearch Double
    Match mode for Filters fields.

    • 0: Fuzzy match for topicName and logsetName. This is the default value.
    • 1: Exact match for topicName.
    • 2: Exact match for logsetName.
    • 3: Exact match for topicName and logsetName.
    resultOutputFile String
    Used to save results.
    bizType number
    Topic type

    • 0 (default): Log topic.
    • 1: Metric topic.
    filters GetClsTopicsFilter[]
    id string
    preciseSearch number
    Match mode for Filters fields.

    • 0: Fuzzy match for topicName and logsetName. This is the default value.
    • 1: Exact match for topicName.
    • 2: Exact match for logsetName.
    • 3: Exact match for topicName and logsetName.
    resultOutputFile string
    Used to save results.
    biz_type float
    Topic type

    • 0 (default): Log topic.
    • 1: Metric topic.
    filters Sequence[GetClsTopicsFilter]
    id str
    precise_search float
    Match mode for Filters fields.

    • 0: Fuzzy match for topicName and logsetName. This is the default value.
    • 1: Exact match for topicName.
    • 2: Exact match for logsetName.
    • 3: Exact match for topicName and logsetName.
    result_output_file str
    Used to save results.
    bizType Number
    Topic type

    • 0 (default): Log topic.
    • 1: Metric topic.
    filters List<Property Map>
    id String
    preciseSearch Number
    Match mode for Filters fields.

    • 0: Fuzzy match for topicName and logsetName. This is the default value.
    • 1: Exact match for topicName.
    • 2: Exact match for logsetName.
    • 3: Exact match for topicName and logsetName.
    resultOutputFile String
    Used to save results.

    getClsTopics Result

    The following output properties are available:

    Supporting Types

    GetClsTopicsFilter

    Key string
    Field to be filtered.
    Values List<string>
    Value to be filtered.
    Key string
    Field to be filtered.
    Values []string
    Value to be filtered.
    key String
    Field to be filtered.
    values List<String>
    Value to be filtered.
    key string
    Field to be filtered.
    values string[]
    Value to be filtered.
    key str
    Field to be filtered.
    values Sequence[str]
    Value to be filtered.
    key String
    Field to be filtered.
    values List<String>
    Value to be filtered.

    GetClsTopicsTopic

    AssumerName string
    AutoSplit bool
    BizType double
    Topic type

    • 0 (default): Log topic.
    • 1: Metric topic.
    CreateTime string
    Describes string
    HotPeriod double
    Index bool
    IsWebTracking bool
    LogsetId string
    MaxSplitPartitions double
    PartitionCount double
    Period double
    Status bool
    StorageType string
    SubAssumerName string
    Tags List<GetClsTopicsTopicTag>
    TopicId string
    TopicName string
    AssumerName string
    AutoSplit bool
    BizType float64
    Topic type

    • 0 (default): Log topic.
    • 1: Metric topic.
    CreateTime string
    Describes string
    HotPeriod float64
    Index bool
    IsWebTracking bool
    LogsetId string
    MaxSplitPartitions float64
    PartitionCount float64
    Period float64
    Status bool
    StorageType string
    SubAssumerName string
    Tags []GetClsTopicsTopicTag
    TopicId string
    TopicName string
    assumerName String
    autoSplit Boolean
    bizType Double
    Topic type

    • 0 (default): Log topic.
    • 1: Metric topic.
    createTime String
    describes String
    hotPeriod Double
    index Boolean
    isWebTracking Boolean
    logsetId String
    maxSplitPartitions Double
    partitionCount Double
    period Double
    status Boolean
    storageType String
    subAssumerName String
    tags List<GetClsTopicsTopicTag>
    topicId String
    topicName String
    assumerName string
    autoSplit boolean
    bizType number
    Topic type

    • 0 (default): Log topic.
    • 1: Metric topic.
    createTime string
    describes string
    hotPeriod number
    index boolean
    isWebTracking boolean
    logsetId string
    maxSplitPartitions number
    partitionCount number
    period number
    status boolean
    storageType string
    subAssumerName string
    tags GetClsTopicsTopicTag[]
    topicId string
    topicName string
    assumerName String
    autoSplit Boolean
    bizType Number
    Topic type

    • 0 (default): Log topic.
    • 1: Metric topic.
    createTime String
    describes String
    hotPeriod Number
    index Boolean
    isWebTracking Boolean
    logsetId String
    maxSplitPartitions Number
    partitionCount Number
    period Number
    status Boolean
    storageType String
    subAssumerName String
    tags List<Property Map>
    topicId String
    topicName String

    GetClsTopicsTopicTag

    Key string
    Field to be filtered.
    Value string
    Key string
    Field to be filtered.
    Value string
    key String
    Field to be filtered.
    value String
    key string
    Field to be filtered.
    value string
    key str
    Field to be filtered.
    value str
    key String
    Field to be filtered.
    value String

    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