ALIYUN::ROCKETMQ::Group类型用于创建客户端Group ID。创建的Group ID用于发布和订阅消息。
语法
{
"Type": "ALIYUN::ROCKETMQ::Group",
"Properties": {
"InstanceId": String,
"GroupType": String,
"Remark": String,
"GroupId": String
}
}
属性
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
InstanceId |
String |
是 |
否 |
需创建的Group ID所对应的实例ID |
无 |
GroupType |
String |
否 |
否 |
Group ID适用的协议 |
取值范围:
- tcp(默认值):创建的Group ID仅适用于TCP协议的消息收发。
- http:创建的Group ID仅适用于HTTP协议的消息收发。
|
Remark |
String |
否 |
否 |
备注 |
无 |
GroupId |
String |
是 |
否 |
创建的消费集群的Group ID |
以 GID_ 或者 GID- 开头,只能包含字母、数字、短横线(-)和下划线(_)。长度为5~64个字符。
|
返回值
Fn::GetAtt
- GroupType:创建的Group ID适用的协议。
- InstanceId:实例ID。
- GroupId:创建的Group ID。
示例
ROSTemplateFormatVersion: '2015-09-01'
Resources:
Group:
Type: ALIYUN::ROCKETMQ::Group
Properties:
InstanceId:
Ref: InstanceId
GroupId:
Ref: GroupId
Parameters:
InstanceId:
Type: String
Description: The ID of the instance.
GroupId:
MinLength: 7
Type: String
Description: |-
The group ID of the consumption cluster. When creating a group ID, pay attention to the following aspects:
A group ID starts with"GID_" or "GID-", and contains letters, numbers, hyphens (-), and underscores (_).
A group ID ranges from 7 to 64 bytes.
Once a group ID is created, it cannot be edited anymore.
MaxLength: 64
Outputs:
GroupType:
Description: Group Type
Value:
Fn::GetAtt:
- Group
- GroupType
InstanceId:
Description: Instance ID
Value:
Fn::GetAtt:
- Group
- InstanceId
GroupId:
Description: Group ID
Value:
Fn::GetAtt:
- Group
- GroupId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Resources": {
"Group": {
"Type": "ALIYUN::ROCKETMQ::Group",
"Properties": {
"InstanceId": {
"Ref": "InstanceId"
},
"GroupId": {
"Ref": "GroupId"
}
}
}
},
"Parameters": {
"InstanceId": {
"Type": "String",
"Description": "The ID of the instance."
},
"GroupId": {
"MinLength": 7,
"Type": "String",
"Description": "The group ID of the consumption cluster. When creating a group ID, pay attention to the following aspects:\nA group ID starts with\"GID_\" or \"GID-\", and contains letters, numbers, hyphens (-), and underscores (_).\nA group ID ranges from 7 to 64 bytes.\nOnce a group ID is created, it cannot be edited anymore.",
"MaxLength": 64
}
},
"Outputs": {
"GroupType": {
"Description": "Group Type",
"Value": {
"Fn::GetAtt": [
"Group",
"GroupType"
]
}
},
"InstanceId": {
"Description": "Instance ID",
"Value": {
"Fn::GetAtt": [
"Group",
"InstanceId"
]
}
},
"GroupId": {
"Description": "Group ID",
"Value": {
"Fn::GetAtt": [
"Group",
"GroupId"
]
}
}
}
}