tencentcloud.TdmqRocketmqTopic
Explore with Pulumi AI
Provides a resource to create a 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_namespace",
    remark: "remark.",
});
const exampleTdmqRocketmqTopic = new tencentcloud.TdmqRocketmqTopic("exampleTdmqRocketmqTopic", {
    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_namespace",
    remark="remark.")
example_tdmq_rocketmq_topic = tencentcloud.TdmqRocketmqTopic("exampleTdmqRocketmqTopic",
    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_namespace"),
			Remark:        pulumi.String("remark."),
		})
		if err != nil {
			return err
		}
		_, err = tencentcloud.NewTdmqRocketmqTopic(ctx, "exampleTdmqRocketmqTopic", &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_namespace",
        Remark = "remark.",
    });
    var exampleTdmqRocketmqTopic = new Tencentcloud.TdmqRocketmqTopic("exampleTdmqRocketmqTopic", 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.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_namespace")
            .remark("remark.")
            .build());
        var exampleTdmqRocketmqTopic = new TdmqRocketmqTopic("exampleTdmqRocketmqTopic", TdmqRocketmqTopicArgs.builder()
            .topicName("tf_example")
            .namespaceName(exampleTdmqRocketmqNamespace.namespaceName())
            .clusterId(exampleTdmqRocketmqCluster.clusterId())
            .type("Normal")
            .remark("remark.")
            .build());
    }
}
resources:
  exampleTdmqRocketmqCluster:
    type: tencentcloud:TdmqRocketmqCluster
    properties:
      clusterName: tf_example
      remark: remark.
  exampleTdmqRocketmqNamespace:
    type: tencentcloud:TdmqRocketmqNamespace
    properties:
      clusterId: ${exampleTdmqRocketmqCluster.clusterId}
      namespaceName: tf_example_namespace
      remark: remark.
  exampleTdmqRocketmqTopic:
    type: tencentcloud:TdmqRocketmqTopic
    properties:
      topicName: tf_example
      namespaceName: ${exampleTdmqRocketmqNamespace.namespaceName}
      clusterId: ${exampleTdmqRocketmqCluster.clusterId}
      type: Normal
      remark: remark.
Create TdmqRocketmqTopic Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TdmqRocketmqTopic(name: string, args: TdmqRocketmqTopicArgs, opts?: CustomResourceOptions);@overload
def TdmqRocketmqTopic(resource_name: str,
                      args: TdmqRocketmqTopicArgs,
                      opts: Optional[ResourceOptions] = None)
@overload
def TdmqRocketmqTopic(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      cluster_id: Optional[str] = None,
                      namespace_name: Optional[str] = None,
                      topic_name: Optional[str] = None,
                      type: Optional[str] = None,
                      partition_num: Optional[float] = None,
                      remark: Optional[str] = None,
                      tdmq_rocketmq_topic_id: Optional[str] = None)func NewTdmqRocketmqTopic(ctx *Context, name string, args TdmqRocketmqTopicArgs, opts ...ResourceOption) (*TdmqRocketmqTopic, error)public TdmqRocketmqTopic(string name, TdmqRocketmqTopicArgs args, CustomResourceOptions? opts = null)
