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

tencentcloud.getTdmqRocketmqTopic

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 tdmqRocketmq topic

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const exampleTdmqRocketmqCluster = new tencentcloud.TdmqRocketmqCluster("exampleTdmqRocketmqCluster", {
        clusterName: "tf_example",
        remark: "remark.",
    });
    const exampleTdmqRocketmqNamespace = new tencentcloud.TdmqRocketmqNamespace("exampleTdmqRocketmqNamespace", {
        clusterId: exampleTdmqRocketmqCluster.clusterId,
        namespaceName: "tf_example",
        remark: "remark.",
    });
    const exampleTdmqRocketmqTopic = tencentcloud.getTdmqRocketmqTopicOutput({
        clusterId: exampleTdmqRocketmqCluster.clusterId,
        namespaceId: exampleTdmqRocketmqNamespace.namespaceName,
        filterName: exampleIndex / tdmqRocketmqTopicTdmqRocketmqTopic.topicName,
    });
    const exampleIndex_tdmqRocketmqTopicTdmqRocketmqTopic = new tencentcloud.TdmqRocketmqTopic("exampleIndex/tdmqRocketmqTopicTdmqRocketmqTopic", {
        topicName: "tf_example",
        namespaceName: exampleTdmqRocketmqNamespace.namespaceName,
        clusterId: exampleTdmqRocketmqCluster.clusterId,
        type: "Normal",
        remark: "remark.",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example_tdmq_rocketmq_cluster = tencentcloud.TdmqRocketmqCluster("exampleTdmqRocketmqCluster",
        cluster_name="tf_example",
        remark="remark.")
    example_tdmq_rocketmq_namespace = tencentcloud.TdmqRocketmqNamespace("exampleTdmqRocketmqNamespace",
        cluster_id=example_tdmq_rocketmq_cluster.cluster_id,
        namespace_name="tf_example",
        remark="remark.")
    example_tdmq_rocketmq_topic = tencentcloud.get_tdmq_rocketmq_topic_output(cluster_id=example_tdmq_rocketmq_cluster.cluster_id,
        namespace_id=example_tdmq_rocketmq_namespace.namespace_name,
        filter_name=example_index / tdmq_rocketmq_topic_tdmq_rocketmq_topic["topicName"])
    example_index_tdmq_rocketmq_topic_tdmq_rocketmq_topic = tencentcloud.TdmqRocketmqTopic("exampleIndex/tdmqRocketmqTopicTdmqRocketmqTopic",
        topic_name="tf_example",
        namespace_name=example_tdmq_rocketmq_namespace.namespace_name,
        cluster_id=example_tdmq_rocketmq_cluster.cluster_id,
        type="Normal",
        remark="remark.")
    
    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 {
    		exampleTdmqRocketmqCluster, err := tencentcloud.NewTdmqRocketmqCluster(ctx, "exampleTdmqRocketmqCluster", &tencentcloud.TdmqRocketmqClusterArgs{
    			ClusterName: pulumi.String("tf_example"),
    			Remark:      pulumi.String("remark."),
    		})
    		if err != nil {
    			return err
    		}
    		exampleTdmqRocketmqNamespace, err := tencentcloud.NewTdmqRocketmqNamespace(ctx, "exampleTdmqRocketmqNamespace", &tencentcloud.TdmqRocketmqNamespaceArgs{
    			ClusterId:     exampleTdmqRocketmqCluster.ClusterId,
    			NamespaceName: pulumi.String("tf_example"),
    			Remark:        pulumi.String("remark."),
    		})
    		if err != nil {
    			return err
    		}
    		_ = tencentcloud.LookupTdmqRocketmqTopicOutput(ctx, tencentcloud.GetTdmqRocketmqTopicOutputArgs{
    			ClusterId:   exampleTdmqRocketmqCluster.ClusterId,
    			NamespaceId: exampleTdmqRocketmqNamespace.NamespaceName,
    			FilterName:  pulumi.String(exampleIndex / tdmqRocketmqTopicTdmqRocketmqTopic.TopicName),
    		}, nil)
    		_, err = tencentcloud.NewTdmqRocketmqTopic(ctx, "exampleIndex/tdmqRocketmqTopicTdmqRocketmqTopic", &tencentcloud.TdmqRocketmqTopicArgs{
    			TopicName:     pulumi.String("tf_example"),
    			NamespaceName: exampleTdmqRocketmqNamespace.NamespaceName,
    			ClusterId:     exampleTdmqRocketmqCluster.ClusterId,
    			Type:          pulumi.String("Normal"),
    			Remark:        pulumi.String("remark."),
    		})
    		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 exampleTdmqRocketmqCluster = new Tencentcloud.TdmqRocketmqCluster("exampleTdmqRocketmqCluster", new()
        {
            ClusterName = "tf_example",
            Remark = "remark.",
        });
    
        var exampleTdmqRocketmqNamespace = new Tencentcloud.TdmqRocketmqNamespace("exampleTdmqRocketmqNamespace", new()
        {
            ClusterId = exampleTdmqRocketmqCluster.ClusterId,
            NamespaceName = "tf_example",
            Remark = "remark.",
        });
    
        var exampleTdmqRocketmqTopic = Tencentcloud.GetTdmqRocketmqTopic.Invoke(new()
        {
            ClusterId = exampleTdmqRocketmqCluster.ClusterId,
            NamespaceId = exampleTdmqRocketmqNamespace.NamespaceName,
            FilterName = exampleIndex / tdmqRocketmqTopicTdmqRocketmqTopic.TopicName,
        });
    
        var exampleIndex_tdmqRocketmqTopicTdmqRocketmqTopic = new Tencentcloud.TdmqRocketmqTopic("exampleIndex/tdmqRocketmqTopicTdmqRocketmqTopic", new()
        {
            TopicName = "tf_example",
            NamespaceName = exampleTdmqRocketmqNamespace.NamespaceName,
            ClusterId = exampleTdmqRocketmqCluster.ClusterId,
            Type = "Normal",
            Remark = "remark.",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TdmqRocketmqCluster;
    import com.pulumi.tencentcloud.TdmqRocketmqClusterArgs;
    import com.pulumi.tencentcloud.TdmqRocketmqNamespace;
    import com.pulumi.tencentcloud.TdmqRocketmqNamespaceArgs;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetTdmqRocketmqTopicArgs;
    import com.pulumi.tencentcloud.TdmqRocketmqTopic;
    import com.pulumi.tencentcloud.TdmqRocketmqTopicArgs;
    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 exampleTdmqRocketmqCluster = new TdmqRocketmqCluster("exampleTdmqRocketmqCluster", TdmqRocketmqClusterArgs.builder()
                .clusterName("tf_example")
                .remark("remark.")
                .build());
    
            var exampleTdmqRocketmqNamespace = new TdmqRocketmqNamespace("exampleTdmqRocketmqNamespace", TdmqRocketmqNamespaceArgs.builder()
                .clusterId(exampleTdmqRocketmqCluster.clusterId())
                .namespaceName("tf_example")
                .remark("remark.")
                .build());
    
            final var exampleTdmqRocketmqTopic = TencentcloudFunctions.getTdmqRocketmqTopic(GetTdmqRocketmqTopicArgs.builder()
                .clusterId(exampleTdmqRocketmqCluster.clusterId())
                .namespaceId(exampleTdmqRocketmqNamespace.namespaceName())
                .filterName(exampleIndex / tdmqRocketmqTopicTdmqRocketmqTopic.topicName())
                .build());
    
            var exampleIndex_tdmqRocketmqTopicTdmqRocketmqTopic = new TdmqRocketmqTopic("exampleIndex/tdmqRocketmqTopicTdmqRocketmqTopic", TdmqRocketmqTopicArgs.builder()
                .topicName("tf_example")
                .namespaceName(exampleTdmqRocketmqNamespace.namespaceName())
                .clusterId(exampleTdmqRocketmqCluster.clusterId())
                .type("Normal")
                .remark("remark.")
                .build());
    
        }
    }
    
    Coming soon!
    

    Using getTdmqRocketmqTopic

    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 getTdmqRocketmqTopic(args: GetTdmqRocketmqTopicArgs, opts?: InvokeOptions): Promise<GetTdmqRocketmqTopicResult>
    function getTdmqRocketmqTopicOutput(args: GetTdmqRocketmqTopicOutputArgs, opts?: InvokeOptions): Output<GetTdmqRocketmqTopicResult>
    def get_tdmq_rocketmq_topic(cluster_id: Optional[str] = None,
                                filter_name: Optional[str] = None,
                                filter_types: Optional[Sequence[str]] = None,
                                id: Optional[str] = None,
                                namespace_id: Optional[str] = None,
                                result_output_file: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetTdmqRocketmqTopicResult
    def get_tdmq_rocketmq_topic_output(cluster_id: Optional[pulumi.Input[str]] = None,
                                filter_name: Optional[pulumi.Input[str]] = None,
                                filter_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                id: Optional[pulumi.Input[str]] = None,
                                namespace_id: Optional[pulumi.Input[str]] = None,
                                result_output_file: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetTdmqRocketmqTopicResult]
    func LookupTdmqRocketmqTopic(ctx *Context, args *LookupTdmqRocketmqTopicArgs, opts ...InvokeOption) (*LookupTdmqRocketmqTopicResult, error)
    func LookupTdmqRocketmqTopicOutput(ctx *Context, args *LookupTdmqRocketmqTopicOutputArgs, opts ...InvokeOption) LookupTdmqRocketmqTopicResultOutput

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

    public static class GetTdmqRocketmqTopic 
    {
        public static Task<GetTdmqRocketmqTopicResult> InvokeAsync(GetTdmqRocketmqTopicArgs args, InvokeOptions? opts = null)
        public static Output<GetTdmqRocketmqTopicResult> Invoke(GetTdmqRocketmqTopicInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTdmqRocketmqTopicResult> getTdmqRocketmqTopic(GetTdmqRocketmqTopicArgs args, InvokeOptions options)
    public static Output<GetTdmqRocketmqTopicResult> getTdmqRocketmqTopic(GetTdmqRocketmqTopicArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getTdmqRocketmqTopic:getTdmqRocketmqTopic
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ClusterId string
    Cluster ID.
    NamespaceId string
    Namespace.
    FilterName string
    Search by topic name. Fuzzy query is supported.
    FilterTypes List<string>
    Filter by topic type. Valid values: Normal, GlobalOrder, PartitionedOrder, Transaction.
    Id string
    ResultOutputFile string
    Used to save results.
    ClusterId string
    Cluster ID.
    NamespaceId string
    Namespace.
    FilterName string
    Search by topic name. Fuzzy query is supported.
    FilterTypes []string
    Filter by topic type. Valid values: Normal, GlobalOrder, PartitionedOrder, Transaction.
    Id string
    ResultOutputFile string
    Used to save results.
    clusterId String
    Cluster ID.
    namespaceId String
    Namespace.
    filterName String
    Search by topic name. Fuzzy query is supported.
    filterTypes List<String>
    Filter by topic type. Valid values: Normal, GlobalOrder, PartitionedOrder, Transaction.
    id String
    resultOutputFile String
    Used to save results.
    clusterId string
    Cluster ID.
    namespaceId string
    Namespace.
    filterName string
    Search by topic name. Fuzzy query is supported.
    filterTypes string[]
    Filter by topic type. Valid values: Normal, GlobalOrder, PartitionedOrder, Transaction.
    id string
    resultOutputFile string
    Used to save results.
    cluster_id str
    Cluster ID.
    namespace_id str
    Namespace.
    filter_name str
    Search by topic name. Fuzzy query is supported.
    filter_types Sequence[str]
    Filter by topic type. Valid values: Normal, GlobalOrder, PartitionedOrder, Transaction.
    id str
    result_output_file str
    Used to save results.
    clusterId String
    Cluster ID.
    namespaceId String
    Namespace.
    filterName String
    Search by topic name. Fuzzy query is supported.
    filterTypes List<String>
    Filter by topic type. Valid values: Normal, GlobalOrder, PartitionedOrder, Transaction.
    id String
    resultOutputFile String
    Used to save results.

    getTdmqRocketmqTopic Result

    The following output properties are available:

    ClusterId string
    Id string
    NamespaceId string
    Topics List<GetTdmqRocketmqTopicTopic>
    List of topic information.
    FilterName string
    FilterTypes List<string>
    ResultOutputFile string
    ClusterId string
    Id string
    NamespaceId string
    Topics []GetTdmqRocketmqTopicTopic
    List of topic information.
    FilterName string
    FilterTypes []string
    ResultOutputFile string
    clusterId String
    id String
    namespaceId String
    topics List<GetTdmqRocketmqTopicTopic>
    List of topic information.
    filterName String
    filterTypes List<String>
    resultOutputFile String
    clusterId string
    id string
    namespaceId string
    topics GetTdmqRocketmqTopicTopic[]
    List of topic information.
    filterName string
    filterTypes string[]
    resultOutputFile string
    clusterId String
    id String
    namespaceId String
    topics List<Property Map>
    List of topic information.
    filterName String
    filterTypes List<String>
    resultOutputFile String

    Supporting Types

    GetTdmqRocketmqTopicTopic

    CreateTime double
    Creation time in milliseconds.
    Name string
    Topic name.
    PartitionNum double
    The number of read/write partitions.
    Remark string
    Topic name.
    UpdateTime double
    Update time in milliseconds.
    CreateTime float64
    Creation time in milliseconds.
    Name string
    Topic name.
    PartitionNum float64
    The number of read/write partitions.
    Remark string
    Topic name.
    UpdateTime float64
    Update time in milliseconds.
    createTime Double
    Creation time in milliseconds.
    name String
    Topic name.
    partitionNum Double
    The number of read/write partitions.
    remark String
    Topic name.
    updateTime Double
    Update time in milliseconds.
    createTime number
    Creation time in milliseconds.
    name string
    Topic name.
    partitionNum number
    The number of read/write partitions.
    remark string
    Topic name.
    updateTime number
    Update time in milliseconds.
    create_time float
    Creation time in milliseconds.
    name str
    Topic name.
    partition_num float
    The number of read/write partitions.
    remark str
    Topic name.
    update_time float
    Update time in milliseconds.
    createTime Number
    Creation time in milliseconds.
    name String
    Topic name.
    partitionNum Number
    The number of read/write partitions.
    remark String
    Topic name.
    updateTime Number
    Update time in milliseconds.

    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