1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. TrocketRocketmqConsumerGroup
tencentcloud 1.81.187 published on Monday, Apr 28, 2025 by tencentcloudstack

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",
});
Copy
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")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
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
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. TrocketRocketmqConsumerGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. TrocketRocketmqConsumerGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. TrocketRocketmqConsumerGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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:

ConsumeEnable This property is required. bool
Whether to enable consumption.
ConsumeMessageOrderly This property is required. bool
true: Sequential delivery, false: Concurrent delivery.
ConsumerGroup This property is required. string
Name of consumer group.
InstanceId This property is required. string
Instance ID.
MaxRetryTimes This property is required. double
Max retry times.
Remark string
remark.
TrocketRocketmqConsumerGroupId string
ID of the resource.
ConsumeEnable This property is required. bool
Whether to enable consumption.
ConsumeMessageOrderly This property is required. bool
true: Sequential delivery, false: Concurrent delivery.
ConsumerGroup This property is required. string
Name of consumer group.
InstanceId This property is required. string
Instance ID.
MaxRetryTimes This property is required. float64
Max retry times.
Remark string
remark.
TrocketRocketmqConsumerGroupId string
ID of the resource.
consumeEnable This property is required. Boolean
Whether to enable consumption.
consumeMessageOrderly This property is required. Boolean
true: Sequential delivery, false: Concurrent delivery.
consumerGroup This property is required. String
Name of consumer group.
instanceId This property is required. String
Instance ID.
maxRetryTimes This property is required. Double
Max retry times.
remark String
remark.
trocketRocketmqConsumerGroupId String
ID of the resource.
consumeEnable This property is required. boolean
Whether to enable consumption.
consumeMessageOrderly This property is required. boolean
true: Sequential delivery, false: Concurrent delivery.
consumerGroup This property is required. string
Name of consumer group.
instanceId This property is required. string
Instance ID.
maxRetryTimes This property is required. number
Max retry times.
remark string
remark.
trocketRocketmqConsumerGroupId string
ID of the resource.
consume_enable This property is required. bool
Whether to enable consumption.
consume_message_orderly This property is required. bool
true: Sequential delivery, false: Concurrent delivery.
consumer_group This property is required. str
Name of consumer group.
instance_id This property is required. str
Instance ID.
max_retry_times This property is required. float
Max retry times.
remark str
remark.
trocket_rocketmq_consumer_group_id str
ID of the resource.
consumeEnable This property is required. Boolean
Whether to enable consumption.
consumeMessageOrderly This property is required. Boolean
true: Sequential delivery, false: Concurrent delivery.
consumerGroup This property is required. String
Name of consumer group.
instanceId This property is required. String
Instance ID.
maxRetryTimes This property is required. Number
Max retry times.
remark String
remark.
trocketRocketmqConsumerGroupId String
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
ConsumeEnable bool
Whether to enable consumption.
ConsumeMessageOrderly bool
true: Sequential delivery, false: Concurrent delivery.
ConsumerGroup string
Name of consumer group.
InstanceId string
Instance ID.
MaxRetryTimes double
Max retry times.
Remark string
remark.
TrocketRocketmqConsumerGroupId string
ID of the resource.
ConsumeEnable bool
Whether to enable consumption.
ConsumeMessageOrderly bool
true: Sequential delivery, false: Concurrent delivery.
ConsumerGroup string
Name of consumer group.
InstanceId string
Instance ID.
MaxRetryTimes float64
Max retry times.
Remark string
remark.
TrocketRocketmqConsumerGroupId string
ID of the resource.
consumeEnable Boolean
Whether to enable consumption.
consumeMessageOrderly Boolean
true: Sequential delivery, false: Concurrent delivery.
consumerGroup String
Name of consumer group.
instanceId String
Instance ID.
maxRetryTimes Double
Max retry times.
remark String
remark.
trocketRocketmqConsumerGroupId String
ID of the resource.
consumeEnable boolean
Whether to enable consumption.
consumeMessageOrderly boolean
true: Sequential delivery, false: Concurrent delivery.
consumerGroup string
Name of consumer group.
instanceId string
Instance ID.
maxRetryTimes number
Max retry times.
remark string
remark.
trocketRocketmqConsumerGroupId string
ID of the resource.
consume_enable bool
Whether to enable consumption.
consume_message_orderly bool
true: Sequential delivery, false: Concurrent delivery.
consumer_group str
Name of consumer group.
instance_id str
Instance ID.
max_retry_times float
Max retry times.
remark str
remark.
trocket_rocketmq_consumer_group_id str
ID of the resource.
consumeEnable Boolean
Whether to enable consumption.
consumeMessageOrderly Boolean
true: Sequential delivery, false: Concurrent delivery.
consumerGroup String
Name of consumer group.
instanceId String
Instance ID.
maxRetryTimes Number
Max retry times.
remark String
remark.
trocketRocketmqConsumerGroupId String
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
Copy

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.