All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ADB::DBCluster

Last Updated:Feb 10, 2026

Use the ALIYUN::ADB::DBCluster resource type to create an AnalyticDB for MySQL cluster.

Syntax

{
  "Type": "ALIYUN::ADB::DBCluster",
  "Properties": {
    "DBNodeStorage": Integer,
    "PeriodType": String,
    "DBClusterCategory": String,
    "ZoneId": String,
    "ResourceGroupId": String,
    "VPCId": String,
    "VSwitchId": String,
    "Mode": String,
    "DBClusterDescription": String,
    "ComputeResource": String,
    "Period": Integer,
    "PayType": String,
    "ElasticIOResource": Integer,
    "DBClusterVersion": String,
    "DBNodeGroupCount": Integer,
    "ExecutorCount": Integer,
    "DBClusterClass": String,
    "KmsId": String,
    "DiskEncryption": Boolean,
    "EnableSSL": Boolean,
    "Tags": List
  }
}

Properties

Property name

Type

Required

Update allowed

Description

Constraint

DBClusterCategory

String

Yes

Yes

Series

Valid values:

  • Cluster: Reserved mode cluster edition.

    Note

    You can purchase the reserved mode cluster edition only in the Chinese mainland and Singapore regions. In the Singapore region, you can purchase this edition only in pay-as-you-go mode.

  • MixedStorage: Elastic mode cluster edition (new).

    Note

    If DBClusterCategory is Cluster, set Mode to Reserver. If DBClusterCategory is MixedStorage, set Mode to Flexible. Otherwise, cluster creation fails.

For more information, see Editions.

DBClusterVersion

String

Yes

No

Version of the AnalyticDB for MySQL cluster.

Set the value to 3.0.

Mode

String

Yes

No

pattern.

Valid values:

  • Reserved Mode.

  • Flexible: Elastic mode.

    Note

    If you do not specify this parameter, the system uses the reserved mode by default.

PayType

String

Yes

No

Billing method.

Valid values:

  • Postpaid: Pay-as-you-go.

  • Prepaid: Subscription (subscription for a fixed period).

VPCId

String

Yes

No

ID of the virtual private cloud (VPC).

None.

VSwitchId

String

Yes

No

ID of the vSwitch.

None.

ComputeResource

String

No

Yes

Computing resource.

Computing resource.

This parameter is required if Mode is Flexible (elastic mode).

Note

Call the DescribeAvailableResource operation to query available computing resources in a specified region.

DBClusterClass

String

No

Yes

Specification.

Cluster specification. Valid values:

  • C8

  • C32

Note

This parameter is required if Mode is Reserver (reserved mode).

DBClusterDescription

String

No

No

Note

None.

DBNodeGroupCount

Integer

No

Yes

Number of node groups.

Valid values: 1 to 200 (integer).

Note

This parameter is required if Mode is Reserver (reserved mode).

DBNodeStorage

Integer

No

Yes

Storage capacity per node.

This property is required only if Mode is Reserver.

Unit: GB.

Valid values:

  • If the specification is C8, valid values are 100 to 1000.

  • If the specification is C32, valid values are 100 to 8000.

Note

Step size: 100 GB for values less than 1000 GB. Step size: 1000 GB for values greater than or equal to 1000 GB.

ElasticIOResource

Integer

No

Yes

Elastic I/O unit (EIU).

This property is required only if Mode is Flexible.

For more information, see Scale out elastic I/O units (EIUs).

ExecutorCount

Integer

No

No

Number of compute nodes used by the cluster in elastic mode.

None.

KmsId

String

No

No

ID of the key used to encrypt disk data.

Note

This parameter applies only when disk encryption is enabled for the AnalyticDB for MySQL cluster.

DiskEncryption

Boolean

No

No

Specifies whether to enable disk encryption.

None.

EnableSSL

Boolean

No

No

Specifies whether to enable SSL encryption for connections.

