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

tencentcloud.TrocketRocketmqTopic

Explore with Pulumi AI

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

    Provides a resource to create a trocket rocketmq_topic

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const rocketmqInstance = new tencentcloud.TrocketRocketmqInstance("rocketmqInstance", {
        instanceType: "EXPERIMENT",
        skuCode: "experiment_500",
        remark: "test",
        vpcId: "vpc-xxxxx",
        subnetId: "subnet-xxxxx",
        tags: {
            tag_key: "rocketmq",
            tag_value: "5.x",
        },
    });
    const rocketmqTopic = new tencentcloud.TrocketRocketmqTopic("rocketmqTopic", {
        instanceId: rocketmqInstance.trocketRocketmqInstanceId,
        topic: "test_topic",
        topicType: "NORMAL",
        queueNum: 4,
        remark: "test for terraform",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    rocketmq_instance = tencentcloud.TrocketRocketmqInstance("rocketmqInstance",
        instance_type="EXPERIMENT",
        sku_code="experiment_500",
        remark="test",
        vpc_id="vpc-xxxxx",
        subnet_id="subnet-xxxxx",
        tags={
            "tag_key": "rocketmq",
            "tag_value": "5.x",
        })
    rocketmq_topic = tencentcloud.TrocketRocketmqTopic("rocketmqTopic",
        instance_id=rocketmq_instance.trocket_rocketmq_instance_id,
        topic="test_topic",
        topic_type="NORMAL",
        queue_num=4,
        remark="test for terraform")
    
    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 {
    		rocketmqInstance, err := tencentcloud.NewTrocketRocketmqInstance(ctx, "rocketmqInstance", &tencentcloud.TrocketRocketmqInstanceArgs{
    			InstanceType: pulumi.String("EXPERIMENT"),
    			SkuCode:      pulumi.String("experiment_500"),
    			Remark:       pulumi.String("test"),
    			VpcId:        pulumi.String("vpc-xxxxx"),
    			SubnetId:     pulumi.String("subnet-xxxxx"),
    			Tags: pulumi.StringMap{
    				"tag_key":   pulumi.String("rocketmq"),
    				"tag_value": pulumi.String("5.x"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewTrocketRocketmqTopic(ctx, "rocketmqTopic", &tencentcloud.TrocketRocketmqTopicArgs{
    			InstanceId: rocketmqInstance.TrocketRocketmqInstanceId,
    			Topic:      pulumi.String("test_topic"),
    			TopicType:  pulumi.String("NORMAL"),
    			QueueNum:   pulumi.Float64(4),
    			Remark:     pulumi.String("test for terraform"),
    		})
    		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 rocketmqInstance = new Tencentcloud.TrocketRocketmqInstance("rocketmqInstance", new()
        {
            InstanceType = "EXPERIMENT",
            SkuCode = "experiment_500",
            Remark = "test",
            VpcId = "vpc-xxxxx",
            SubnetId = "subnet-xxxxx",
            Tags = 
            {
                { "tag_key", "rocketmq" },
                { "tag_value", "5.x" },
            },
        });
    
        var rocketmqTopic = new Tencentcloud.TrocketRocketmqTopic("rocketmqTopic", new()
        {
            InstanceId = rocketmqInstance.TrocketRocketmqInstanceId,
            Topic = "test_topic",
            TopicType = "NORMAL",
            QueueNum = 4,
            Remark = "test for terraform",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TrocketRocketmqInstance;
    import com.pulumi.tencentcloud.TrocketRocketmqInstanceArgs;
    import com.pulumi.tencentcloud.TrocketRocketmqTopic;
    import com.pulumi.tencentcloud.TrocketRocketmqTopicArgs;
    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 rocketmqInstance = new TrocketRocketmqInstance("rocketmqInstance", TrocketRocketmqInstanceArgs.builder()
                .instanceType("EXPERIMENT")
                .skuCode("experiment_500")
                .remark("test")
                .vpcId("vpc-xxxxx")
                .subnetId("subnet-xxxxx")
                .tags(Map.ofEntries(
                    Map.entry("tag_key", "rocketmq"),
                    Map.entry("tag_value", "5.x")
                ))
                .build());
    
            var rocketmqTopic = new TrocketRocketmqTopic("rocketmqTopic", TrocketRocketmqTopicArgs.builder()
                .instanceId(rocketmqInstance.trocketRocketmqInstanceId())
                .topic("test_topic")
                .topicType("NORMAL")
                .queueNum(4)
                .remark("test for terraform")
                .build());
    
        }
    }
    
    resources:
      rocketmqInstance:
        type: tencentcloud:TrocketRocketmqInstance
        properties:
          instanceType: EXPERIMENT
          skuCode: experiment_500
          remark: test
          vpcId: vpc-xxxxx
          subnetId: subnet-xxxxx
          tags:
            tag_key: rocketmq
            tag_value: 5.x
      rocketmqTopic:
        type: tencentcloud:TrocketRocketmqTopic
        properties:
          instanceId: ${rocketmqInstance.trocketRocketmqInstanceId}
          topic: test_topic
          topicType: NORMAL
          queueNum: 4
          remark: test for terraform
    

    Create TrocketRocketmqTopic Resource

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

    Constructor syntax

    new TrocketRocketmqTopic(name: string, args: TrocketRocketmqTopicArgs, opts?: CustomResourceOptions);
    @overload
    def TrocketRocketmqTopic(resource_name: str,
                             args: TrocketRocketmqTopicArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def TrocketRocketmqTopic(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             instance_id: Optional[str] = None,
                             queue_num: Optional[float] = None,
                             topic: Optional[str] = None,
                             topic_type: Optional[str] = None,
                             remark: Optional[str] = None,
                             trocket_rocketmq_topic_id: Optional[str] = None)
    func NewTrocketRocketmqTopic(ctx *Context, name string, args TrocketRocketmqTopicArgs, opts ...ResourceOption) (*TrocketRocketmqTopic, error)
    public TrocketRocketmqTopic(string name, TrocketRocketmqTopicArgs args, CustomResourceOptions? opts = null)
    public TrocketRocketmqTopic(String name, TrocketRocketmqTopicArgs args)
    public TrocketRocketmqTopic(String name, TrocketRocketmqTopicArgs args, CustomResourceOptions options)
    
    type: tencentcloud:TrocketRocketmqTopic
    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 TrocketRocketmqTopicArgs
    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 TrocketRocketmqTopicArgs
    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 TrocketRocketmqTopicArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TrocketRocketmqTopicArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TrocketRocketmqTopicArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    TrocketRocketmqTopic 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 TrocketRocketmqTopic resource accepts the following input properties:

    InstanceId string
    Instance Id.
    QueueNum double
    Number of queue. Must be greater than or equal to 3.
    Topic string
    topic.
    TopicType string
    Topic type. UNSPECIFIED: not specified, NORMAL: normal message, FIFO: sequential message, DELAY: delayed message.
    Remark string
    remark.
    TrocketRocketmqTopicId string
    ID of the resource.
    InstanceId string
    Instance Id.
    QueueNum float64
    Number of queue. Must be greater than or equal to 3.
    Topic string
    topic.
    TopicType string
    Topic type. UNSPECIFIED: not specified, NORMAL: normal message, FIFO: sequential message, DELAY: delayed message.
    Remark string
    remark.
    TrocketRocketmqTopicId string
    ID of the resource.
    instanceId String
    Instance Id.
    queueNum Double
    Number of queue. Must be greater than or equal to 3.
    topic String
    topic.
    topicType String
    Topic type. UNSPECIFIED: not specified, NORMAL: normal message, FIFO: sequential message, DELAY: delayed message.
    remark String
    remark.
    trocketRocketmqTopicId String
    ID of the resource.
    instanceId string
    Instance Id.
    queueNum number
    Number of queue. Must be greater than or equal to 3.
    topic string
    topic.
    topicType string
    Topic type. UNSPECIFIED: not specified, NORMAL: normal message, FIFO: sequential message, DELAY: delayed message.
    remark string
    remark.
    trocketRocketmqTopicId string
    ID of the resource.
    instance_id str
    Instance Id.
    queue_num float
    Number of queue. Must be greater than or equal to 3.
    topic str
    topic.
    topic_type str
    Topic type. UNSPECIFIED: not specified, NORMAL: normal message, FIFO: sequential message, DELAY: delayed message.
    remark str
    remark.
    trocket_rocketmq_topic_id str
    ID of the resource.
    instanceId String
    Instance Id.
    queueNum Number
    Number of queue. Must be greater than or equal to 3.
    topic String
    topic.
    topicType String
    Topic type. UNSPECIFIED: not specified, NORMAL: normal message, FIFO: sequential message, DELAY: delayed message.
    remark String
    remark.
    trocketRocketmqTopicId String
    ID of the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the TrocketRocketmqTopic 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 TrocketRocketmqTopic Resource

    Get an existing TrocketRocketmqTopic 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?: TrocketRocketmqTopicState, opts?: CustomResourceOptions): TrocketRocketmqTopic
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            instance_id: Optional[str] = None,
            queue_num: Optional[float] = None,
            remark: Optional[str] = None,
            topic: Optional[str] = None,
            topic_type: Optional[str] = None,
            trocket_rocketmq_topic_id: Optional[str] = None) -> TrocketRocketmqTopic
    func GetTrocketRocketmqTopic(ctx *Context, name string, id IDInput, state *TrocketRocketmqTopicState, opts ...ResourceOption) (*TrocketRocketmqTopic, error)
    public static TrocketRocketmqTopic Get(string name, Input<string> id, TrocketRocketmqTopicState? state, CustomResourceOptions? opts = null)
    public static TrocketRocketmqTopic get(String name, Output<String> id, TrocketRocketmqTopicState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:TrocketRocketmqTopic    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:
    InstanceId string
    Instance Id.
    QueueNum double
    Number of queue. Must be greater than or equal to 3.
    Remark string
    remark.
    Topic string
    topic.
    TopicType string
    Topic type. UNSPECIFIED: not specified, NORMAL: normal message, FIFO: sequential message, DELAY: delayed message.
    TrocketRocketmqTopicId string
    ID of the resource.
    InstanceId string
    Instance Id.
    QueueNum float64
    Number of queue. Must be greater than or equal to 3.
    Remark string
    remark.
    Topic string
    topic.
    TopicType string
    Topic type. UNSPECIFIED: not specified, NORMAL: normal message, FIFO: sequential message, DELAY: delayed message.
    TrocketRocketmqTopicId string
    ID of the resource.
    instanceId String
    Instance Id.
    queueNum Double
    Number of queue. Must be greater than or equal to 3.
    remark String
    remark.
    topic String
    topic.
    topicType String
    Topic type. UNSPECIFIED: not specified, NORMAL: normal message, FIFO: sequential message, DELAY: delayed message.
    trocketRocketmqTopicId String
    ID of the resource.
    instanceId string
    Instance Id.
    queueNum number
    Number of queue. Must be greater than or equal to 3.
    remark string
    remark.
    topic string
    topic.
    topicType string
    Topic type. UNSPECIFIED: not specified, NORMAL: normal message, FIFO: sequential message, DELAY: delayed message.
    trocketRocketmqTopicId string
    ID of the resource.
    instance_id str
    Instance Id.
    queue_num float
    Number of queue. Must be greater than or equal to 3.
    remark str
    remark.
    topic str
    topic.
    topic_type str
    Topic type. UNSPECIFIED: not specified, NORMAL: normal message, FIFO: sequential message, DELAY: delayed message.
    trocket_rocketmq_topic_id str
    ID of the resource.
    instanceId String
    Instance Id.
    queueNum Number
    Number of queue. Must be greater than or equal to 3.
    remark String
    remark.
    topic String
    topic.
    topicType String
    Topic type. UNSPECIFIED: not specified, NORMAL: normal message, FIFO: sequential message, DELAY: delayed message.
    trocketRocketmqTopicId String
    ID of the resource.

    Import

    trocket rocketmq_topic can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/trocketRocketmqTopic:TrocketRocketmqTopic rocketmq_topic instanceId#topic
    

    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