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:
- Cluster
Id string - Cluster ID.
- Namespace
Name string - Topic namespace. Currently, you can create topics only in one single namespace.
- Topic
Name string - Topic name, which can contain 3-64 letters, digits, hyphens, and underscores.
- Type string
- Topic type. Valid values: Normal, GlobalOrder, PartitionedOrder.
- Partition
Num double - Number of partitions.
- Remark string
- Topic remarks (up to 128 characters).
- Tdmq
Rocketmq stringTopic Id - ID of the resource.
- Cluster
Id string - Cluster ID.
- Namespace
Name string - Topic namespace. Currently, you can create topics only in one single namespace.
- Topic
Name string - Topic name, which can contain 3-64 letters, digits, hyphens, and underscores.
- Type string
- Topic type. Valid values: Normal, GlobalOrder, PartitionedOrder.
- Partition
Num float64 - Number of partitions.
- Remark string
- Topic remarks (up to 128 characters).
- Tdmq
Rocketmq stringTopic Id - ID of the resource.
- cluster
Id String - Cluster ID.
- namespace
Name String - Topic namespace. Currently, you can create topics only in one single namespace.
- topic
Name String - Topic name, which can contain 3-64 letters, digits, hyphens, and underscores.
- type String
- Topic type. Valid values: Normal, GlobalOrder, PartitionedOrder.
- partition
Num Double - Number of partitions.
- remark String
- Topic remarks (up to 128 characters).
- tdmq
Rocketmq StringTopic Id - ID of the resource.
- cluster
Id string - Cluster ID.
- namespace
Name string - Topic namespace. Currently, you can create topics only in one single namespace.
- topic
Name string - Topic name, which can contain 3-64 letters, digits, hyphens, and underscores.
- type string
- Topic type. Valid values: Normal, GlobalOrder, PartitionedOrder.
- partition
Num number - Number of partitions.
- remark string
- Topic remarks (up to 128 characters).
- tdmq
Rocketmq 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.
- cluster
Id String - Cluster ID.
- namespace
Name String - Topic namespace. Currently, you can create topics only in one single namespace.
- topic
Name String - Topic name, which can contain 3-64 letters, digits, hyphens, and underscores.
- type String
- Topic type. Valid values: Normal, GlobalOrder, PartitionedOrder.
- partition
Num Number - Number of partitions.
- remark String
- Topic remarks (up to 128 characters).
- tdmq
Rocketmq 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:
- Create
Time double - Creation time in milliseconds.
- Id string
- The provider-assigned unique ID for this managed resource.
- Update
Time double - Update time in milliseconds.
- Create
Time float64 - Creation time in milliseconds.
- Id string
- The provider-assigned unique ID for this managed resource.
- Update
Time float64 - Update time in milliseconds.
- create
Time Double - Creation time in milliseconds.
- id String
- The provider-assigned unique ID for this managed resource.
- update
Time Double - Update time in milliseconds.
- create
Time number - Creation time in milliseconds.
- id string
- The provider-assigned unique ID for this managed resource.
- update
Time 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.
- create
Time Number - Creation time in milliseconds.
- id String
- The provider-assigned unique ID for this managed resource.
- update
Time 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) -> TdmqRocketmqTopic
func 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.
- Cluster
Id string - Cluster ID.
- Create
Time double - Creation time in milliseconds.
- Namespace
Name string - Topic namespace. Currently, you can create topics only in one single namespace.
- Partition
Num double - Number of partitions.
- Remark string
- Topic remarks (up to 128 characters).
- Tdmq
Rocketmq stringTopic Id - ID of the resource.
- Topic
Name string - Topic name, which can contain 3-64 letters, digits, hyphens, and underscores.
- Type string
- Topic type. Valid values: Normal, GlobalOrder, PartitionedOrder.
- Update
Time double - Update time in milliseconds.
- Cluster
Id string - Cluster ID.
- Create
Time float64 - Creation time in milliseconds.
- Namespace
Name string - Topic namespace. Currently, you can create topics only in one single namespace.
- Partition
Num float64 - Number of partitions.
- Remark string
- Topic remarks (up to 128 characters).
- Tdmq
Rocketmq stringTopic Id - ID of the resource.
- Topic
Name string - Topic name, which can contain 3-64 letters, digits, hyphens, and underscores.
- Type string
- Topic type. Valid values: Normal, GlobalOrder, PartitionedOrder.
- Update
Time float64 - Update time in milliseconds.
- cluster
Id String - Cluster ID.
- create
Time Double - Creation time in milliseconds.
- namespace
Name String - Topic namespace. Currently, you can create topics only in one single namespace.
- partition
Num Double - Number of partitions.
- remark String
- Topic remarks (up to 128 characters).
- tdmq
Rocketmq StringTopic Id - ID of the resource.
- topic
Name String - Topic name, which can contain 3-64 letters, digits, hyphens, and underscores.
- type String
- Topic type. Valid values: Normal, GlobalOrder, PartitionedOrder.
- update
Time Double - Update time in milliseconds.
- cluster
Id string - Cluster ID.
- create
Time number - Creation time in milliseconds.
- namespace
Name string - Topic namespace. Currently, you can create topics only in one single namespace.
- partition
Num number - Number of partitions.
- remark string
- Topic remarks (up to 128 characters).
- tdmq
Rocketmq stringTopic Id - ID of the resource.
- topic
Name string - Topic name, which can contain 3-64 letters, digits, hyphens, and underscores.
- type string
- Topic type. Valid values: Normal, GlobalOrder, PartitionedOrder.
- update
Time 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.
- cluster
Id String - Cluster ID.
- create
Time Number - Creation time in milliseconds.
- namespace
Name String - Topic namespace. Currently, you can create topics only in one single namespace.
- partition
Num Number - Number of partitions.
- remark String
- Topic remarks (up to 128 characters).
- tdmq
Rocketmq StringTopic Id - ID of the resource.
- topic
Name String - Topic name, which can contain 3-64 letters, digits, hyphens, and underscores.
- type String
- Topic type. Valid values: Normal, GlobalOrder, PartitionedOrder.
- update
Time 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
tencentcloud
Terraform Provider.