public TdmqRocketmqTopic(String name, TdmqRocketmqTopicArgs args)
public TdmqRocketmqTopic(String name, TdmqRocketmqTopicArgs args, CustomResourceOptions options)
type: tencentcloud:TdmqRocketmqTopic
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 TdmqRocketmqTopicArgs
- 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 TdmqRocketmqTopicArgs
- 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 TdmqRocketmqTopicArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TdmqRocketmqTopicArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TdmqRocketmqTopicArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TdmqRocketmqTopic 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 TdmqRocketmqTopic resource accepts the following input properties:
- ClusterId string
- Cluster ID.
- NamespaceName string
- Topic namespace. Currently, you can create topics only in one single namespace.
- TopicName string
- Topic name, which can contain 3-64 letters, digits, hyphens, and underscores.
- Type string
- Topic type. Valid values: Normal, GlobalOrder, PartitionedOrder.
- PartitionNum double
- Number of partitions.
- Remark string
- Topic remarks (up to 128 characters).
- TdmqRocketmq stringTopic Id 
- ID of the resource.
- ClusterId string
- Cluster ID.
- NamespaceName string
- Topic namespace. Currently, you can create topics only in one single namespace.
- TopicName string
- Topic name, which can contain 3-64 letters, digits, hyphens, and underscores.
- Type string
- Topic type. Valid values: Normal, GlobalOrder, PartitionedOrder.
- PartitionNum float64
- Number of partitions.
- Remark string
- Topic remarks (up to 128 characters).
- TdmqRocketmq stringTopic Id 
- ID of the resource.
- clusterId String
- Cluster ID.
- namespaceName String
- Topic namespace. Currently, you can create topics only in one single namespace.
- topicName String
- Topic name, which can contain 3-64 letters, digits, hyphens, and underscores.
- type String
- Topic type. Valid values: Normal, GlobalOrder, PartitionedOrder.
- partitionNum Double
- Number of partitions.
- remark String
- Topic remarks (up to 128 characters).
- tdmqRocketmq StringTopic Id 
- ID of the resource.
- clusterId string
- Cluster ID.
- namespaceName string
- Topic namespace. Currently, you can create topics only in one single namespace.
- topicName string
- Topic name, which can contain 3-64 letters, digits, hyphens, and underscores.
- type string
- Topic type. Valid values: Normal, GlobalOrder, PartitionedOrder.
- partitionNum number
- Number of partitions.
- remark string
- Topic remarks (up to 128 characters).
- tdmqRocketmq stringTopic Id 
- ID of the resource.
- cluster_id str
- Cluster ID.
- namespace_name str
- Topic namespace. Currently, you can create topics only in one single namespace.
- topic_name str
- Topic name, which can contain 3-64 letters, digits, hyphens, and underscores.
- type str
- Topic type. Valid values: Normal, GlobalOrder, PartitionedOrder.
- partition_num float
- Number of partitions.
- remark str
- Topic remarks (up to 128 characters).
- tdmq_rocketmq_ strtopic_ id 
- ID of the resource.
- clusterId String
- Cluster ID.
- namespaceName String
- Topic namespace. Currently, you can create topics only in one single namespace.
- topicName String
- Topic name, which can contain 3-64 letters, digits, hyphens, and underscores.
- type String
- Topic type. Valid values: Normal, GlobalOrder, PartitionedOrder.
- partitionNum Number
- Number of partitions.
- remark String
- Topic remarks (up to 128 characters).
- tdmqRocketmq StringTopic Id 
- ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the TdmqRocketmqTopic resource produces the following output properties:
- CreateTime double
- Creation time in milliseconds.
- Id string
- The provider-assigned unique ID for this managed resource.
- UpdateTime double
- Update time in milliseconds.
- CreateTime float64
- Creation time in milliseconds.
- Id string
- The provider-assigned unique ID for this managed resource.
- UpdateTime float64
- Update time in milliseconds.
- createTime Double
- Creation time in milliseconds.
- id String
- The provider-assigned unique ID for this managed resource.
- updateTime Double
- Update time in milliseconds.
- createTime number
- Creation time in milliseconds.
- id string
- The provider-assigned unique ID for this managed resource.
- updateTime number
- Update time in milliseconds.
- create_time float
- Creation time in milliseconds.
- id str
- The provider-assigned unique ID for this managed resource.
- update_time float
- Update time in milliseconds.
- createTime Number
- Creation time in milliseconds.
- id String
- The provider-assigned unique ID for this managed resource.
- updateTime Number
- Update time in milliseconds.
Look up Existing TdmqRocketmqTopic Resource
Get an existing TdmqRocketmqTopic 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?: TdmqRocketmqTopicState, opts?: CustomResourceOptions): TdmqRocketmqTopic@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cluster_id: Optional[str] = None,
        create_time: Optional[float] = None,
        namespace_name: Optional[str] = None,
        partition_num: Optional[float] = None,
        remark: Optional[str] = None,
        tdmq_rocketmq_topic_id: Optional[str] = None,
        topic_name: Optional[str] = None,
        type: Optional[str] = None,
        update_time: Optional[float] = None) -> TdmqRocketmqTopicfunc GetTdmqRocketmqTopic(ctx *Context, name string, id IDInput, state *TdmqRocketmqTopicState, opts ...ResourceOption) (*TdmqRocketmqTopic, error)public static TdmqRocketmqTopic Get(string name, Input<string> id, TdmqRocketmqTopicState? state, CustomResourceOptions? opts = null)public static TdmqRocketmqTopic get(String name, Output<String> id, TdmqRocketmqTopicState state, CustomResourceOptions options)resources:  _:    type: tencentcloud:TdmqRocketmqTopic    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.
