All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::DTS::ConsumerGroup

更新時間:Aug 13, 2024

ALIYUN::DTS::ConsumerGroup is used to create a consumer group for a change tracking instance.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

ConsumerGroupPassword

String

Yes

Yes

The password that corresponds to the username of the consumer group.

The password must be 8 to 32 characters in length. It must contain at least two of the following character types: letters, digits, and special characters.

ConsumerGroupUserName

String

Yes

No

The username of the consumer group.

The username can be up to 16 characters in length. It can contain letters, digits, and underscores (_).

ConsumerGroupName

String

Yes

No

The name of the consumer group.

The name can be up to 128 characters in length.

We recommend that you use a descriptive name for easy identification.

SubscriptionInstanceId

String

Yes

No

The ID of the change tracking instance.

None

Response parameters

Fn::GetAtt

  • ConsumerGroupID: the ID of the consumer group.

  • ConsumerGroupName: the name of the consumer group.

  • SubscriptionInstanceId: the ID of the change tracking instance.

Examples

  • YAML format

    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 format

    {
      "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"
            ]
          }
        }
      }
    }