ALIYUN::ClickHouse::DBCluster类型用于创建ClickHouse集群。

语法

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

属性

属性名称类型必须允许更新描述约束
DbNodeStorageTypeString节点存储空间类型。取值:
  • cloud_essd:ESSD云盘
  • cloud_efficiency:高效云盘
DBNodeStorageInteger节点存储空间。取值范围:100~10000

单位:GB

每100 GB递增。

EncryptionTypeString加密类型。取值:CloudDisk,表示云盘加密 。
CategoryString集群系列。取值:
  • Basic:基础版
  • HighAvailability:集群版
ZoneIdString可用区ID。您可以调用DescribeRegions接口查询可用的可用区。
VSwitchIdString交换机ID。
DBClusterDescriptionString集群备注信息。
PeriodString预付费集群的付费周期。取值:
  • Year:包年
  • Month:包月
说明 当PaymentType取值为Prepaid时,该参数必须指定。
EncryptionKeyString密钥管理服务KMS的密钥ID。
DBClusterNetworkTypeString网络类型。取值:VPC,表示专有网络。
DBClusterTypeString集群类型。取值:
  • Common:正常集群。
  • Readonly:只读集群。
  • Guard:灾备集群。
VpcIdString专有网络ID。
DBClusterVersionString实例版本。取值:
  • 21.8.10.19
  • 22.8.5.29
DBNodeCountInteger节点组数量。取值范围:
  • S系列:1~48
  • C系列:1~24

单位:个

UsedTimeInteger实例使用时间。取值范围:
  • 当Period取值为Month时:1~9
  • 当Period取值为Year时:1~3
PaymentTypeString付费类型。取值:
  • Postpaid:按量付费
  • Prepaid:预付费(包年包月)

返回值

Fn::GetAtt

  • DBClusterId:实例ID。
  • PublicPort:公网端口。
  • Bid:业务流程的ID。
  • LockReason:锁定原因。
  • LockMode:锁定模式。
  • DBClusterVersion:实例版本。
  • CommodityCode:售卖商品代码。
  • VpcId:专有网络ID。
  • Engine:引擎。
  • Category:集群系列。
  • DBClusterType:集群类型。
  • DBClusterNetworkType:网络类型。
  • EncryptionType:加密类型。
  • VpcCloudInstanceId:VPC云实例ID。
  • Port:连接端口。
  • PaymentType:支付方式。
  • DBNodeStorage:节点存储空间。
  • PublicConnectionString:公网连接地址。
  • EngineVersion:引擎版本。
  • IsExpired:实例是否已过期。
  • VSwitchId:交换机ID。
  • Period:预付费集群的付费周期。
  • StorageType:存储类型。
  • DBNodeCount:节点组数量。
  • AliUid:阿里云账号。
  • DBClusterDescription:实例描述。
  • ConnectionString:连接字符串。
  • ZoneId:可用区ID。
  • EncryptionKey:KMS密钥ID。
  • DbNodeStorageType:节点存储类型。
  • DBNodeClass:节点类型。

示例

  • YAML格式

    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: {}
  • JSON格式

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