Valid values:

  • true: Enables the feature.

  • false: Shutdown.

Period

Integer

No

No

Subscription duration.

This property is required only if PayType is Prepaid.

Valid values:

  • For monthly subscriptions: 1 to 9.

  • For yearly subscriptions: 1 to 3.

PeriodType

String

No

No

Specifies whether the subscription cluster is billed monthly or yearly.

This property is required only if PayType is Prepaid.

Valid values:

  • Year: Yearly subscription.

  • Month: Monthly subscription.

ResourceGroupId

String

No

Yes

ID of the resource group.

None.

Tags

List

No

Yes

Tags.

You can add up to 20 tags.

For more information, see Tags property.

ZoneId

String

No

No

ID of the zone.

Call DescribeRegions to query available zones.

Tags syntax

"Tags": [
  {
    "Key": String,
    "Value": String
  }
]

Tags property

Property name

Type

Required

Update allowed

Description

Constraint

Key

String

Yes

No

Tag key.

Length: 1 to 128 characters. Cannot start with aliyun or acs:. Cannot contain http:// or https://.

Value

String

No

No

Tag value.

Length: 0 to 128 characters. Cannot start with aliyun or acs:. Cannot contain http:// or https:// .

Return values

Fn::GetAtt

  • DBClusterId: The ID of the cluster.

  • OrderId: The ID of the order.

  • ConnectionString: The connection string for the VPC.

  • Arn: The Alibaba Cloud Resource Name (ARN) of the resource.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  DBClusterCategory:
    Type: String
    Description: |-
      The edition of the cluster.
      Valid values when the cluster is in reserved mode:
      Basic
      Cluster
      When the cluster is in elastic mode, set the value to MixedStorage.
    AllowedValues:
      - Basic
      - Cluster
      - MixedStorage
    Default: MixedStorage
  ZoneId:
    AssociationProperty: ALIYUN::ECS::Instance:ZoneId
    Type: String
    Description: The zone ID of the cluster. You can call the DescribeRegions operation to query the most recent zone list.
  VPCId:
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
    Type: String
    Description: |-
      The ID of the VPC.
      Note If you leave this parameter empty, the default VPC or vSwitch of the specified region is used. If the region does not have a default VPC, a VPC is created.
  VSwitchId:
    AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
    Type: String
    Description: The ID of the vSwitch.
    AssociationPropertyMetadata:
      VpcId: VPC
      ZoneId: VSwitchZoneId
  Mode:
    Type: String
    Description: |-
      The mode of the cluster. Valid values:
      Reserver: the reserved mode
      Flexible: the elastic mode
    AllowedValues:
      - Reserver
      - Flexible
    Default: Flexible
  ComputeResource:
    Type: String
    Description: The computing resource of the cluster. This parameter is required in elastic mode.
    Default: 8Core32GB
  PayType:
    Type: String
    Description: |-
      The billing method of the cluster. Valid values:
      Postpaid: pay-as-you-go
      Prepaid: subscription
    AllowedValues:
      - Prepaid
      - PostPaid
    Default: PostPaid
  ElasticIOResource:
    Type: Number
    Description: |-
      Elastic IO Unit
      Note the flexible mode cluster will use this parameter.
    Default: 0
  DBClusterVersion:
    Type: String
    Description: The version of the cluster. Set the value to 3.0.
    Default: '3.0'
Resources:
  DBCluster:
    Type: ALIYUN::ADB::DBCluster
    Properties:
      DBClusterCategory:
        Ref: DBClusterCategory
      ZoneId:
        Ref: ZoneId
      VPCId:
        Ref: VPCId
      VSwitchId:
        Ref: VSwitchId
      Mode:
        Ref: Mode
      ComputeResource:
        Ref: ComputeResource
      PayType:
        Ref: PayType
      ElasticIOResource:
        Ref: ElasticIOResource
      DBClusterVersion:
        Ref: DBClusterVersion
