tencentcloud.TrocketRocketmqTopic
Explore with Pulumi AI
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:
- Instance
Id string - Instance Id.
- Queue
Num double - Number of queue. Must be greater than or equal to 3.
- Topic string
- topic.
- Topic
Type string - Topic type.
UNSPECIFIED
: not specified,NORMAL
: normal message,FIFO
: sequential message,DELAY
: delayed message. - Remark string
- remark.
- Trocket
Rocketmq stringTopic Id - ID of the resource.
- Instance
Id string - Instance Id.
- Queue
Num float64 - Number of queue. Must be greater than or equal to 3.
- Topic string
- topic.
- Topic
Type string - Topic type.
UNSPECIFIED
: not specified,NORMAL
: normal message,FIFO
: sequential message,DELAY
: delayed message. - Remark string
- remark.
- Trocket
Rocketmq stringTopic Id - ID of the resource.
- instance
Id String - Instance Id.
- queue
Num Double - Number of queue. Must be greater than or equal to 3.
- topic String
- topic.
- topic
Type String - Topic type.
UNSPECIFIED
: not specified,NORMAL
: normal message,FIFO
: sequential message,DELAY
: delayed message. - remark String
- remark.
- trocket
Rocketmq StringTopic Id - ID of the resource.
- instance
Id string - Instance Id.
- queue
Num number - Number of queue. Must be greater than or equal to 3.
- topic string
- topic.
- topic
Type string - Topic type.
UNSPECIFIED
: not specified,NORMAL
: normal message,FIFO
: sequential message,DELAY
: delayed message. - remark string
- remark.
- trocket
Rocketmq stringTopic Id - 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_ strtopic_ id - ID of the resource.
- instance
Id String - Instance Id.
- queue
Num Number - Number of queue. Must be greater than or equal to 3.
- topic String
- topic.
- topic
Type String - Topic type.
UNSPECIFIED
: not specified,NORMAL
: normal message,FIFO
: sequential message,DELAY
: delayed message. - remark String
- remark.
- trocket
Rocketmq StringTopic Id - 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.
- Instance
Id string - Instance Id.
- Queue
Num double - Number of queue. Must be greater than or equal to 3.
- Remark string
- remark.
- Topic string
- topic.
- Topic
Type string - Topic type.
UNSPECIFIED
: not specified,NORMAL
: normal message,FIFO
: sequential message,DELAY
: delayed message. - Trocket
Rocketmq stringTopic Id - ID of the resource.
- Instance
Id string - Instance Id.
- Queue
Num float64 - Number of queue. Must be greater than or equal to 3.
- Remark string
- remark.
- Topic string
- topic.
- Topic
Type string - Topic type.
UNSPECIFIED
: not specified,NORMAL
: normal message,FIFO
: sequential message,DELAY
: delayed message. - Trocket
Rocketmq stringTopic Id - ID of the resource.
- instance
Id String - Instance Id.
- queue
Num Double - Number of queue. Must be greater than or equal to 3.
- remark String
- remark.
- topic String
- topic.
- topic
Type String - Topic type.
UNSPECIFIED
: not specified,NORMAL
: normal message,FIFO
: sequential message,DELAY
: delayed message. - trocket
Rocketmq StringTopic Id - ID of the resource.
- instance
Id string - Instance Id.
- queue
Num number - Number of queue. Must be greater than or equal to 3.
- remark string
- remark.
- topic string
- topic.
- topic
Type string - Topic type.
UNSPECIFIED
: not specified,NORMAL
: normal message,FIFO
: sequential message,DELAY
: delayed message. - trocket
Rocketmq stringTopic Id - 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_ strtopic_ id - ID of the resource.
- instance
Id String - Instance Id.
- queue
Num Number - Number of queue. Must be greater than or equal to 3.
- remark String
- remark.
- topic String
- topic.
- topic
Type String - Topic type.
UNSPECIFIED
: not specified,NORMAL
: normal message,FIFO
: sequential message,DELAY
: delayed message. - trocket
Rocketmq StringTopic Id - 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.