tencentcloud.TrocketRocketmqConsumerGroup
Explore with Pulumi AI
Provides a resource to create a trocket rocketmq_consumer_group
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-xxxxxx",
subnetId: "subnet-xxxxx",
tags: {
tag_key: "rocketmq",
tag_value: "5.x",
},
});
const rocketmqConsumerGroup = new tencentcloud.TrocketRocketmqConsumerGroup("rocketmqConsumerGroup", {
instanceId: rocketmqInstance.trocketRocketmqInstanceId,
consumerGroup: "test_consumer_group",
maxRetryTimes: 20,
consumeEnable: false,
consumeMessageOrderly: true,
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-xxxxxx",
subnet_id="subnet-xxxxx",
tags={
"tag_key": "rocketmq",
"tag_value": "5.x",
})
rocketmq_consumer_group = tencentcloud.TrocketRocketmqConsumerGroup("rocketmqConsumerGroup",
instance_id=rocketmq_instance.trocket_rocketmq_instance_id,
consumer_group="test_consumer_group",
max_retry_times=20,
consume_enable=False,
consume_message_orderly=True,
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-xxxxxx"),
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.NewTrocketRocketmqConsumerGroup(ctx, "rocketmqConsumerGroup", &tencentcloud.TrocketRocketmqConsumerGroupArgs{
InstanceId: rocketmqInstance.TrocketRocketmqInstanceId,
ConsumerGroup: pulumi.String("test_consumer_group"),
MaxRetryTimes: pulumi.Float64(20),
ConsumeEnable: pulumi.Bool(false),
ConsumeMessageOrderly: pulumi.Bool(true),
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-xxxxxx",
SubnetId = "subnet-xxxxx",
Tags =
{
{ "tag_key", "rocketmq" },
{ "tag_value", "5.x" },
},
});
var rocketmqConsumerGroup = new Tencentcloud.TrocketRocketmqConsumerGroup("rocketmqConsumerGroup", new()
{
InstanceId = rocketmqInstance.TrocketRocketmqInstanceId,
ConsumerGroup = "test_consumer_group",
MaxRetryTimes = 20,
ConsumeEnable = false,
ConsumeMessageOrderly = true,
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.TrocketRocketmqConsumerGroup;
import com.pulumi.tencentcloud.TrocketRocketmqConsumerGroupArgs;
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-xxxxxx")
.subnetId("subnet-xxxxx")
.tags(Map.ofEntries(
Map.entry("tag_key", "rocketmq"),
Map.entry("tag_value", "5.x")
))
.build());
var rocketmqConsumerGroup = new TrocketRocketmqConsumerGroup("rocketmqConsumerGroup", TrocketRocketmqConsumerGroupArgs.builder()
.instanceId(rocketmqInstance.trocketRocketmqInstanceId())
.consumerGroup("test_consumer_group")
.maxRetryTimes(20)
.consumeEnable(false)
.consumeMessageOrderly(true)
.remark("test for terraform")
.build());
}
}
resources:
rocketmqInstance:
type: tencentcloud:TrocketRocketmqInstance
properties:
instanceType: EXPERIMENT
skuCode: experiment_500
remark: test
vpcId: vpc-xxxxxx
subnetId: subnet-xxxxx
tags:
tag_key: rocketmq
tag_value: 5.x
rocketmqConsumerGroup:
type: tencentcloud:TrocketRocketmqConsumerGroup
properties:
instanceId: ${rocketmqInstance.trocketRocketmqInstanceId}
consumerGroup: test_consumer_group
maxRetryTimes: 20
consumeEnable: false
consumeMessageOrderly: true
remark: test for terraform
Create TrocketRocketmqConsumerGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TrocketRocketmqConsumerGroup(name: string, args: TrocketRocketmqConsumerGroupArgs, opts?: CustomResourceOptions);
@overload
def TrocketRocketmqConsumerGroup(resource_name: str,
args: TrocketRocketmqConsumerGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TrocketRocketmqConsumerGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
consume_enable: Optional[bool] = None,
consume_message_orderly: Optional[bool] = None,
consumer_group: Optional[str] = None,
instance_id: Optional[str] = None,
max_retry_times: Optional[float] = None,
remark: Optional[str] = None,
trocket_rocketmq_consumer_group_id: Optional[str] = None)
func NewTrocketRocketmqConsumerGroup(ctx *Context, name string, args TrocketRocketmqConsumerGroupArgs, opts ...ResourceOption) (*TrocketRocketmqConsumerGroup, error)
public TrocketRocketmqConsumerGroup(string name, TrocketRocketmqConsumerGroupArgs args, CustomResourceOptions? opts = null)
public TrocketRocketmqConsumerGroup(String name, TrocketRocketmqConsumerGroupArgs args)
public TrocketRocketmqConsumerGroup(String name, TrocketRocketmqConsumerGroupArgs args, CustomResourceOptions options)
type: tencentcloud:TrocketRocketmqConsumerGroup
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 TrocketRocketmqConsumerGroupArgs
- 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 TrocketRocketmqConsumerGroupArgs
- 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 TrocketRocketmqConsumerGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TrocketRocketmqConsumerGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TrocketRocketmqConsumerGroupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TrocketRocketmqConsumerGroup 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 TrocketRocketmqConsumerGroup resource accepts the following input properties:
- Consume
Enable bool - Whether to enable consumption.
- Consume
Message boolOrderly true
: Sequential delivery,false
: Concurrent delivery.- Consumer
Group string - Name of consumer group.
- Instance
Id string - Instance ID.
- Max
Retry doubleTimes - Max retry times.
- Remark string
- remark.
- Trocket
Rocketmq stringConsumer Group Id - ID of the resource.
- Consume
Enable bool - Whether to enable consumption.
- Consume
Message boolOrderly true
: Sequential delivery,false
: Concurrent delivery.- Consumer
Group string - Name of consumer group.
- Instance
Id string - Instance ID.
- Max
Retry float64Times - Max retry times.
- Remark string
- remark.
- Trocket
Rocketmq stringConsumer Group Id - ID of the resource.
- consume
Enable Boolean - Whether to enable consumption.
- consume
Message BooleanOrderly true
: Sequential delivery,false
: Concurrent delivery.- consumer
Group String - Name of consumer group.
- instance
Id String - Instance ID.
- max
Retry DoubleTimes - Max retry times.
- remark String
- remark.
- trocket
Rocketmq StringConsumer Group Id - ID of the resource.
- consume
Enable boolean - Whether to enable consumption.
- consume
Message booleanOrderly true
: Sequential delivery,false
: Concurrent delivery.- consumer
Group string - Name of consumer group.
- instance
Id string - Instance ID.
- max
Retry numberTimes - Max retry times.
- remark string
- remark.
- trocket
Rocketmq stringConsumer Group Id - ID of the resource.
- consume_
enable bool - Whether to enable consumption.
- consume_
message_ boolorderly true
: Sequential delivery,false
: Concurrent delivery.- consumer_
group str - Name of consumer group.
- instance_
id str - Instance ID.
- max_
retry_ floattimes - Max retry times.
- remark str
- remark.
- trocket_
rocketmq_ strconsumer_ group_ id - ID of the resource.
- consume
Enable Boolean - Whether to enable consumption.
- consume
Message BooleanOrderly true
: Sequential delivery,false
: Concurrent delivery.- consumer
Group String - Name of consumer group.
- instance
Id String - Instance ID.
- max
Retry NumberTimes - Max retry times.
- remark String
- remark.
- trocket
Rocketmq StringConsumer Group Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the TrocketRocketmqConsumerGroup 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 TrocketRocketmqConsumerGroup Resource
Get an existing TrocketRocketmqConsumerGroup 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?: TrocketRocketmqConsumerGroupState, opts?: CustomResourceOptions): TrocketRocketmqConsumerGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
consume_enable: Optional[bool] = None,
consume_message_orderly: Optional[bool] = None,
consumer_group: Optional[str] = None,
instance_id: Optional[str] = None,
max_retry_times: Optional[float] = None,
remark: Optional[str] = None,
trocket_rocketmq_consumer_group_id: Optional[str] = None) -> TrocketRocketmqConsumerGroup
func GetTrocketRocketmqConsumerGroup(ctx *Context, name string, id IDInput, state *TrocketRocketmqConsumerGroupState, opts ...ResourceOption) (*TrocketRocketmqConsumerGroup, error)
public static TrocketRocketmqConsumerGroup Get(string name, Input<string> id, TrocketRocketmqConsumerGroupState? state, CustomResourceOptions? opts = null)
public static TrocketRocketmqConsumerGroup get(String name, Output<String> id, TrocketRocketmqConsumerGroupState state, CustomResourceOptions options)
resources: _: type: tencentcloud:TrocketRocketmqConsumerGroup 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.
- Consume
Enable bool - Whether to enable consumption.
- Consume
Message boolOrderly true
: Sequential delivery,false
: Concurrent delivery.- Consumer
Group string - Name of consumer group.
- Instance
Id string - Instance ID.
- Max
Retry doubleTimes - Max retry times.
- Remark string
- remark.
- Trocket
Rocketmq stringConsumer Group Id - ID of the resource.
- Consume
Enable bool - Whether to enable consumption.
- Consume
Message boolOrderly true
: Sequential delivery,false
: Concurrent delivery.- Consumer
Group string - Name of consumer group.
- Instance
Id string - Instance ID.
- Max
Retry float64Times - Max retry times.
- Remark string
- remark.
- Trocket
Rocketmq stringConsumer Group Id - ID of the resource.
- consume
Enable Boolean - Whether to enable consumption.
- consume
Message BooleanOrderly true
: Sequential delivery,false
: Concurrent delivery.- consumer
Group String - Name of consumer group.
- instance
Id String - Instance ID.
- max
Retry DoubleTimes - Max retry times.
- remark String
- remark.
- trocket
Rocketmq StringConsumer Group Id - ID of the resource.
- consume
Enable boolean - Whether to enable consumption.
- consume
Message booleanOrderly true
: Sequential delivery,false
: Concurrent delivery.- consumer
Group string - Name of consumer group.
- instance
Id string - Instance ID.
- max
Retry numberTimes - Max retry times.
- remark string
- remark.
- trocket
Rocketmq stringConsumer Group Id - ID of the resource.
- consume_
enable bool - Whether to enable consumption.
- consume_
message_ boolorderly true
: Sequential delivery,false
: Concurrent delivery.- consumer_
group str - Name of consumer group.
- instance_
id str - Instance ID.
- max_
retry_ floattimes - Max retry times.
- remark str
- remark.
- trocket_
rocketmq_ strconsumer_ group_ id - ID of the resource.
- consume
Enable Boolean - Whether to enable consumption.
- consume
Message BooleanOrderly true
: Sequential delivery,false
: Concurrent delivery.- consumer
Group String - Name of consumer group.
- instance
Id String - Instance ID.
- max
Retry NumberTimes - Max retry times.
- remark String
- remark.
- trocket
Rocketmq StringConsumer Group Id - ID of the resource.
Import
trocket rocketmq_consumer_group can be imported using the id, e.g.
$ pulumi import tencentcloud:index/trocketRocketmqConsumerGroup:TrocketRocketmqConsumerGroup rocketmq_consumer_group instanceId#consumerGroup
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.