ALIYUN::ClickHouse::DBCluster is used to create an ApsaraDB for ClickHouse cluster.

Syntax

{
  "Type": "ALIYUN::ClickHouse::DBCluster",
  "Properties": {
    "DbNodeStorageType": String,
    "DBNodeStorage": Integer,
    "EncryptionType": String,
    "Category": String,
    "ZoneId": String,
    "VSwitchId": String,
    "DBClusterDescription": String,
    "Period": String,
    "EncryptionKey": String,
    "DBClusterNetworkType": String,
    "DBClusterType": String,
    "VpcId": String,
    "DBClusterVersion": String,
    "DBNodeCount": Integer,
    "UsedTime": Integer,
    "PaymentType": String
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
DbNodeStorageTypeStringYesNoThe storage type of the node. Valid values:
  • cloud_essd: enhanced SSD (ESSD)
  • cloud_efficiency: ultra disk
DBNodeStorageIntegerYesNoThe storage capacity of the node. Valid values: 100 to 10000.

Unit: GB.

The value must be in increments of 100.

EncryptionTypeStringNoNoThe encryption type. Set the value to CloudDisk. This value specifies that disk encryption is used for the cluster.
CategoryStringYesNoThe edition of the cluster. Valid values:
  • Basic: Single-replica Edition
  • HighAvailability: Double-replica Edition
ZoneIdStringNoNoThe ID of the zone. You can call the DescribeRegions operation to query the most recent zone list.
VSwitchIdStringNoNoThe ID of the vSwitch. None.
DBClusterDescriptionStringNoNoThe description of the cluster. None.
PeriodStringNoNoThe billing cycle of the subscription cluster. Valid values:
  • Year
  • Month
Note This property is required if the PaymentType property is set to Prepaid.
EncryptionKeyStringNoNoThe ID of the key that is managed by Key Management Service (KMS). None.
DBClusterNetworkTypeStringYesNoThe network type of the cluster. Set the value to VPC. This value specifies a virtual private cloud (VPC).
DBClusterTypeStringYesNoThe type of the cluster. Valid values:
  • Common: common cluster
  • Readonly: read-only cluster
  • Guard: disaster recovery cluster
VpcIdStringNoNoThe ID of the VPC. None.
DBClusterVersionStringYesNoThe version of the cluster. Valid values:
  • 21.8.10.19
  • 22.8.5.29
DBNodeCountIntegerYesNoThe number of nodes. Valid values:
  • Valid values for S-series nodes: 1 to 48
  • Valid values for C-series nodes: 1 to 24

UsedTimeIntegerNoNoThe usage duration of the cluster. Valid values:
  • Valid values if the Period property is set to Month: 1 to 9
  • Valid values if the Period property is set to Year: 1 to 3
PaymentTypeStringYesNoThe billing method of the cluster. Valid values:
  • Postpaid: pay-as-you-go
  • Prepaid: subscription

Return values

Fn::GetAtt

  • DBClusterId: the ID of the cluster.
  • PublicPort: the public port.
  • Bid: the business ID.
  • LockReason: the reason why the cluster is locked.
  • LockMode: the lock mode.
  • DBClusterVersion: the version of the cluster.
  • CommodityCode: the commodity code.
  • VpcId: the ID of the VPC.
  • Engine: the engine.
  • Category: the edition of the cluster.
  • DBClusterType: the type of the cluster.
  • DBClusterNetworkType: the network type of the cluster.
  • EncryptionType: the encryption type.
  • VpcCloudInstanceId: the ID of the cluster in the VPC.
  • Port: the port number that is used to connect to the cluster.
  • PaymentType: the payment method.
  • DBNodeStorage: the storage capacity of the node.
  • PublicConnectionString: the public endpoint.
  • EngineVersion: the version of the engine.
  • IsExpired: indicates whether the cluster has expired.
  • VSwitchId: the ID of the vSwitch.
  • Period: the billing cycle of the subscription cluster.
  • StorageType: the storage type of the cluster.
  • DBNodeCount: the number of nodes.
  • AliUid: the ID of the Alibaba Cloud account.
  • DBClusterDescription: the description of the cluster.
  • ConnectionString: the endpoint of the cluster.
  • ZoneId: the ID of the zone.
  • EncryptionKey: the ID of the key that is managed by KMS.
  • DbNodeStorageType: the storage type of the node.
  • DBNodeClass: the series of the node.

Examples

  • YAMLformat

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      VpcId:
        Type: String
        AssociationProperty: ALIYUN::ECS::VPC::VPCId
      ZoneId:
        Type: String
        AssociationProperty: ZoneId
      VSwitchId:
        Type: String
        AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
        AssociationPropertyMetadata:
          ZoneId: ${ZoneId}
          VpcId: ${VpcId}
      PaymentType:
        Type: String
        Description: PayType
    Resources:
      ClickHouseDBCluster:
        Type: ALIYUN::ClickHouse::DBCluster
        Properties:
          DbNodeStorageType: cloud_essd
          DBNodeStorage: 100
          Category: Basic
          ZoneId:
            Ref: ZoneId
          VSwitchId:
            Ref: VSwitchId
          Period: Month
          DBClusterNetworkType: VPC
          DBClusterType: Common
          VpcId:
            Ref: VpcId
          DBClusterVersion: 21.8.10.19
          DBNodeCount: 3
          UsedTime: 1
          PaymentType: Prepaid
    Outputs: {}
  • JSONformat

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "VpcId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
        },
        "ZoneId": {
          "Type": "String",
          "AssociationProperty": "ZoneId"
        },
        "VSwitchId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
          "AssociationPropertyMetadata": {
            "ZoneId": "${ZoneId}",
            "VpcId": "${VpcId}"
          }
        },
        "PaymentType": {
          "Type": "String",
          "Description": "PayType"
        }
      },
      "Resources": {
        "ClickHouseDBCluster": {
          "Type": "ALIYUN::ClickHouse::DBCluster",
          "Properties": {
            "DbNodeStorageType": "cloud_essd",
            "DBNodeStorage": 100,
            "Category": "Basic",
            "ZoneId": {
              "Ref": "ZoneId"
            },
            "VSwitchId": {
              "Ref": "VSwitchId"
            },
            "Period": "Month",
            "DBClusterNetworkType": "VPC",
            "DBClusterType": "Common",
            "VpcId": {
              "Ref": "VpcId"
            },
            "DBClusterVersion": "21.8.10.19",
            "DBNodeCount": 3,
            "UsedTime": 1,
            "PaymentType": "Prepaid"
          }
        }
      },
      "Outputs": {
      }
    }