ALIYUN::DTS::ConsumerGroup

ALIYUN::DTS::ConsumerGroup类型用于为数据订阅实例创建消费组。

语法

{
  "Type": "ALIYUN::DTS::ConsumerGroup",
  "Properties": {
    "ConsumerGroupPassword": String,
    "ConsumerGroupUserName": String,
    "ConsumerGroupName": String,
    "SubscriptionInstanceId": String
  }
}

属性

属性名称类型必须允许更新描述约束
ConsumerGroupPasswordString消费组账号的密码。 长度为8~32个字符。至少包含英文字母、数字和特殊字符中的两种。
ConsumerGroupUserNameString消费组账号。 最长16个字符。可包含英文字母、数字和下划线(_)。
ConsumerGroupNameString消费组名称。最长128个字符。

建议配置具有业务意义的名称,便于后续识别。

SubscriptionInstanceIdString数据订阅实例ID。

返回值

Fn::GetAtt

  • ConsumerGroupID:消费组ID。
  • ConsumerGroupName:消费组名称。
  • SubscriptionInstanceId:数据订阅实例ID。

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      SubscriptionInstanceId:
        Type: String
        Description: Subscription instance ID.
    Resources:
      ConsumerGroup:
        Type: ALIYUN::DTS::ConsumerGroup
        Properties:
          ConsumerGroupPassword: Admin@123
          ConsumerGroupUserName: dtsconsum
          ConsumerGroupName: dasdtest
          SubscriptionInstanceId:
            Ref: SubscriptionInstanceId
    Outputs:
      ConsumerGroupID:
        Description: Consumer group ID
        Value:
          Fn::GetAtt:
            - ConsumerGroup
            - ConsumerGroupID
      ConsumerGroupName:
        Description: Consumer group name
        Value:
          Fn::GetAtt:
            - ConsumerGroup
            - ConsumerGroupName
      SubscriptionInstanceId:
        Description: Subscription instance ID
        Value:
          Fn::GetAtt:
            - ConsumerGroup
            - SubscriptionInstanceId
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "SubscriptionInstanceId": {
          "Type": "String",
          "Description": "Subscription instance ID."
        }
      },
      "Resources": {
        "ConsumerGroup": {
          "Type": "ALIYUN::DTS::ConsumerGroup",
          "Properties": {
            "ConsumerGroupPassword": "Admin@123",
            "ConsumerGroupUserName": "dtsconsum",
            "ConsumerGroupName": "dasdtest",
            "SubscriptionInstanceId": {
              "Ref": "SubscriptionInstanceId"
            }
          }
        }
      },
      "Outputs": {
        "ConsumerGroupID": {
          "Description": "Consumer group ID",
          "Value": {
            "Fn::GetAtt": [
              "ConsumerGroup",
              "ConsumerGroupID"
            ]
          }
        },
        "ConsumerGroupName": {
          "Description": "Consumer group name",
          "Value": {
            "Fn::GetAtt": [
              "ConsumerGroup",
              "ConsumerGroupName"
            ]
          }
        },
        "SubscriptionInstanceId": {
          "Description": "Subscription instance ID",
          "Value": {
            "Fn::GetAtt": [
              "ConsumerGroup",
              "SubscriptionInstanceId"
            ]
          }
        }
      }
    }