1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getTcmqTopic
tencentcloud 1.81.182 published on Monday, Apr 14, 2025 by tencentcloudstack

tencentcloud.getTcmqTopic

Explore with Pulumi AI

tencentcloud 1.81.182 published on Monday, Apr 14, 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",
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

topic = tencentcloud.get_tcmq_topic(topic_name="topic_name")
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.LookupTcmqTopic(ctx, &tencentcloud.LookupTcmqTopicArgs{
			TopicName: pulumi.StringRef("topic_name"),
		}, 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 topic = Tencentcloud.GetTcmqTopic.Invoke(new()
    {
        TopicName = "topic_name",
    });

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

    }
}
Copy
variables:
  topic:
    fn::invoke:
      function: tencentcloud:getTcmqTopic
      arguments:
        topicName: topic_name
Copy

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>
Copy
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]
Copy
func LookupTcmqTopic(ctx *Context, args *LookupTcmqTopicArgs, opts ...InvokeOption) (*LookupTcmqTopicResult, error)
func LookupTcmqTopicOutput(ctx *Context, args *LookupTcmqTopicOutputArgs, opts ...InvokeOption) LookupTcmqTopicResultOutput
Copy

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

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 This property is required. double
Valid values: 0 (Pulsar), 1 (RocketMQ).
CreateTime This property is required. double
Topic creation time. A Unix timestamp accurate down to the millisecond will be returned.
CreateUin This property is required. double
Creator Uin. The resource field for CAM authentication is composed of this field.
FilterType This property is required. 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 This property is required. double
Time when the topic attribute is last modified. A Unix timestamp accurate down to the millisecond will be returned.
MaxMsgSize This property is required. 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 This property is required. double
Number of current messages in the topic (number of retained messages).
MsgRetentionSeconds This property is required. 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 This property is required. string
Namespace name.
Qps This property is required. double
Number of messages published per second.
Status This property is required. double
Cluster status. 0: creating; 1: normal; 2: terminating; 3: deleted; 4: isolated; 5: creation failed; 6: deletion failed.
Tags This property is required. List<GetTcmqTopicTopicListTag>
Associated tag.
TenantId This property is required. string
Tenant ID.
TopicId This property is required. string
Topic ID.
TopicName This property is required. string
Fuzzy search by TopicName.
Trace This property is required. bool
Message trace. true: enabled; false: not enabled.
BrokerType This property is required. float64
Valid values: 0 (Pulsar), 1 (RocketMQ).
CreateTime This property is required. float64
Topic creation time. A Unix timestamp accurate down to the millisecond will be returned.
CreateUin This property is required. float64
Creator Uin. The resource field for CAM authentication is composed of this field.
FilterType This property is required. 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 This property is required. float64
Time when the topic attribute is last modified. A Unix timestamp accurate down to the millisecond will be returned.
MaxMsgSize This property is required. 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 This property is required. float64
Number of current messages in the topic (number of retained messages).
MsgRetentionSeconds This property is required. 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 This property is required. string
Namespace name.
Qps This property is required. float64
Number of messages published per second.
Status This property is required. float64
Cluster status. 0: creating; 1: normal; 2: terminating; 3: deleted; 4: isolated; 5: creation failed; 6: deletion failed.
Tags This property is required. []GetTcmqTopicTopicListTag
Associated tag.
TenantId This property is required. string
Tenant ID.
TopicId This property is required. string
Topic ID.
TopicName This property is required. string
Fuzzy search by TopicName.
Trace This property is required. bool
Message trace. true: enabled; false: not enabled.
brokerType This property is required. Double
Valid values: 0 (Pulsar), 1 (RocketMQ).
createTime This property is required. Double
Topic creation time. A Unix timestamp accurate down to the millisecond will be returned.
createUin This property is required. Double
Creator Uin. The resource field for CAM authentication is composed of this field.
filterType This property is required. 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 This property is required. Double
Time when the topic attribute is last modified. A Unix timestamp accurate down to the millisecond will be returned.
maxMsgSize This property is required. 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 This property is required. Double
Number of current messages in the topic (number of retained messages).
msgRetentionSeconds This property is required. 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 This property is required. String
Namespace name.
qps This property is required. Double
Number of messages published per second.
status This property is required. Double
Cluster status. 0: creating; 1: normal; 2: terminating; 3: deleted; 4: isolated; 5: creation failed; 6: deletion failed.
tags This property is required. List<GetTcmqTopicTopicListTag>
Associated tag.
tenantId This property is required. String
Tenant ID.
topicId This property is required. String
Topic ID.
topicName This property is required. String
Fuzzy search by TopicName.
trace This property is required. Boolean
Message trace. true: enabled; false: not enabled.
brokerType This property is required. number
Valid values: 0 (Pulsar), 1 (RocketMQ).
createTime This property is required. number
Topic creation time. A Unix timestamp accurate down to the millisecond will be returned.
createUin This property is required. number
Creator Uin. The resource field for CAM authentication is composed of this field.
filterType This property is required. 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 This property is required. number
Time when the topic attribute is last modified. A Unix timestamp accurate down to the millisecond will be returned.
maxMsgSize This property is required. 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 This property is required. number
Number of current messages in the topic (number of retained messages).
msgRetentionSeconds This property is required. 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 This property is required. string
Namespace name.
qps This property is required. number
Number of messages published per second.
status This property is required. number
Cluster status. 0: creating; 1: normal; 2: terminating; 3: deleted; 4: isolated; 5: creation failed; 6: deletion failed.
tags This property is required. GetTcmqTopicTopicListTag[]
Associated tag.
tenantId This property is required. string
Tenant ID.
topicId This property is required. string
Topic ID.
topicName This property is required. string
Fuzzy search by TopicName.
trace This property is required. boolean
Message trace. true: enabled; false: not enabled.
broker_type This property is required. float
Valid values: 0 (Pulsar), 1 (RocketMQ).
create_time This property is required. float
Topic creation time. A Unix timestamp accurate down to the millisecond will be returned.
create_uin This property is required. float
Creator Uin. The resource field for CAM authentication is composed of this field.
filter_type This property is required. 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 This property is required. float
Time when the topic attribute is last modified. A Unix timestamp accurate down to the millisecond will be returned.
max_msg_size This property is required. 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 This property is required. float
Number of current messages in the topic (number of retained messages).
msg_retention_seconds This property is required. 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 This property is required. str
Namespace name.
qps This property is required. float
Number of messages published per second.
status This property is required. float
Cluster status. 0: creating; 1: normal; 2: terminating; 3: deleted; 4: isolated; 5: creation failed; 6: deletion failed.
tags This property is required. Sequence[GetTcmqTopicTopicListTag]
Associated tag.
tenant_id This property is required. str
Tenant ID.
topic_id This property is required. str
Topic ID.
topic_name This property is required. str
Fuzzy search by TopicName.
trace This property is required. bool
Message trace. true: enabled; false: not enabled.
brokerType This property is required. Number
Valid values: 0 (Pulsar), 1 (RocketMQ).
createTime This property is required. Number
Topic creation time. A Unix timestamp accurate down to the millisecond will be returned.
createUin This property is required. Number
Creator Uin. The resource field for CAM authentication is composed of this field.
filterType This property is required. 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 This property is required. Number
Time when the topic attribute is last modified. A Unix timestamp accurate down to the millisecond will be returned.
maxMsgSize This property is required. 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 This property is required. Number
Number of current messages in the topic (number of retained messages).
msgRetentionSeconds This property is required. 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 This property is required. String
Namespace name.
qps This property is required. Number
Number of messages published per second.
status This property is required. Number
Cluster status. 0: creating; 1: normal; 2: terminating; 3: deleted; 4: isolated; 5: creation failed; 6: deletion failed.
tags This property is required. List<Property Map>
Associated tag.
tenantId This property is required. String
Tenant ID.
topicId This property is required. String
Topic ID.
topicName This property is required. String
Fuzzy search by TopicName.
trace This property is required. Boolean
Message trace. true: enabled; false: not enabled.

GetTcmqTopicTopicListTag

TagKey This property is required. string
Value of the tag key.
TagValue This property is required. string
Value of the tag value.
TagKey This property is required. string
Value of the tag key.
TagValue This property is required. string
Value of the tag value.
tagKey This property is required. String
Value of the tag key.
tagValue This property is required. String
Value of the tag value.
tagKey This property is required. string
Value of the tag key.
tagValue This property is required. string
Value of the tag value.
tag_key This property is required. str
Value of the tag key.
tag_value This property is required. str
Value of the tag value.
tagKey This property is required. String
Value of the tag key.
tagValue This property is required. 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 1.81.182 published on Monday, Apr 14, 2025 by tencentcloudstack