Outputs:
  DBClusterId:
    Description: The ID of the cluster.
    Value:
      Fn::GetAtt:
        - DBCluster
        - DBClusterId
  OrderId:
    Description: The ID of the order.
    Value:
      Fn::GetAtt:
        - DBCluster
        - OrderId
  ConnectionString:
    Description: Vpc connection string.
    Value:
      Fn::GetAtt:
        - DBCluster
        - ConnectionString
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "DBClusterCategory": {
      "Type": "String",
      "Description": "The edition of the cluster.\nValid values when the cluster is in reserved mode:\nBasic\nCluster\nWhen the cluster is in elastic mode, set the value to MixedStorage.",
      "AllowedValues": [
        "Basic",
        "Cluster",
        "MixedStorage"
      ],
      "Default": "MixedStorage"
    },
    "ZoneId": {
      "AssociationProperty": "ALIYUN::ECS::Instance:ZoneId",
      "Type": "String",
      "Description": "The zone ID of the cluster. You can call the DescribeRegions operation to query the most recent zone list."
    },
    "VPCId": {
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
      "Type": "String",
      "Description": "The ID of the VPC.\nNote If you leave this parameter empty, the default VPC or vSwitch of the specified region is used. If the region does not have a default VPC, a VPC is created."
    },
    "VSwitchId": {
      "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
      "Type": "String",
      "Description": "The ID of the vSwitch.",
      "AssociationPropertyMetadata": {
        "VpcId": "VPC",
        "ZoneId": "VSwitchZoneId"
      }
    },
    "Mode": {
      "Type": "String",
      "Description": "The mode of the cluster. Valid values:\nReserver: the reserved mode\nFlexible: the elastic mode",
      "AllowedValues": [
        "Reserver",
        "Flexible"
      ],
      "Default": "Flexible"
    },
    "ComputeResource": {
      "Type": "String",
      "Description": "The computing resource of the cluster. This parameter is required in elastic mode.",
      "Default": "8Core32GB"
    },
    "PayType": {
      "Type": "String",
      "Description": "The billing method of the cluster. Valid values:\nPostpaid: pay-as-you-go\nPrepaid: subscription",
      "AllowedValues": [
        "Prepaid",
        "PostPaid"
      ],
      "Default": "PostPaid"
    },
    "ElasticIOResource": {
      "Type": "Number",
      "Description": "Elastic IO Unit\nNote the flexible mode cluster will use this parameter.",
      "Default": 0
    },
    "DBClusterVersion": {
      "Type": "String",
      "Description": "The version of the cluster. Set the value to 3.0.",
      "Default": "3.0"
    }
  },
  "Resources": {
    "DBCluster": {
      "Type": "ALIYUN::ADB::DBCluster",
      "Properties": {
        "DBClusterCategory": {
          "Ref": "DBClusterCategory"
        },
        "ZoneId": {
          "Ref": "ZoneId"
        },
        "VPCId": {
          "Ref": "VPCId"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "Mode": {
          "Ref": "Mode"
        },
        "ComputeResource": {
          "Ref": "ComputeResource"
        },
        "PayType": {
          "Ref": "PayType"
        },
        "ElasticIOResource": {
          "Ref": "ElasticIOResource"
        },
        "DBClusterVersion": {
          "Ref": "DBClusterVersion"
        }
      }
    }
  },
  "Outputs": {
    "DBClusterId": {
      "Description": "The ID of the cluster.",
      "Value": {
        "Fn::GetAtt": [
          "DBCluster",
          "DBClusterId"
        ]
      }
    },
    "OrderId": {
      "Description": "The ID of the order.",
      "Value": {
        "Fn::GetAtt": [
          "DBCluster",
          "OrderId"
        ]
      }
    },
    "ConnectionString": {
      "Description": "Vpc connection string.",
      "Value": {
        "Fn::GetAtt": [
          "DBCluster",
          "ConnectionString"
        ]
      }
    }
  }
}