tencentcloud.TdmqTopicWithFullId
Explore with Pulumi AI
Provide a resource to create a TDMQ topic with full id.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const exampleTdmqInstance = new tencentcloud.TdmqInstance("exampleTdmqInstance", {
clusterName: "tf_example",
remark: "remark.",
tags: {
createdBy: "terraform",
},
});
const exampleTdmqNamespace = new tencentcloud.TdmqNamespace("exampleTdmqNamespace", {
environName: "tf_example",
msgTtl: 300,
clusterId: exampleTdmqInstance.tdmqInstanceId,
retentionPolicy: {
timeInMinutes: 60,
sizeInMb: 10,
},
remark: "remark.",
});
const exampleTdmqTopicWithFullId = new tencentcloud.TdmqTopicWithFullId("exampleTdmqTopicWithFullId", {
environId: exampleTdmqNamespace.environName,
clusterId: exampleTdmqInstance.tdmqInstanceId,
topicName: "tf-example-topic",
partitions: 6,
pulsarTopicType: 3,
remark: "remark.",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example_tdmq_instance = tencentcloud.TdmqInstance("exampleTdmqInstance",
cluster_name="tf_example",
remark="remark.",
tags={
"createdBy": "terraform",
})
example_tdmq_namespace = tencentcloud.TdmqNamespace("exampleTdmqNamespace",
environ_name="tf_example",
msg_ttl=300,
cluster_id=example_tdmq_instance.tdmq_instance_id,
retention_policy={
"time_in_minutes": 60,
"size_in_mb": 10,
},
remark="remark.")
example_tdmq_topic_with_full_id = tencentcloud.TdmqTopicWithFullId("exampleTdmqTopicWithFullId",
environ_id=example_tdmq_namespace.environ_name,
cluster_id=example_tdmq_instance.tdmq_instance_id,
topic_name="tf-example-topic",
partitions=6,
pulsar_topic_type=3,
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 {
exampleTdmqInstance, err := tencentcloud.NewTdmqInstance(ctx, "exampleTdmqInstance", &tencentcloud.TdmqInstanceArgs{
ClusterName: pulumi.String("tf_example"),
Remark: pulumi.String("remark."),
Tags: pulumi.StringMap{
"createdBy": pulumi.String("terraform"),
},
})
if err != nil {
return err
}
exampleTdmqNamespace, err := tencentcloud.NewTdmqNamespace(ctx, "exampleTdmqNamespace", &tencentcloud.TdmqNamespaceArgs{
EnvironName: pulumi.String("tf_example"),
MsgTtl: pulumi.Float64(300),
ClusterId: exampleTdmqInstance.TdmqInstanceId,
RetentionPolicy: &tencentcloud.TdmqNamespaceRetentionPolicyArgs{
TimeInMinutes: pulumi.Float64(60),
SizeInMb: pulumi.Float64(10),
},
Remark: pulumi.String("remark."),
})
if err != nil {
return err
}
_, err = tencentcloud.NewTdmqTopicWithFullId(ctx, "exampleTdmqTopicWithFullId", &tencentcloud.TdmqTopicWithFullIdArgs{
EnvironId: exampleTdmqNamespace.EnvironName,
ClusterId: exampleTdmqInstance.TdmqInstanceId,
TopicName: pulumi.String("tf-example-topic"),
Partitions: pulumi.Float64(6),
PulsarTopicType: pulumi.Float64(3),
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 exampleTdmqInstance = new Tencentcloud.TdmqInstance("exampleTdmqInstance", new()
{
ClusterName = "tf_example",
Remark = "remark.",
Tags =
{
{ "createdBy", "terraform" },
},
});
var exampleTdmqNamespace = new Tencentcloud.TdmqNamespace("exampleTdmqNamespace", new()
{
EnvironName = "tf_example",
MsgTtl = 300,
ClusterId = exampleTdmqInstance.TdmqInstanceId,
RetentionPolicy = new Tencentcloud.Inputs.TdmqNamespaceRetentionPolicyArgs
{
TimeInMinutes = 60,
SizeInMb = 10,
},
Remark = "remark.",
});
var exampleTdmqTopicWithFullId = new Tencentcloud.TdmqTopicWithFullId("exampleTdmqTopicWithFullId", new()
{
EnvironId = exampleTdmqNamespace.EnvironName,
ClusterId = exampleTdmqInstance.TdmqInstanceId,
TopicName = "tf-example-topic",
Partitions = 6,
PulsarTopicType = 3,
Remark = "remark.",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TdmqInstance;
import com.pulumi.tencentcloud.TdmqInstanceArgs;
import com.pulumi.tencentcloud.TdmqNamespace;
import com.pulumi.tencentcloud.TdmqNamespaceArgs;
import com.pulumi.tencentcloud.inputs.TdmqNamespaceRetentionPolicyArgs;
import com.pulumi.tencentcloud.TdmqTopicWithFullId;
import com.pulumi.tencentcloud.TdmqTopicWithFullIdArgs;
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 exampleTdmqInstance = new TdmqInstance("exampleTdmqInstance", TdmqInstanceArgs.builder()
.clusterName("tf_example")
.remark("remark.")
.tags(Map.of("createdBy", "terraform"))
.build());
var exampleTdmqNamespace = new TdmqNamespace("exampleTdmqNamespace", TdmqNamespaceArgs.builder()
.environName("tf_example")
.msgTtl(300)
.clusterId(exampleTdmqInstance.tdmqInstanceId())
.retentionPolicy(TdmqNamespaceRetentionPolicyArgs.builder()
.timeInMinutes(60)
.sizeInMb(10)
.build())
.remark("remark.")
.build());
var exampleTdmqTopicWithFullId = new TdmqTopicWithFullId("exampleTdmqTopicWithFullId", TdmqTopicWithFullIdArgs.builder()
.environId(exampleTdmqNamespace.environName())
.clusterId(exampleTdmqInstance.tdmqInstanceId())
.topicName("tf-example-topic")
.partitions(6)
.pulsarTopicType(3)
.remark("remark.")
.build());
}
}
resources:
exampleTdmqInstance:
type: tencentcloud:TdmqInstance
properties:
clusterName: tf_example
remark: remark.
tags:
createdBy: terraform
exampleTdmqNamespace:
type: tencentcloud:TdmqNamespace
properties:
environName: tf_example
msgTtl: 300
clusterId: ${exampleTdmqInstance.tdmqInstanceId}
retentionPolicy:
timeInMinutes: 60
sizeInMb: 10
remark: remark.
exampleTdmqTopicWithFullId:
type: tencentcloud:TdmqTopicWithFullId
properties:
environId: ${exampleTdmqNamespace.environName}
clusterId: ${exampleTdmqInstance.tdmqInstanceId}
topicName: tf-example-topic
partitions: 6
pulsarTopicType: 3
remark: remark.
Create TdmqTopicWithFullId Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TdmqTopicWithFullId(name: string, args: TdmqTopicWithFullIdArgs, opts?: CustomResourceOptions);
@overload
def TdmqTopicWithFullId(resource_name: str,
args: TdmqTopicWithFullIdArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TdmqTopicWithFullId(resource_name: str,
opts: Optional[ResourceOptions] = None,
cluster_id: Optional[str] = None,
environ_id: Optional[str] = None,
partitions: Optional[float] = None,
topic_name: Optional[str] = None,
pulsar_topic_type: Optional[float] = None,
remark: Optional[str] = None,
tdmq_topic_with_full_id_id: Optional[str] = None,
topic_type: Optional[float] = None)
func NewTdmqTopicWithFullId(ctx *Context, name string, args TdmqTopicWithFullIdArgs, opts ...ResourceOption) (*TdmqTopicWithFullId, error)
public TdmqTopicWithFullId(string name, TdmqTopicWithFullIdArgs args, CustomResourceOptions? opts = null)
public TdmqTopicWithFullId(String name, TdmqTopicWithFullIdArgs args)
public TdmqTopicWithFullId(String name, TdmqTopicWithFullIdArgs args, CustomResourceOptions options)
type: tencentcloud:TdmqTopicWithFullId
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 TdmqTopicWithFullIdArgs
- 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 TdmqTopicWithFullIdArgs
- 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 TdmqTopicWithFullIdArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TdmqTopicWithFullIdArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TdmqTopicWithFullIdArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TdmqTopicWithFullId 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 TdmqTopicWithFullId resource accepts the following input properties:
- Cluster
Id string - The Dedicated Cluster Id.
- Environ
Id string - The name of tdmq namespace.
- Partitions double
- The partitions of topic.
- Topic
Name string - The name of topic to be created.
- Pulsar
Topic doubleType - Pulsar Topic Type 0: Non-persistent non-partitioned 1: Non-persistent partitioned 2: Persistent non-partitioned 3: Persistent partitioned.
- Remark string
- Description of the namespace.
- Tdmq
Topic stringWith Full Id Id - ID of the resource.
- Topic
Type double - This input will be gradually discarded and can be switched to PulsarTopicType parameter 0: Normal message; 1: Global sequential messages; 2: Local sequential messages; 3: Retrying queue; 4: Dead letter queue. The type of topic.
- Cluster
Id string - The Dedicated Cluster Id.
- Environ
Id string - The name of tdmq namespace.
- Partitions float64
- The partitions of topic.
- Topic
Name string - The name of topic to be created.
- Pulsar
Topic float64Type - Pulsar Topic Type 0: Non-persistent non-partitioned 1: Non-persistent partitioned 2: Persistent non-partitioned 3: Persistent partitioned.
- Remark string
- Description of the namespace.
- Tdmq
Topic stringWith Full Id Id - ID of the resource.
- Topic
Type float64 - This input will be gradually discarded and can be switched to PulsarTopicType parameter 0: Normal message; 1: Global sequential messages; 2: Local sequential messages; 3: Retrying queue; 4: Dead letter queue. The type of topic.
- cluster
Id String - The Dedicated Cluster Id.
- environ
Id String - The name of tdmq namespace.
- partitions Double
- The partitions of topic.
- topic
Name String - The name of topic to be created.
- pulsar
Topic DoubleType - Pulsar Topic Type 0: Non-persistent non-partitioned 1: Non-persistent partitioned 2: Persistent non-partitioned 3: Persistent partitioned.
- remark String
- Description of the namespace.
- tdmq
Topic StringWith Full Id Id - ID of the resource.
- topic
Type Double - This input will be gradually discarded and can be switched to PulsarTopicType parameter 0: Normal message; 1: Global sequential messages; 2: Local sequential messages; 3: Retrying queue; 4: Dead letter queue. The type of topic.
- cluster
Id string - The Dedicated Cluster Id.
- environ
Id string - The name of tdmq namespace.
- partitions number
- The partitions of topic.
- topic
Name string - The name of topic to be created.
- pulsar
Topic numberType - Pulsar Topic Type 0: Non-persistent non-partitioned 1: Non-persistent partitioned 2: Persistent non-partitioned 3: Persistent partitioned.
- remark string
- Description of the namespace.
- tdmq
Topic stringWith Full Id Id - ID of the resource.
- topic
Type number - This input will be gradually discarded and can be switched to PulsarTopicType parameter 0: Normal message; 1: Global sequential messages; 2: Local sequential messages; 3: Retrying queue; 4: Dead letter queue. The type of topic.
- cluster_
id str - The Dedicated Cluster Id.
- environ_
id str - The name of tdmq namespace.
- partitions float
- The partitions of topic.
- topic_
name str - The name of topic to be created.
- pulsar_
topic_ floattype - Pulsar Topic Type 0: Non-persistent non-partitioned 1: Non-persistent partitioned 2: Persistent non-partitioned 3: Persistent partitioned.
- remark str
- Description of the namespace.
- tdmq_
topic_ strwith_ full_ id_ id - ID of the resource.
- topic_
type float - This input will be gradually discarded and can be switched to PulsarTopicType parameter 0: Normal message; 1: Global sequential messages; 2: Local sequential messages; 3: Retrying queue; 4: Dead letter queue. The type of topic.
- cluster
Id String - The Dedicated Cluster Id.
- environ
Id String - The name of tdmq namespace.
- partitions Number
- The partitions of topic.
- topic
Name String - The name of topic to be created.
- pulsar
Topic NumberType - Pulsar Topic Type 0: Non-persistent non-partitioned 1: Non-persistent partitioned 2: Persistent non-partitioned 3: Persistent partitioned.
- remark String
- Description of the namespace.
- tdmq
Topic StringWith Full Id Id - ID of the resource.
- topic
Type Number - This input will be gradually discarded and can be switched to PulsarTopicType parameter 0: Normal message; 1: Global sequential messages; 2: Local sequential messages; 3: Retrying queue; 4: Dead letter queue. The type of topic.
Outputs
All input properties are implicitly available as output properties. Additionally, the TdmqTopicWithFullId resource produces the following output properties:
- Create
Time string - Creation time of resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Create
Time string - Creation time of resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- create
Time String - Creation time of resource.
- id String
- The provider-assigned unique ID for this managed resource.
- create
Time string - Creation time of resource.
- id string
- The provider-assigned unique ID for this managed resource.
- create_
time str - Creation time of resource.
- id str
- The provider-assigned unique ID for this managed resource.
- create
Time String - Creation time of resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing TdmqTopicWithFullId Resource
Get an existing TdmqTopicWithFullId 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?: TdmqTopicWithFullIdState, opts?: CustomResourceOptions): TdmqTopicWithFullId
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cluster_id: Optional[str] = None,
create_time: Optional[str] = None,
environ_id: Optional[str] = None,
partitions: Optional[float] = None,
pulsar_topic_type: Optional[float] = None,
remark: Optional[str] = None,
tdmq_topic_with_full_id_id: Optional[str] = None,
topic_name: Optional[str] = None,
topic_type: Optional[float] = None) -> TdmqTopicWithFullId
func GetTdmqTopicWithFullId(ctx *Context, name string, id IDInput, state *TdmqTopicWithFullIdState, opts ...ResourceOption) (*TdmqTopicWithFullId, error)
public static TdmqTopicWithFullId Get(string name, Input<string> id, TdmqTopicWithFullIdState? state, CustomResourceOptions? opts = null)
public static TdmqTopicWithFullId get(String name, Output<String> id, TdmqTopicWithFullIdState state, CustomResourceOptions options)
resources: _: type: tencentcloud:TdmqTopicWithFullId 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 - The Dedicated Cluster Id.
- Create
Time string - Creation time of resource.
- Environ
Id string - The name of tdmq namespace.
- Partitions double
- The partitions of topic.
- Pulsar
Topic doubleType - Pulsar Topic Type 0: Non-persistent non-partitioned 1: Non-persistent partitioned 2: Persistent non-partitioned 3: Persistent partitioned.
- Remark string
- Description of the namespace.
- Tdmq
Topic stringWith Full Id Id - ID of the resource.
- Topic
Name string - The name of topic to be created.
- Topic
Type double - This input will be gradually discarded and can be switched to PulsarTopicType parameter 0: Normal message; 1: Global sequential messages; 2: Local sequential messages; 3: Retrying queue; 4: Dead letter queue. The type of topic.
- Cluster
Id string - The Dedicated Cluster Id.
- Create
Time string - Creation time of resource.
- Environ
Id string - The name of tdmq namespace.
- Partitions float64
- The partitions of topic.
- Pulsar
Topic float64Type - Pulsar Topic Type 0: Non-persistent non-partitioned 1: Non-persistent partitioned 2: Persistent non-partitioned 3: Persistent partitioned.
- Remark string
- Description of the namespace.
- Tdmq
Topic stringWith Full Id Id - ID of the resource.
- Topic
Name string - The name of topic to be created.
- Topic
Type float64 - This input will be gradually discarded and can be switched to PulsarTopicType parameter 0: Normal message; 1: Global sequential messages; 2: Local sequential messages; 3: Retrying queue; 4: Dead letter queue. The type of topic.
- cluster
Id String - The Dedicated Cluster Id.
- create
Time String - Creation time of resource.
- environ
Id String - The name of tdmq namespace.
- partitions Double
- The partitions of topic.
- pulsar
Topic DoubleType - Pulsar Topic Type 0: Non-persistent non-partitioned 1: Non-persistent partitioned 2: Persistent non-partitioned 3: Persistent partitioned.
- remark String
- Description of the namespace.
- tdmq
Topic StringWith Full Id Id - ID of the resource.
- topic
Name String - The name of topic to be created.
- topic
Type Double - This input will be gradually discarded and can be switched to PulsarTopicType parameter 0: Normal message; 1: Global sequential messages; 2: Local sequential messages; 3: Retrying queue; 4: Dead letter queue. The type of topic.
- cluster
Id string - The Dedicated Cluster Id.
- create
Time string - Creation time of resource.
- environ
Id string - The name of tdmq namespace.
- partitions number
- The partitions of topic.
- pulsar
Topic numberType - Pulsar Topic Type 0: Non-persistent non-partitioned 1: Non-persistent partitioned 2: Persistent non-partitioned 3: Persistent partitioned.
- remark string
- Description of the namespace.
- tdmq
Topic stringWith Full Id Id - ID of the resource.
- topic
Name string - The name of topic to be created.
- topic
Type number - This input will be gradually discarded and can be switched to PulsarTopicType parameter 0: Normal message; 1: Global sequential messages; 2: Local sequential messages; 3: Retrying queue; 4: Dead letter queue. The type of topic.
- cluster_
id str - The Dedicated Cluster Id.
- create_
time str - Creation time of resource.
- environ_
id str - The name of tdmq namespace.
- partitions float
- The partitions of topic.
- pulsar_
topic_ floattype - Pulsar Topic Type 0: Non-persistent non-partitioned 1: Non-persistent partitioned 2: Persistent non-partitioned 3: Persistent partitioned.
- remark str
- Description of the namespace.
- tdmq_
topic_ strwith_ full_ id_ id - ID of the resource.
- topic_
name str - The name of topic to be created.
- topic_
type float - This input will be gradually discarded and can be switched to PulsarTopicType parameter 0: Normal message; 1: Global sequential messages; 2: Local sequential messages; 3: Retrying queue; 4: Dead letter queue. The type of topic.
- cluster
Id String - The Dedicated Cluster Id.
- create
Time String - Creation time of resource.
- environ
Id String - The name of tdmq namespace.
- partitions Number
- The partitions of topic.
- pulsar
Topic NumberType - Pulsar Topic Type 0: Non-persistent non-partitioned 1: Non-persistent partitioned 2: Persistent non-partitioned 3: Persistent partitioned.
- remark String
- Description of the namespace.
- tdmq
Topic StringWith Full Id Id - ID of the resource.
- topic
Name String - The name of topic to be created.
- topic
Type Number - This input will be gradually discarded and can be switched to PulsarTopicType parameter 0: Normal message; 1: Global sequential messages; 2: Local sequential messages; 3: Retrying queue; 4: Dead letter queue. The type of topic.
Import
Tdmq Topic can be imported, e.g.
$ pulumi import tencentcloud:index/tdmqTopicWithFullId:TdmqTopicWithFullId test ${cluster_id}#${environ_id}#${topic_name}
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.