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

tencentcloud.TcmqTopic

Explore with Pulumi AI

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

    Provides a resource to create a tcmq topic

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const topic = new tencentcloud.TcmqTopic("topic", {topicName: "topic_name"});
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    topic = tencentcloud.TcmqTopic("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.NewTcmqTopic(ctx, "topic", &tencentcloud.TcmqTopicArgs{
    			TopicName: pulumi.String("topic_name"),
    		})
    		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 = new Tencentcloud.TcmqTopic("topic", new()
        {
            TopicName = "topic_name",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TcmqTopic;
    import com.pulumi.tencentcloud.TcmqTopicArgs;
    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 topic = new TcmqTopic("topic", TcmqTopicArgs.builder()
                .topicName("topic_name")
                .build());
    
        }
    }
    
    resources:
      topic:
        type: tencentcloud:TcmqTopic
        properties:
          topicName: topic_name
    

    Create TcmqTopic Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new TcmqTopic(name: string, args: TcmqTopicArgs, opts?: CustomResourceOptions);
    @overload
    def TcmqTopic(resource_name: str,
                  args: TcmqTopicArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def TcmqTopic(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  topic_name: Optional[str] = None,
                  filter_type: Optional[float] = None,
                  max_msg_size: Optional[float] = None,
                  msg_retention_seconds: Optional[float] = None,
                  tcmq_topic_id: Optional[str] = None,
                  trace: Optional[bool] = None)
    func NewTcmqTopic(ctx *Context, name string, args TcmqTopicArgs, opts ...ResourceOption) (*TcmqTopic, error)
    public TcmqTopic(string name, TcmqTopicArgs args, CustomResourceOptions? opts = null)
    public TcmqTopic(String name, TcmqTopicArgs args)
    public TcmqTopic(String name, TcmqTopicArgs args, CustomResourceOptions options)
    
    type: tencentcloud:TcmqTopic
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args TcmqTopicArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args TcmqTopicArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args TcmqTopicArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TcmqTopicArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TcmqTopicArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    TcmqTopic Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The TcmqTopic resource accepts the following input properties:

    TopicName string
    Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
    FilterType double
    Used to specify the message match policy for the topic. 1: tag match policy (default value); 2: routing match policy.
    MaxMsgSize double
    Maximum message length. Value range: 1024-65536 bytes (i.e., 1-64 KB). Default value: 65536.
    MsgRetentionSeconds double
    Message retention period. Value range: 60-86400 seconds (i.e., 1 minute-1 day). Default value: 86400.
    TcmqTopicId string
    ID of the resource.
    Trace bool
    Whether to enable message trace. true: yes; false: no. If this field is left empty, the feature will not be enabled.
    TopicName string
    Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
    FilterType float64
    Used to specify the message match policy for the topic. 1: tag match policy (default value); 2: routing match policy.
    MaxMsgSize float64
    Maximum message length. Value range: 1024-65536 bytes (i.e., 1-64 KB). Default value: 65536.
    MsgRetentionSeconds float64
    Message retention period. Value range: 60-86400 seconds (i.e., 1 minute-1 day). Default value: 86400.
    TcmqTopicId string
    ID of the resource.
    Trace bool
    Whether to enable message trace. true: yes; false: no. If this field is left empty, the feature will not be enabled.
    topicName String
    Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
    filterType Double
    Used to specify the message match policy for the topic. 1: tag match policy (default value); 2: routing match policy.
    maxMsgSize Double
    Maximum message length. Value range: 1024-65536 bytes (i.e., 1-64 KB). Default value: 65536.
    msgRetentionSeconds Double
    Message retention period. Value range: 60-86400 seconds (i.e., 1 minute-1 day). Default value: 86400.
    tcmqTopicId String
    ID of the resource.
    trace Boolean
    Whether to enable message trace. true: yes; false: no. If this field is left empty, the feature will not be enabled.
    topicName string
    Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
    filterType number
    Used to specify the message match policy for the topic. 1: tag match policy (default value); 2: routing match policy.
    maxMsgSize number
    Maximum message length. Value range: 1024-65536 bytes (i.e., 1-64 KB). Default value: 65536.
    msgRetentionSeconds number
    Message retention period. Value range: 60-86400 seconds (i.e., 1 minute-1 day). Default value: 86400.
    tcmqTopicId string
    ID of the resource.
    trace boolean
    Whether to enable message trace. true: yes; false: no. If this field is left empty, the feature will not be enabled.
    topic_name str
    Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
    filter_type float
    Used to specify the message match policy for the topic. 1: tag match policy (default value); 2: routing match policy.
    max_msg_size float
    Maximum message length. Value range: 1024-65536 bytes (i.e., 1-64 KB). Default value: 65536.
    msg_retention_seconds float
    Message retention period. Value range: 60-86400 seconds (i.e., 1 minute-1 day). Default value: 86400.
    tcmq_topic_id str
    ID of the resource.
    trace bool
    Whether to enable message trace. true: yes; false: no. If this field is left empty, the feature will not be enabled.
    topicName String
    Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
    filterType Number
    Used to specify the message match policy for the topic. 1: tag match policy (default value); 2: routing match policy.
    maxMsgSize Number
    Maximum message length. Value range: 1024-65536 bytes (i.e., 1-64 KB). Default value: 65536.
    msgRetentionSeconds Number
    Message retention period. Value range: 60-86400 seconds (i.e., 1 minute-1 day). Default value: 86400.
    tcmqTopicId String
    ID of the resource.
    trace Boolean
    Whether to enable message trace. true: yes; false: no. If this field is left empty, the feature will not be enabled.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the TcmqTopic resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing TcmqTopic Resource

    Get an existing TcmqTopic resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: TcmqTopicState, opts?: CustomResourceOptions): TcmqTopic
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            filter_type: Optional[float] = None,
            max_msg_size: Optional[float] = None,
            msg_retention_seconds: Optional[float] = None,
            tcmq_topic_id: Optional[str] = None,
            topic_name: Optional[str] = None,
            trace: Optional[bool] = None) -> TcmqTopic
    func GetTcmqTopic(ctx *Context, name string, id IDInput, state *TcmqTopicState, opts ...ResourceOption) (*TcmqTopic, error)
    public static TcmqTopic Get(string name, Input<string> id, TcmqTopicState? state, CustomResourceOptions? opts = null)
    public static TcmqTopic get(String name, Output<String> id, TcmqTopicState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:TcmqTopic    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    FilterType double
    Used to specify the message match policy for the topic. 1: tag match policy (default value); 2: routing match policy.
    MaxMsgSize double
    Maximum message length. Value range: 1024-65536 bytes (i.e., 1-64 KB). Default value: 65536.
    MsgRetentionSeconds double
    Message retention period. Value range: 60-86400 seconds (i.e., 1 minute-1 day). Default value: 86400.
    TcmqTopicId string
    ID of the resource.
    TopicName string
    Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
    Trace bool
    Whether to enable message trace. true: yes; false: no. If this field is left empty, the feature will not be enabled.
    FilterType float64
    Used to specify the message match policy for the topic. 1: tag match policy (default value); 2: routing match policy.
    MaxMsgSize float64
    Maximum message length. Value range: 1024-65536 bytes (i.e., 1-64 KB). Default value: 65536.
    MsgRetentionSeconds float64
    Message retention period. Value range: 60-86400 seconds (i.e., 1 minute-1 day). Default value: 86400.
    TcmqTopicId string
    ID of the resource.
    TopicName string
    Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
    Trace bool
    Whether to enable message trace. true: yes; false: no. If this field is left empty, the feature will not be enabled.
    filterType Double
    Used to specify the message match policy for the topic. 1: tag match policy (default value); 2: routing match policy.
    maxMsgSize Double
    Maximum message length. Value range: 1024-65536 bytes (i.e., 1-64 KB). Default value: 65536.
    msgRetentionSeconds Double
    Message retention period. Value range: 60-86400 seconds (i.e., 1 minute-1 day). Default value: 86400.
    tcmqTopicId String
    ID of the resource.
    topicName String
    Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
    trace Boolean
    Whether to enable message trace. true: yes; false: no. If this field is left empty, the feature will not be enabled.
    filterType number
    Used to specify the message match policy for the topic. 1: tag match policy (default value); 2: routing match policy.
    maxMsgSize number
    Maximum message length. Value range: 1024-65536 bytes (i.e., 1-64 KB). Default value: 65536.
    msgRetentionSeconds number
    Message retention period. Value range: 60-86400 seconds (i.e., 1 minute-1 day). Default value: 86400.
    tcmqTopicId string
    ID of the resource.
    topicName string
    Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
    trace boolean
    Whether to enable message trace. true: yes; false: no. If this field is left empty, the feature will not be enabled.
    filter_type float
    Used to specify the message match policy for the topic. 1: tag match policy (default value); 2: routing match policy.
    max_msg_size float
    Maximum message length. Value range: 1024-65536 bytes (i.e., 1-64 KB). Default value: 65536.
    msg_retention_seconds float
    Message retention period. Value range: 60-86400 seconds (i.e., 1 minute-1 day). Default value: 86400.
    tcmq_topic_id str
    ID of the resource.
    topic_name str
    Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
    trace bool
    Whether to enable message trace. true: yes; false: no. If this field is left empty, the feature will not be enabled.
    filterType Number
    Used to specify the message match policy for the topic. 1: tag match policy (default value); 2: routing match policy.
    maxMsgSize Number
    Maximum message length. Value range: 1024-65536 bytes (i.e., 1-64 KB). Default value: 65536.
    msgRetentionSeconds Number
    Message retention period. Value range: 60-86400 seconds (i.e., 1 minute-1 day). Default value: 86400.
    tcmqTopicId String
    ID of the resource.
    topicName String
    Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
    trace Boolean
    Whether to enable message trace. true: yes; false: no. If this field is left empty, the feature will not be enabled.

    Import

    tcmq topic can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/tcmqTopic:TcmqTopic topic topic_id
    

    To learn more about importing existing cloud resources, see Importing resources.

    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