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

tencentcloud.getTcmqTopic

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const topic = tencentcloud.getTcmqTopic({
        topicName: "topic_name",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    topic = tencentcloud.get_tcmq_topic(topic_name="topic_name")
    
    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.LookupTcmqTopic(ctx, &tencentcloud.LookupTcmqTopicArgs{
    			TopicName: pulumi.StringRef("topic_name"),
    		}, 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 topic = Tencentcloud.GetTcmqTopic.Invoke(new()
        {
            TopicName = "topic_name",
        });
    
    });
    
    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.GetTcmqTopicArgs;
    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 topic = TencentcloudFunctions.getTcmqTopic(GetTcmqTopicArgs.builder()
                .topicName("topic_name")
                .build());
    
        }
    }
    
    variables:
      topic:
        fn::invoke:
          function: tencentcloud:getTcmqTopic
          arguments:
            topicName: topic_name
    

    Using getTcmqTopic

    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 getTcmqTopic(args: GetTcmqTopicArgs, opts?: InvokeOptions): Promise<GetTcmqTopicResult>
    function getTcmqTopicOutput(args: GetTcmqTopicOutputArgs, opts?: InvokeOptions): Output<GetTcmqTopicResult>
    def get_tcmq_topic(filters: Optional[Sequence[GetTcmqTopicFilter]] = None,
                       id: Optional[str] = None,
                       is_tag_filter: Optional[bool] = None,
                       limit: Optional[float] = None,
                       offset: Optional[float] = None,
                       result_output_file: Optional[str] = None,
                       topic_name: Optional[str] = None,
                       topic_name_lists: Optional[Sequence[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> GetTcmqTopicResult
    def get_tcmq_topic_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetTcmqTopicFilterArgs]]]] = None,
                       id: Optional[pulumi.Input[str]] = None,
                       is_tag_filter: Optional[pulumi.Input[bool]] = None,
                       limit: Optional[pulumi.Input[float]] = None,
                       offset: Optional[pulumi.Input[float]] = None,
                       result_output_file: Optional[pulumi.Input[str]] = None,
                       topic_name: Optional[pulumi.Input[str]] = None,
                       topic_name_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetTcmqTopicResult]
    func LookupTcmqTopic(ctx *Context, args *LookupTcmqTopicArgs, opts ...InvokeOption) (*LookupTcmqTopicResult, error)
    func LookupTcmqTopicOutput(ctx *Context, args *LookupTcmqTopicOutputArgs, opts ...InvokeOption) LookupTcmqTopicResultOutput

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

    public static class GetTcmqTopic 
    {
        public static Task<GetTcmqTopicResult> InvokeAsync(GetTcmqTopicArgs args, InvokeOptions? opts = null)
        public static Output<GetTcmqTopicResult> Invoke(GetTcmqTopicInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTcmqTopicResult> getTcmqTopic(GetTcmqTopicArgs args, InvokeOptions options)
    public static Output<GetTcmqTopicResult> getTcmqTopic(GetTcmqTopicArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getTcmqTopic:getTcmqTopic
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Filters List<GetTcmqTopicFilter>
    Filter. Currently, you can filter by tag. The tag name must be prefixed with tag:, such as tag: owner, tag: environment, or tag: business.
    Id string
    IsTagFilter bool
    For filtering by tag, this parameter must be set to true.
    Limit double
    Number of topics to be returned per page in case of paginated return. If this parameter is not passed in, 20 will be used by default. Maximum value: 50.
    Offset double
    Starting position of the list of topics to be returned on the current page in case of paginated return. If a value is entered, limit is required. If this parameter is left empty, 0 will be used by default.
    ResultOutputFile string
    Used to save results.
    TopicName string
    Fuzzy search by TopicName.
    TopicNameLists List<string>
    Filter by CMQ topic name.
    Filters []GetTcmqTopicFilter
    Filter. Currently, you can filter by tag. The tag name must be prefixed with tag:, such as tag: owner, tag: environment, or tag: business.
    Id string
    IsTagFilter bool
    For filtering by tag, this parameter must be set to true.
    Limit float64
    Number of topics to be returned per page in case of paginated return. If this parameter is not passed in, 20 will be used by default. Maximum value: 50.
    Offset float64
    Starting position of the list of topics to be returned on the current page in case of paginated return. If a value is entered, limit is required. If this parameter is left empty, 0 will be used by default.
    ResultOutputFile string
    Used to save results.
    TopicName string
    Fuzzy search by TopicName.
    TopicNameLists []string
    Filter by CMQ topic name.
    filters List<GetTcmqTopicFilter>
    Filter. Currently, you can filter by tag. The tag name must be prefixed with tag:, such as tag: owner, tag: environment, or tag: business.
    id String
    isTagFilter Boolean
    For filtering by tag, this parameter must be set to true.
    limit Double
    Number of topics to be returned per page in case of paginated return. If this parameter is not passed in, 20 will be used by default. Maximum value: 50.
    offset Double
    Starting position of the list of topics to be returned on the current page in case of paginated return. If a value is entered, limit is required. If this parameter is left empty, 0 will be used by default.
    resultOutputFile String
    Used to save results.
    topicName String
    Fuzzy search by TopicName.
    topicNameLists List<String>
    Filter by CMQ topic name.
    filters GetTcmqTopicFilter[]
    Filter. Currently, you can filter by tag. The tag name must be prefixed with tag:, such as tag: owner, tag: environment, or tag: business.
    id string
    isTagFilter boolean
    For filtering by tag, this parameter must be set to true.
    limit number
    Number of topics to be returned per page in case of paginated return. If this parameter is not passed in, 20 will be used by default. Maximum value: 50.
    offset number
    Starting position of the list of topics to be returned on the current page in case of paginated return. If a value is entered, limit is required. If this parameter is left empty, 0 will be used by default.
    resultOutputFile string
    Used to save results.
    topicName string
    Fuzzy search by TopicName.
    topicNameLists string[]
    Filter by CMQ topic name.
    filters Sequence[GetTcmqTopicFilter]
    Filter. Currently, you can filter by tag. The tag name must be prefixed with tag:, such as tag: owner, tag: environment, or tag: business.
    id str
    is_tag_filter bool
    For filtering by tag, this parameter must be set to true.
    limit float
    Number of topics to be returned per page in case of paginated return. If this parameter is not passed in, 20 will be used by default. Maximum value: 50.
    offset float
    Starting position of the list of topics to be returned on the current page in case of paginated return. If a value is entered, limit is required. If this parameter is left empty, 0 will be used by default.
    result_output_file str
    Used to save results.
    topic_name str
    Fuzzy search by TopicName.
    topic_name_lists Sequence[str]
    Filter by CMQ topic name.
    filters List<Property Map>
    Filter. Currently, you can filter by tag. The tag name must be prefixed with tag:, such as tag: owner, tag: environment, or tag: business.
    id String
    isTagFilter Boolean
    For filtering by tag, this parameter must be set to true.
    limit Number
    Number of topics to be returned per page in case of paginated return. If this parameter is not passed in, 20 will be used by default. Maximum value: 50.
    offset Number
    Starting position of the list of topics to be returned on the current page in case of paginated return. If a value is entered, limit is required. If this parameter is left empty, 0 will be used by default.
    resultOutputFile String
    Used to save results.
    topicName String
    Fuzzy search by TopicName.
    topicNameLists List<String>
    Filter by CMQ topic name.

    getTcmqTopic Result

    The following output properties are available:

    id String
    topicLists List<Property Map>
    Topic list.
    filters List<Property Map>
    isTagFilter Boolean
    limit Number
    offset Number
    resultOutputFile String
    topicName String
    Topic name.
    topicNameLists List<String>

    Supporting Types

    GetTcmqTopicFilter

    Name string
    Filter parameter name.
    Values List<string>
    Value.
    Name string
    Filter parameter name.
    Values []string
    Value.
    name String
    Filter parameter name.
    values List<String>
    Value.
    name string
    Filter parameter name.
    values string[]
    Value.
    name str
    Filter parameter name.
    values Sequence[str]
    Value.
    name String
    Filter parameter name.
    values List<String>
    Value.

    GetTcmqTopicTopicList

    BrokerType double
    Valid values: 0 (Pulsar), 1 (RocketMQ).
    CreateTime double
    Topic creation time. A Unix timestamp accurate down to the millisecond will be returned.
    CreateUin double
    Creator Uin. The resource field for CAM authentication is composed of this field.
    FilterType double
    Filtering policy selected when a subscription is created: If filterType is 1, FilterTag will be used for filtering. If filterType is 2, BindingKey will be used for filtering.
    LastModifyTime double
    Time when the topic attribute is last modified. A Unix timestamp accurate down to the millisecond will be returned.
    MaxMsgSize double
    Maximum message size, which ranges from 1,024 to 1,048,576 bytes (i.e., 1-1,024 KB). The default value is 65,536.
    MsgCount double
    Number of current messages in the topic (number of retained messages).
    MsgRetentionSeconds double
    Maximum lifecycle of message in topic. After the period specified by this parameter has elapsed since a message is sent to the topic, the message will be deleted no matter whether it has been successfully pushed to the user. This parameter is measured in seconds and defaulted to one day (86,400 seconds), which cannot be modified.
    NamespaceName string
    Namespace name.
    Qps double
    Number of messages published per second.
    Status double
    Cluster status. 0: creating; 1: normal; 2: terminating; 3: deleted; 4: isolated; 5: creation failed; 6: deletion failed.
    Tags List<GetTcmqTopicTopicListTag>
    Associated tag.
    TenantId string
    Tenant ID.
    TopicId string
    Topic ID.
    TopicName string
    Fuzzy search by TopicName.
    Trace bool
    Message trace. true: enabled; false: not enabled.
    BrokerType float64
    Valid values: 0 (Pulsar), 1 (RocketMQ).
    CreateTime float64
    Topic creation time. A Unix timestamp accurate down to the millisecond will be returned.
    CreateUin float64
    Creator Uin. The resource field for CAM authentication is composed of this field.
    FilterType float64
    Filtering policy selected when a subscription is created: If filterType is 1, FilterTag will be used for filtering. If filterType is 2, BindingKey will be used for filtering.
    LastModifyTime float64
    Time when the topic attribute is last modified. A Unix timestamp accurate down to the millisecond will be returned.
    MaxMsgSize float64
    Maximum message size, which ranges from 1,024 to 1,048,576 bytes (i.e., 1-1,024 KB). The default value is 65,536.
    MsgCount float64
    Number of current messages in the topic (number of retained messages).
    MsgRetentionSeconds float64
    Maximum lifecycle of message in topic. After the period specified by this parameter has elapsed since a message is sent to the topic, the message will be deleted no matter whether it has been successfully pushed to the user. This parameter is measured in seconds and defaulted to one day (86,400 seconds), which cannot be modified.
    NamespaceName string
    Namespace name.
    Qps float64
    Number of messages published per second.
    Status float64
    Cluster status. 0: creating; 1: normal; 2: terminating; 3: deleted; 4: isolated; 5: creation failed; 6: deletion failed.
    Tags []GetTcmqTopicTopicListTag
    Associated tag.
    TenantId string
    Tenant ID.
    TopicId string
    Topic ID.
    TopicName string
    Fuzzy search by TopicName.
    Trace bool
    Message trace. true: enabled; false: not enabled.
    brokerType Double
    Valid values: 0 (Pulsar), 1 (RocketMQ).
    createTime Double
    Topic creation time. A Unix timestamp accurate down to the millisecond will be returned.
    createUin Double
    Creator Uin. The resource field for CAM authentication is composed of this field.
    filterType Double
    Filtering policy selected when a subscription is created: If filterType is 1, FilterTag will be used for filtering. If filterType is 2, BindingKey will be used for filtering.
    lastModifyTime Double
    Time when the topic attribute is last modified. A Unix timestamp accurate down to the millisecond will be returned.
    maxMsgSize Double
    Maximum message size, which ranges from 1,024 to 1,048,576 bytes (i.e., 1-1,024 KB). The default value is 65,536.
    msgCount Double
    Number of current messages in the topic (number of retained messages).
    msgRetentionSeconds Double
    Maximum lifecycle of message in topic. After the period specified by this parameter has elapsed since a message is sent to the topic, the message will be deleted no matter whether it has been successfully pushed to the user. This parameter is measured in seconds and defaulted to one day (86,400 seconds), which cannot be modified.
    namespaceName String
    Namespace name.
    qps Double
    Number of messages published per second.
    status Double
    Cluster status. 0: creating; 1: normal; 2: terminating; 3: deleted; 4: isolated; 5: creation failed; 6: deletion failed.
    tags List<GetTcmqTopicTopicListTag>
    Associated tag.
    tenantId String
    Tenant ID.
    topicId String
    Topic ID.
    topicName String
    Fuzzy search by TopicName.
    trace Boolean
    Message trace. true: enabled; false: not enabled.
    brokerType number
    Valid values: 0 (Pulsar), 1 (RocketMQ).
    createTime number
    Topic creation time. A Unix timestamp accurate down to the millisecond will be returned.
    createUin number
    Creator Uin. The resource field for CAM authentication is composed of this field.
    filterType number
    Filtering policy selected when a subscription is created: If filterType is 1, FilterTag will be used for filtering. If filterType is 2, BindingKey will be used for filtering.
    lastModifyTime number
    Time when the topic attribute is last modified. A Unix timestamp accurate down to the millisecond will be returned.
    maxMsgSize number
    Maximum message size, which ranges from 1,024 to 1,048,576 bytes (i.e., 1-1,024 KB). The default value is 65,536.
    msgCount number
    Number of current messages in the topic (number of retained messages).
    msgRetentionSeconds number
    Maximum lifecycle of message in topic. After the period specified by this parameter has elapsed since a message is sent to the topic, the message will be deleted no matter whether it has been successfully pushed to the user. This parameter is measured in seconds and defaulted to one day (86,400 seconds), which cannot be modified.
    namespaceName string
    Namespace name.
    qps number
    Number of messages published per second.
    status number
    Cluster status. 0: creating; 1: normal; 2: terminating; 3: deleted; 4: isolated; 5: creation failed; 6: deletion failed.
    tags GetTcmqTopicTopicListTag[]
    Associated tag.
    tenantId string
    Tenant ID.
    topicId string
    Topic ID.
    topicName string
    Fuzzy search by TopicName.
    trace boolean
    Message trace. true: enabled; false: not enabled.
    broker_type float
    Valid values: 0 (Pulsar), 1 (RocketMQ).
    create_time float
    Topic creation time. A Unix timestamp accurate down to the millisecond will be returned.
    create_uin float
    Creator Uin. The resource field for CAM authentication is composed of this field.
    filter_type float
    Filtering policy selected when a subscription is created: If filterType is 1, FilterTag will be used for filtering. If filterType is 2, BindingKey will be used for filtering.
    last_modify_time float
    Time when the topic attribute is last modified. A Unix timestamp accurate down to the millisecond will be returned.
    max_msg_size float
    Maximum message size, which ranges from 1,024 to 1,048,576 bytes (i.e., 1-1,024 KB). The default value is 65,536.
    msg_count float
    Number of current messages in the topic (number of retained messages).
    msg_retention_seconds float
    Maximum lifecycle of message in topic. After the period specified by this parameter has elapsed since a message is sent to the topic, the message will be deleted no matter whether it has been successfully pushed to the user. This parameter is measured in seconds and defaulted to one day (86,400 seconds), which cannot be modified.
    namespace_name str
    Namespace name.
    qps float
    Number of messages published per second.
    status float
    Cluster status. 0: creating; 1: normal; 2: terminating; 3: deleted; 4: isolated; 5: creation failed; 6: deletion failed.
    tags Sequence[GetTcmqTopicTopicListTag]
    Associated tag.
    tenant_id str
    Tenant ID.
    topic_id str
    Topic ID.
    topic_name str
    Fuzzy search by TopicName.
    trace bool
    Message trace. true: enabled; false: not enabled.
    brokerType Number
    Valid values: 0 (Pulsar), 1 (RocketMQ).
    createTime Number
    Topic creation time. A Unix timestamp accurate down to the millisecond will be returned.
    createUin Number
    Creator Uin. The resource field for CAM authentication is composed of this field.
    filterType Number
    Filtering policy selected when a subscription is created: If filterType is 1, FilterTag will be used for filtering. If filterType is 2, BindingKey will be used for filtering.
    lastModifyTime Number
    Time when the topic attribute is last modified. A Unix timestamp accurate down to the millisecond will be returned.
    maxMsgSize Number
    Maximum message size, which ranges from 1,024 to 1,048,576 bytes (i.e., 1-1,024 KB). The default value is 65,536.
    msgCount Number
    Number of current messages in the topic (number of retained messages).
    msgRetentionSeconds Number
    Maximum lifecycle of message in topic. After the period specified by this parameter has elapsed since a message is sent to the topic, the message will be deleted no matter whether it has been successfully pushed to the user. This parameter is measured in seconds and defaulted to one day (86,400 seconds), which cannot be modified.
    namespaceName String
    Namespace name.
    qps Number
    Number of messages published per second.
    status Number
    Cluster status. 0: creating; 1: normal; 2: terminating; 3: deleted; 4: isolated; 5: creation failed; 6: deletion failed.
    tags List<Property Map>
    Associated tag.
    tenantId String
    Tenant ID.
    topicId String
    Topic ID.
    topicName String
    Fuzzy search by TopicName.
    trace Boolean
    Message trace. true: enabled; false: not enabled.

    GetTcmqTopicTopicListTag

    TagKey string
    Value of the tag key.
    TagValue string
    Value of the tag value.
    TagKey string
    Value of the tag key.
    TagValue string
    Value of the tag value.
    tagKey String
    Value of the tag key.
    tagValue String
    Value of the tag value.
    tagKey string
    Value of the tag key.
    tagValue string
    Value of the tag value.
    tag_key str
    Value of the tag key.
    tag_value str
    Value of the tag value.
    tagKey String
    Value of the tag key.
    tagValue String
    Value of the tag value.

    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