ALIYUN::ADB::DBCluster is used 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
  }
}

Properties

Property Type Required Editable Description Constraint
DBNodeStorage Integer No Yes The storage space of the node. Unit: GB.

This property is required when Mode is set to Reserver.

  • Valid values when DBClusterClass is set to T8: 100 to 500
  • Valid values when DBClusterClass is set to T16: 100 to 2000
  • Valid values when DBClusterClass is set to T32: 100 to 2000
  • Valid values when DBClusterClass is set to T52: 100 to 4000
  • Valid values when DBClusterClass is set to C8: 100 to 1000
  • Valid values when DBClusterClass is set to C32: 100 to 8000
Note Storage space that is less than 1,000 GB increases in increments of 100 GB. Storage space that is greater than 1,000 GB increases in increments of 1,000 GB.
PeriodType String No No The subscription type of the subscription cluster.

This property is required when PayType is set to Prepaid.

Valid values:

  • Year
  • Month
DBClusterCategory String Yes Yes The edition of the cluster.
  • Valid values when Mode is set to Reserver:
    • Basic
    • Cluster
  • Valid value when Mode is set to Flexible:

    MixedStorage

For more information, see Editions.

ZoneId String No No The ID of the zone. You can call the DescribeRegions operation to query the list of zones.
ResourceGroupId String No No The ID of the resource group. None
VPCId String Yes No The ID of the virtual private cloud (VPC). None
VSwitchId String Yes No The ID of the vSwitch. None
Mode String Yes No The mode. Valid values:
  • Reserver
  • Flexible
DBClusterDescription String No No The remarks. None
ComputeResource String No Yes The compute resource. This property is required when Mode is set to Flexible.
Period Integer No No The subscription period.

This property is required when PayType is set to Prepaid.

  • Valid values when PeriodType is set to Month: 1 to 9.
  • Valid values when PeriodType is set to Year: 1 to 3.
PayType String Yes No The billing method. Valid values:
  • Postpaid: pay-as-you-go
  • Prepaid: subscription
ElasticIOResource Integer No Yes The elastic I/O unit (EIU). This property is required when Mode is set to Flexible.

For more information, see EIUs.

DBClusterVersion String Yes No The version of the AnalyticDB for MySQL cluster. Set the value to 3.0.
DBNodeGroupCount Integer No Yes The number of node groups.

This property is required when Mode is set to Reserver.

  • Valid value when DBClusterClass is set to T8: 1.
  • Valid value when DBClusterClass is set to T16: 1.
  • Valid value when DBClusterClass is set to T32: 1.
  • Valid value when DBClusterClass is set to T52: 1.
  • Valid values when DBClusterClass is set to C8: 1 to 128.
  • Valid values when DBClusterClass is set to C32: 1 to 128.
ExecutorCount Integer No No The number of compute nodes that are used by the cluster in elastic mode. None
DBClusterClass String No Yes The instance type.

This property is required when Mode is set to Reserver.

  • Valid values when DBClusterCategory is set to Basic:
    • T8
    • T16
    • T32
    • T52
  • Valid values when DBClusterCategory is set to Cluster:
    • C8
    • C32

Response parameters

Fn::GetAtt

  • DBClusterId: the ID of the cluster.
  • OrderId: the order ID of the cluster.
  • ConnectionString: the VPC endpoint of the cluster.

Examples

{
  "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": [
        "Subscription",
        "PrePaid",
        "PrePay",
        "Prepaid",
        "PayAsYouGo",
        "PostPaid",
        "PayOnDemand",
        "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"
        ]
      }
    }
  }
}