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。

示例

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "Group": {
      "Type": "ALIYUN::ROCKETMQ::Group",
      "Properties": {
        "InstanceId": {
          "Ref": "InstanceId"
        },
        "GroupType": {
          "Ref": "GroupType"
        },
        "Remark": {
          "Ref": "Remark"
        },
        "GroupId": {
          "Ref": "GroupId"
        }
      }
    }
  },
  "Parameters": {
    "InstanceId": {
      "Type": "String",
      "Description": "The ID of the instance."
    },
    "GroupType": {
      "Type": "String",
      "Description": "Group ID specifies the creation of applicable agreements. Group ID TCP protocol and the HTTP protocol can not be shared, the need to create separately. Value as follows:\ntcp: Default, indicates Group ID is created only for the TCP protocol messaging.\nhttp: represents the Group ID was created only for the HTTP protocol messaging.",
      "AllowedValues": [
        "tcp",
        "http"
      ]
    },
    "Remark": {
      "Type": "String",
      "Description": "The remarks on the request."
    },
    "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"
        ]
      }
    }
  }
}

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  Group:
    Type: 'ALIYUN::ROCKETMQ::Group'
    Properties:
      InstanceId:
        Ref: InstanceId
      GroupType:
        Ref: GroupType
      Remark:
        Ref: Remark
      GroupId:
        Ref: GroupId
Parameters:
  InstanceId:
    Type: String
    Description: The ID of the instance.
  GroupType:
    Type: String
    Description: >-
      Group ID specifies the creation of applicable agreements. Group ID TCP
      protocol and the HTTP protocol can not be shared, the need to create
      separately. Value as follows:

      tcp: Default, indicates Group ID is created only for the TCP protocol
      messaging.

      http: represents the Group ID was created only for the HTTP protocol
      messaging.
    AllowedValues:
      - tcp
      - http
  Remark:
    Type: String
    Description: The remarks on the request.
  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