alicloud.rocketmq.Group
Explore with Pulumi AI
Provides an ONS group resource.
For more information about how to use it, see RocketMQ Group Management API.
NOTE: Available in 1.53.0+
Example Usage
Basic Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "onsInstanceName";
var groupName = config.Get("groupName") ?? "GID-onsGroupDatasourceName";
var defaultInstance = new AliCloud.RocketMQ.Instance("defaultInstance", new()
{
Remark = "default_ons_instance_remark",
});
var defaultGroup = new AliCloud.RocketMQ.Group("defaultGroup", new()
{
GroupName = groupName,
InstanceId = defaultInstance.Id,
Remark = "dafault_ons_group_remark",
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/rocketmq"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "onsInstanceName"
if param := cfg.Get("name"); param != "" {
name = param
}
groupName := "GID-onsGroupDatasourceName"
if param := cfg.Get("groupName"); param != "" {
groupName = param
}
defaultInstance, err := rocketmq.NewInstance(ctx, "defaultInstance", &rocketmq.InstanceArgs{
Remark: pulumi.String("default_ons_instance_remark"),
})
if err != nil {
return err
}
_, err = rocketmq.NewGroup(ctx, "defaultGroup", &rocketmq.GroupArgs{
GroupName: pulumi.String(groupName),
InstanceId: defaultInstance.ID(),
Remark: pulumi.String("dafault_ons_group_remark"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.rocketmq.Instance;
import com.pulumi.alicloud.rocketmq.InstanceArgs;
import com.pulumi.alicloud.rocketmq.Group;
import com.pulumi.alicloud.rocketmq.GroupArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("onsInstanceName");
final var groupName = config.get("groupName").orElse("GID-onsGroupDatasourceName");
var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
.remark("default_ons_instance_remark")
.build());
var defaultGroup = new Group("defaultGroup", GroupArgs.builder()
.groupName(groupName)
.instanceId(defaultInstance.id())
.remark("dafault_ons_group_remark")
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "onsInstanceName"
group_name = config.get("groupName")
if group_name is None:
group_name = "GID-onsGroupDatasourceName"
default_instance = alicloud.rocketmq.Instance("defaultInstance", remark="default_ons_instance_remark")
default_group = alicloud.rocketmq.Group("defaultGroup",
group_name=group_name,
instance_id=default_instance.id,
remark="dafault_ons_group_remark")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "onsInstanceName";
const groupName = config.get("groupName") || "GID-onsGroupDatasourceName";
const defaultInstance = new alicloud.rocketmq.Instance("defaultInstance", {remark: "default_ons_instance_remark"});
const defaultGroup = new alicloud.rocketmq.Group("defaultGroup", {
groupName: groupName,
instanceId: defaultInstance.id,
remark: "dafault_ons_group_remark",
});
configuration:
name:
type: string
default: onsInstanceName
groupName:
type: string
default: GID-onsGroupDatasourceName
resources:
defaultInstance:
type: alicloud:rocketmq:Instance
properties:
remark: default_ons_instance_remark
defaultGroup:
type: alicloud:rocketmq:Group
properties:
groupName: ${groupName}
instanceId: ${defaultInstance.id}
remark: dafault_ons_group_remark
Create Group Resource
new Group(name: string, args: GroupArgs, opts?: CustomResourceOptions);
@overload
def Group(resource_name: str,
opts: Optional[ResourceOptions] = None,
group_id: Optional[str] = None,
group_name: Optional[str] = None,
group_type: Optional[str] = None,
instance_id: Optional[str] = None,
read_enable: Optional[bool] = None,
remark: Optional[str] = None,
tags: Optional[Mapping[str, Any]] = None)
@overload
def Group(resource_name: str,
args: GroupArgs,
opts: Optional[ResourceOptions] = None)
func NewGroup(ctx *Context, name string, args GroupArgs, opts ...ResourceOption) (*Group, error)
public Group(string name, GroupArgs args, CustomResourceOptions? opts = null)
type: alicloud:rocketmq:Group
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GroupArgs
- 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 GroupArgs
- 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 GroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GroupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Group Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Group resource accepts the following input properties:
- Instance
Id string ID of the ONS Instance that owns the groups.
- Group
Id string Replaced by
group_name
after version 1.98.0.Field 'group_id' has been deprecated from version 1.98.0. Use 'group_name' instead.
- Group
Name string Name of the group. Two groups on a single instance cannot have the same name. A
group_name
starts with "GID_" or "GID-", and contains letters, numbers, hyphens (-), and underscores (_).- Group
Type string Specify the protocol applicable to the created Group ID. Valid values:
tcp
,http
. Default totcp
.- Read
Enable bool This attribute is used to set the message reading enabled or disabled. It can only be set after the group is used by the client.
- Remark string
This attribute is a concise description of group. The length cannot exceed 256.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- Instance
Id string ID of the ONS Instance that owns the groups.
- Group
Id string Replaced by
group_name
after version 1.98.0.Field 'group_id' has been deprecated from version 1.98.0. Use 'group_name' instead.
- Group
Name string Name of the group. Two groups on a single instance cannot have the same name. A
group_name
starts with "GID_" or "GID-", and contains letters, numbers, hyphens (-), and underscores (_).- Group
Type string Specify the protocol applicable to the created Group ID. Valid values:
tcp
,http
. Default totcp
.- Read
Enable bool This attribute is used to set the message reading enabled or disabled. It can only be set after the group is used by the client.
- Remark string
This attribute is a concise description of group. The length cannot exceed 256.
- map[string]interface{}
A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- instance
Id String ID of the ONS Instance that owns the groups.
- group
Id String Replaced by
group_name
after version 1.98.0.Field 'group_id' has been deprecated from version 1.98.0. Use 'group_name' instead.
- group
Name String Name of the group. Two groups on a single instance cannot have the same name. A
group_name
starts with "GID_" or "GID-", and contains letters, numbers, hyphens (-), and underscores (_).- group
Type String Specify the protocol applicable to the created Group ID. Valid values:
tcp
,http
. Default totcp
.- read
Enable Boolean This attribute is used to set the message reading enabled or disabled. It can only be set after the group is used by the client.
- remark String
This attribute is a concise description of group. The length cannot exceed 256.
- Map<String,Object>
A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- instance
Id string ID of the ONS Instance that owns the groups.
- group
Id string Replaced by
group_name
after version 1.98.0.Field 'group_id' has been deprecated from version 1.98.0. Use 'group_name' instead.
- group
Name string Name of the group. Two groups on a single instance cannot have the same name. A
group_name
starts with "GID_" or "GID-", and contains letters, numbers, hyphens (-), and underscores (_).- group
Type string Specify the protocol applicable to the created Group ID. Valid values:
tcp
,http
. Default totcp
.- read
Enable boolean This attribute is used to set the message reading enabled or disabled. It can only be set after the group is used by the client.
- remark string
This attribute is a concise description of group. The length cannot exceed 256.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- instance_
id str ID of the ONS Instance that owns the groups.
- group_
id str Replaced by
group_name
after version 1.98.0.Field 'group_id' has been deprecated from version 1.98.0. Use 'group_name' instead.
- group_
name str Name of the group. Two groups on a single instance cannot have the same name. A
group_name
starts with "GID_" or "GID-", and contains letters, numbers, hyphens (-), and underscores (_).- group_
type str Specify the protocol applicable to the created Group ID. Valid values:
tcp
,http
. Default totcp
.- read_
enable bool This attribute is used to set the message reading enabled or disabled. It can only be set after the group is used by the client.
- remark str
This attribute is a concise description of group. The length cannot exceed 256.
- Mapping[str, Any]
A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- instance
Id String ID of the ONS Instance that owns the groups.
- group
Id String Replaced by
group_name
after version 1.98.0.Field 'group_id' has been deprecated from version 1.98.0. Use 'group_name' instead.
- group
Name String Name of the group. Two groups on a single instance cannot have the same name. A
group_name
starts with "GID_" or "GID-", and contains letters, numbers, hyphens (-), and underscores (_).- group
Type String Specify the protocol applicable to the created Group ID. Valid values:
tcp
,http
. Default totcp
.- read
Enable Boolean This attribute is used to set the message reading enabled or disabled. It can only be set after the group is used by the client.
- remark String
This attribute is a concise description of group. The length cannot exceed 256.
- Map<Any>
A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
Outputs
All input properties are implicitly available as output properties. Additionally, the Group 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 Group Resource
Get an existing Group 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?: GroupState, opts?: CustomResourceOptions): Group
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
group_id: Optional[str] = None,
group_name: Optional[str] = None,
group_type: Optional[str] = None,
instance_id: Optional[str] = None,
read_enable: Optional[bool] = None,
remark: Optional[str] = None,
tags: Optional[Mapping[str, Any]] = None) -> Group
func GetGroup(ctx *Context, name string, id IDInput, state *GroupState, opts ...ResourceOption) (*Group, error)
public static Group Get(string name, Input<string> id, GroupState? state, CustomResourceOptions? opts = null)
public static Group get(String name, Output<String> id, GroupState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Group
Id string Replaced by
group_name
after version 1.98.0.Field 'group_id' has been deprecated from version 1.98.0. Use 'group_name' instead.
- Group
Name string Name of the group. Two groups on a single instance cannot have the same name. A
group_name
starts with "GID_" or "GID-", and contains letters, numbers, hyphens (-), and underscores (_).- Group
Type string Specify the protocol applicable to the created Group ID. Valid values:
tcp
,http
. Default totcp
.- Instance
Id string ID of the ONS Instance that owns the groups.
- Read
Enable bool This attribute is used to set the message reading enabled or disabled. It can only be set after the group is used by the client.
- Remark string
This attribute is a concise description of group. The length cannot exceed 256.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- Group
Id string Replaced by
group_name
after version 1.98.0.Field 'group_id' has been deprecated from version 1.98.0. Use 'group_name' instead.
- Group
Name string Name of the group. Two groups on a single instance cannot have the same name. A
group_name
starts with "GID_" or "GID-", and contains letters, numbers, hyphens (-), and underscores (_).- Group
Type string Specify the protocol applicable to the created Group ID. Valid values:
tcp
,http
. Default totcp
.- Instance
Id string ID of the ONS Instance that owns the groups.
- Read
Enable bool This attribute is used to set the message reading enabled or disabled. It can only be set after the group is used by the client.
- Remark string
This attribute is a concise description of group. The length cannot exceed 256.
- map[string]interface{}
A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- group
Id String Replaced by
group_name
after version 1.98.0.Field 'group_id' has been deprecated from version 1.98.0. Use 'group_name' instead.
- group
Name String Name of the group. Two groups on a single instance cannot have the same name. A
group_name
starts with "GID_" or "GID-", and contains letters, numbers, hyphens (-), and underscores (_).- group
Type String Specify the protocol applicable to the created Group ID. Valid values:
tcp
,http
. Default totcp
.- instance
Id String ID of the ONS Instance that owns the groups.
- read
Enable Boolean This attribute is used to set the message reading enabled or disabled. It can only be set after the group is used by the client.
- remark String
This attribute is a concise description of group. The length cannot exceed 256.
- Map<String,Object>
A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- group
Id string Replaced by
group_name
after version 1.98.0.Field 'group_id' has been deprecated from version 1.98.0. Use 'group_name' instead.
- group
Name string Name of the group. Two groups on a single instance cannot have the same name. A
group_name
starts with "GID_" or "GID-", and contains letters, numbers, hyphens (-), and underscores (_).- group
Type string Specify the protocol applicable to the created Group ID. Valid values:
tcp
,http
. Default totcp
.- instance
Id string ID of the ONS Instance that owns the groups.
- read
Enable boolean This attribute is used to set the message reading enabled or disabled. It can only be set after the group is used by the client.
- remark string
This attribute is a concise description of group. The length cannot exceed 256.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- group_
id str Replaced by
group_name
after version 1.98.0.Field 'group_id' has been deprecated from version 1.98.0. Use 'group_name' instead.
- group_
name str Name of the group. Two groups on a single instance cannot have the same name. A
group_name
starts with "GID_" or "GID-", and contains letters, numbers, hyphens (-), and underscores (_).- group_
type str Specify the protocol applicable to the created Group ID. Valid values:
tcp
,http
. Default totcp
.- instance_
id str ID of the ONS Instance that owns the groups.
- read_
enable bool This attribute is used to set the message reading enabled or disabled. It can only be set after the group is used by the client.
- remark str
This attribute is a concise description of group. The length cannot exceed 256.
- Mapping[str, Any]
A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- group
Id String Replaced by
group_name
after version 1.98.0.Field 'group_id' has been deprecated from version 1.98.0. Use 'group_name' instead.
- group
Name String Name of the group. Two groups on a single instance cannot have the same name. A
group_name
starts with "GID_" or "GID-", and contains letters, numbers, hyphens (-), and underscores (_).- group
Type String Specify the protocol applicable to the created Group ID. Valid values:
tcp
,http
. Default totcp
.- instance
Id String ID of the ONS Instance that owns the groups.
- read
Enable Boolean This attribute is used to set the message reading enabled or disabled. It can only be set after the group is used by the client.
- remark String
This attribute is a concise description of group. The length cannot exceed 256.
- Map<Any>
A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
- Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
Import
ONS GROUP can be imported using the id, e.g.
$ pulumi import alicloud:rocketmq/group:Group group MQ_INST_1234567890_Baso1234567:GID-onsGroupDemo
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.