- ClusterId string
- Cluster ID.
- CreateTime double
- Creation time in milliseconds.
- NamespaceName string
- Topic namespace. Currently, you can create topics only in one single namespace.
- PartitionNum double
- Number of partitions.
- Remark string
- Topic remarks (up to 128 characters).
- TdmqRocketmq stringTopic Id 
- ID of the resource.
- TopicName string
- Topic name, which can contain 3-64 letters, digits, hyphens, and underscores.
- Type string
- Topic type. Valid values: Normal, GlobalOrder, PartitionedOrder.
- UpdateTime double
- Update time in milliseconds.
- ClusterId string
- Cluster ID.
- CreateTime float64
- Creation time in milliseconds.
- NamespaceName string
- Topic namespace. Currently, you can create topics only in one single namespace.
- PartitionNum float64
- Number of partitions.
- Remark string
- Topic remarks (up to 128 characters).
- TdmqRocketmq stringTopic Id 
- ID of the resource.
- TopicName string
- Topic name, which can contain 3-64 letters, digits, hyphens, and underscores.
- Type string
- Topic type. Valid values: Normal, GlobalOrder, PartitionedOrder.
- UpdateTime float64
- Update time in milliseconds.
- clusterId String
- Cluster ID.
- createTime Double
- Creation time in milliseconds.
- namespaceName String
- Topic namespace. Currently, you can create topics only in one single namespace.
- partitionNum Double
- Number of partitions.
- remark String
- Topic remarks (up to 128 characters).
- tdmqRocketmq StringTopic Id 
- ID of the resource.
- topicName String
- Topic name, which can contain 3-64 letters, digits, hyphens, and underscores.
- type String
- Topic type. Valid values: Normal, GlobalOrder, PartitionedOrder.
- updateTime Double
- Update time in milliseconds.
- clusterId string
- Cluster ID.
- createTime number
- Creation time in milliseconds.
- namespaceName string
- Topic namespace. Currently, you can create topics only in one single namespace.
- partitionNum number
- Number of partitions.
- remark string
- Topic remarks (up to 128 characters).
- tdmqRocketmq stringTopic Id 
- ID of the resource.
- topicName string
- Topic name, which can contain 3-64 letters, digits, hyphens, and underscores.
- type string
- Topic type. Valid values: Normal, GlobalOrder, PartitionedOrder.
- updateTime number
- Update time in milliseconds.
- cluster_id str
- Cluster ID.
- create_time float
- Creation time in milliseconds.
- namespace_name str
- Topic namespace. Currently, you can create topics only in one single namespace.
- partition_num float
- Number of partitions.
- remark str
- Topic remarks (up to 128 characters).
- tdmq_rocketmq_ strtopic_ id 
- ID of the resource.
- topic_name str
- Topic name, which can contain 3-64 letters, digits, hyphens, and underscores.
- type str
- Topic type. Valid values: Normal, GlobalOrder, PartitionedOrder.
- update_time float
- Update time in milliseconds.
- clusterId String
- Cluster ID.
- createTime Number
- Creation time in milliseconds.
- namespaceName String
- Topic namespace. Currently, you can create topics only in one single namespace.
- partitionNum Number
- Number of partitions.
- remark String
- Topic remarks (up to 128 characters).
- tdmqRocketmq StringTopic Id 
- ID of the resource.
- topicName String
- Topic name, which can contain 3-64 letters, digits, hyphens, and underscores.
- type String
- Topic type. Valid values: Normal, GlobalOrder, PartitionedOrder.
- updateTime Number
- Update time in milliseconds.
Import
tdmqRocketmq topic can be imported using the id, e.g.
$ pulumi import tencentcloud:index/tdmqRocketmqTopic:TdmqRocketmqTopic 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 tencentcloudTerraform Provider.