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

tencentcloud.getClsTopics

Explore with Pulumi AI

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({});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

example = tencentcloud.get_cls_topics()
Copy
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
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var example = Tencentcloud.GetClsTopics.Invoke();

});
Copy
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();

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: tencentcloud:getClsTopics
      arguments: {}
Copy

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"],
        },
    ],
});
Copy
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"],
    },
])
Copy
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
	})
}
Copy
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",
                },
            },
        },
    });

});
Copy
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());

    }
}
Copy
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
Copy

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>
Copy
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]
Copy
func GetClsTopics(ctx *Context, args *GetClsTopicsArgs, opts ...InvokeOption) (*GetClsTopicsResult, error)
func GetClsTopicsOutput(ctx *Context, args *GetClsTopicsOutputArgs, opts ...InvokeOption) GetClsTopicsResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetClsTopicsResult> getClsTopics(GetClsTopicsArgs args, InvokeOptions options)
public static Output<GetClsTopicsResult> getClsTopics(GetClsTopicsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: tencentcloud:index/getClsTopics:getClsTopics
  arguments:
    # arguments dictionary
Copy

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 This property is required. string
Field to be filtered.
Values This property is required. List<string>
Value to be filtered.
Key This property is required. string
Field to be filtered.
Values This property is required. []string
Value to be filtered.
key This property is required. String
Field to be filtered.
values This property is required. List<String>
Value to be filtered.
key This property is required. string
Field to be filtered.
values This property is required. string[]
Value to be filtered.
key This property is required. str
Field to be filtered.
values This property is required. Sequence[str]
Value to be filtered.
key This property is required. String
Field to be filtered.
values This property is required. List<String>
Value to be filtered.

GetClsTopicsTopic

AssumerName This property is required. string
AutoSplit This property is required. bool
BizType This property is required. double
Topic type

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

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

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

  • 0 (default): Log topic.
  • 1: Metric topic.
createTime This property is required. string
describes This property is required. string
hotPeriod This property is required. number
index This property is required. boolean
isWebTracking This property is required. boolean
logsetId This property is required. string
maxSplitPartitions This property is required. number
partitionCount This property is required. number
period This property is required. number
status This property is required. boolean
storageType This property is required. string
subAssumerName This property is required. string
tags This property is required. GetClsTopicsTopicTag[]
topicId This property is required. string
topicName This property is required. string
assumer_name This property is required. str
auto_split This property is required. bool
biz_type This property is required. float
Topic type

  • 0 (default): Log topic.
  • 1: Metric topic.
create_time This property is required. str
describes This property is required. str
hot_period This property is required. float
index This property is required. bool
is_web_tracking This property is required. bool
logset_id This property is required. str
max_split_partitions This property is required. float
partition_count This property is required. float
period This property is required. float
status This property is required. bool
storage_type This property is required. str
sub_assumer_name This property is required. str
tags This property is required. Sequence[GetClsTopicsTopicTag]
topic_id This property is required. str
topic_name This property is required. str
assumerName This property is required. String
autoSplit This property is required. Boolean
bizType This property is required. Number
Topic type

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

GetClsTopicsTopicTag

Key This property is required. string
Field to be filtered.
Value This property is required. string
Key This property is required. string
Field to be filtered.
Value This property is required. string
key This property is required. String
Field to be filtered.
value This property is required. String
key This property is required. string
Field to be filtered.
value This property is required. string
key This property is required. str
Field to be filtered.
value This property is required. str
key This property is required. String
Field to be filtered.
value This property is required. String

Package Details

Repository
tencentcloud tencentcloudstack/terraform-provider-tencentcloud
License
Notes
This Pulumi package is based on the tencentcloud Terraform Provider.