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": String,
    "PaymentType": String
  }
}

属性

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

单位:GB

每100 GB递增。

EncryptionType String 加密类型。 取值:CloudDisk,表示云盘加密 。
Category String 集群系列。 取值:
  • Basic:基础版
  • HighAvailability:集群版
ZoneId String 可用区ID。 您可以调用DescribeRegions接口查询可用的可用区。
VSwitchId String 交换机ID。
DBClusterDescription String 集群备注信息。
Period String 预付费集群的付费周期。 取值:
  • Year:包年
  • Month:包月
说明 当PaymentType取值为Prepaid时,该参数必须指定。
EncryptionKey String 密钥管理服务KMS的密钥ID。
DBClusterNetworkType String 网络类型。 取值:VPC,表示专有网络。
DBClusterType String 实例类型。 取值:
  • Common:普通实例
  • Readonly:只读实例
  • Guard:灾难恢复实例
VpcId String 专有网络ID。
DBClusterVersion String 实例版本。 取值:19.15.2.2。
DBNodeCount Integer 节点组数量。 取值范围:
  • S系列:1~48
  • C系列:1~24

单位:个

UsedTime String 实例使用时间。 取值范围:
  • 当Period取值为Month时:1~9
  • 当Period取值为Year时:1~3
PaymentType String 付费类型。 取值:
  • 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:节点类型。

示例

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "DbNodeStorageType": {
      "Type": "String",
      "Description": "Instance node storage type. Valid values:  cloud_essd, cloud_efficiency."
    },
    "DBNodeStorage": {
      "Type": "Number",
      "Description": "DBNodeStorage"
    },
    "EncryptionType": {
      "Type": "String",
      "Description": "Kms key type, only cloud disk encryption is supported and the value is CloudDisk."
    },
    "Category": {
      "Type": "String",
      "Description": "Series, value: Basic: Basic version"
    },
    "ZoneId": {
      "Type": "String",
      "Description": "ZoneId"
    },
    "VSwitchId": {
      "Type": "String",
      "Description": "VSwitchId"
    },
    "DBClusterDescription": {
      "Type": "String",
      "Description": "DBClusterDescription"
    },
    "Period": {
      "Type": "String",
      "Description": "Prepaid time period.If the payment type is Prepaid, this parameter is mandatory. Specify the prepaid cluster as a yearly or monthly type. Valid values:  Year, Month."
    },
    "EncryptionKey": {
      "Type": "String",
      "Description": "KMS key ID"
    },
    "DBClusterNetworkType": {
      "Type": "String",
      "Description": "Network type of the cluster instance, value: VPC"
    },
    "DBClusterType": {
      "Type": "String",
      "Description": "Cluster instance type, value:  Common: normal instance;  Readonly: read-only instance; Guard: disaster recovery instance"
    },
    "VpcId": {
      "Type": "String",
      "Description": "VpcId"
    },
    "DBClusterVersion": {
      "Type": "String",
      "Description": "Version, value:  19.15.2.2"
    },
    "DBNodeCount": {
      "Type": "Number",
      "Description": "Number of node groups"
    },
    "UsedTime": {
      "Type": "String",
      "Description": "When Period is Month, the value of UsedTime is [1-9].  When Period is Year, the value of UsedTime is [1-3]"
    },
    "PaymentType": {
      "Type": "String",
      "Description": "PayType"
    }
  },
  "Resources": {
    "ClickHouseDBCluster": {
      "Type": "ALIYUN::ClickHouse::DBCluster",
      "Properties": {
        "DbNodeStorageType": {
          "Ref": "DbNodeStorageType"
        },
        "DBNodeStorage": {
          "Ref": "DBNodeStorage"
        },
        "EncryptionType": {
          "Ref": "EncryptionType"
        },
        "Category": {
          "Ref": "Category"
        },
        "ZoneId": {
          "Ref": "ZoneId"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "DBClusterDescription": {
          "Ref": "DBClusterDescription"
        },
        "Period": {
          "Ref": "Period"
        },
        "EncryptionKey": {
          "Ref": "EncryptionKey"
        },
        "DBClusterNetworkType": {
          "Ref": "DBClusterNetworkType"
        },
        "DBClusterType": {
          "Ref": "DBClusterType"
        },
        "VpcId": {
          "Ref": "VpcId"
        },
        "DBClusterVersion": {
          "Ref": "DBClusterVersion"
        },
        "DBNodeCount": {
          "Ref": "DBNodeCount"
        },
        "UsedTime": {
          "Ref": "UsedTime"
        },
        "PaymentType": {
          "Ref": "PaymentType"
        }
      }
    }
  },
  "Outputs": {
    "Category": {
      "Description": "Series, value: Basic: Basic version",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "Category"
        ]
      }
    },
    "Port": {
      "Description": "Connection port",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "Port"
        ]
      }
    },
    "DBClusterId": {
      "Description": "The id of DBCluster",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "DBClusterId"
        ]
      }
    },
    "EncryptionKey": {
      "Description": "KMS key ID",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "EncryptionKey"
        ]
      }
    },
    "DBClusterNetworkType": {
      "Description": "Network type of the cluster instance, value: VPC",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "DBClusterNetworkType"
        ]
      }
    },
    "DBClusterType": {
      "Description": "Cluster instance type, value:  Common: normal instance;  Readonly: read-only instance; Guard: disaster recovery instance",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "DBClusterType"
        ]
      }
    },
    "DBClusterVersion": {
      "Description": "Version, value:  19.15.2.2",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "DBClusterVersion"
        ]
      }
    },
    "CommodityCode": {
      "Description": "Product Code",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "CommodityCode"
        ]
      }
    },
    "DBNodeCount": {
      "Description": "Number of node groups",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "DBNodeCount"
        ]
      }
    },
    "PaymentType": {
      "Description": "PayType",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "PaymentType"
        ]
      }
    },
    "PublicConnectionString": {
      "Description": "Internet connection address",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "PublicConnectionString"
        ]
      }
    },
    "LockReason": {
      "Description": "Reason for lock",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "LockReason"
        ]
      }
    },
    "Bid": {
      "Description": "BusinessID",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "Bid"
        ]
      }
    },
    "Engine": {
      "Description": "Engine",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "Engine"
        ]
      }
    },
    "DBNodeStorage": {
      "Description": "DBNodeStorage",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "DBNodeStorage"
        ]
      }
    },
    "DbNodeStorageType": {
      "Description": "Instance node storage type. Valid values:  cloud_essd, cloud_efficiency.",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "DbNodeStorageType"
        ]
      }
    },
    "IsExpired": {
      "Description": "IsExpired",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "IsExpired"
        ]
      }
    },
    "EncryptionType": {
      "Description": "Kms key type, only cloud disk encryption is supported and the value is CloudDisk.",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "EncryptionType"
        ]
      }
    },
    "EngineVersion": {
      "Description": "EngineVersion",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "EngineVersion"
        ]
      }
    },
    "StorageType": {
      "Description": "StorageType",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "StorageType"
        ]
      }
    },
    "ZoneId": {
      "Description": "ZoneId",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "ZoneId"
        ]
      }
    },
    "VSwitchId": {
      "Description": "VSwitchId",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "VSwitchId"
        ]
      }
    },
    "DBClusterDescription": {
      "Description": "DBClusterDescription",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "DBClusterDescription"
        ]
      }
    },
    "Period": {
      "Description": "Prepaid time period.If the payment type is Prepaid, this parameter is mandatory. Specify the prepaid cluster as a yearly or monthly type. Valid values:  Year, Month.",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "Period"
        ]
      }
    },
    "LockMode": {
      "Description": "LockMode",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "LockMode"
        ]
      }
    },
    "DBNodeClass": {
      "Description": "DBNodeClass",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "DBNodeClass"
        ]
      }
    },
    "VpcId": {
      "Description": "VpcId",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "VpcId"
        ]
      }
    },
    "VpcCloudInstanceId": {
      "Description": "VpcCloudInstanceId",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "VpcCloudInstanceId"
        ]
      }
    },
    "ConnectionString": {
      "Description": "ConnectionString",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "ConnectionString"
        ]
      }
    },
    "PublicPort": {
      "Description": "PublicPort",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "PublicPort"
        ]
      }
    },
    "AliUid": {
      "Description": "AliUid",
      "Value": {
        "Fn::GetAtt": [
          "ClickHouseDBCluster",
          "AliUid"
        ]
      }
    }
  }
}

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Category:
    Description: 'Series, value: Basic: Basic version'
    Type: String
  DBClusterDescription:
    Description: DBClusterDescription
    Type: String
  DBClusterNetworkType:
    Description: 'Network type of the cluster instance, value: VPC'
    Type: String
  DBClusterType:
    Description: 'Cluster instance type, value:  Common: normal instance;  Readonly:
      read-only instance; Guard: disaster recovery instance'
    Type: String
  DBClusterVersion:
    Description: 'Version, value:  19.15.2.2'
    Type: String
  DBNodeCount:
    Description: Number of node groups
    Type: Number
  DBNodeStorage:
    Description: DBNodeStorage
    Type: Number
  DbNodeStorageType:
    Description: 'Instance node storage type. Valid values:  cloud_essd, cloud_efficiency.'
    Type: String
  EncryptionKey:
    Description: KMS key ID
    Type: String
  EncryptionType:
    Description: Kms key type, only cloud disk encryption is supported and the value
      is CloudDisk.
    Type: String
  PaymentType:
    Description: PayType
    Type: String
  Period:
    Description: 'Prepaid time period.If the payment type is Prepaid, this parameter
      is mandatory. Specify the prepaid cluster as a yearly or monthly type. Valid
      values:  Year, Month.'
    Type: String
  UsedTime:
    Description: When Period is Month, the value of UsedTime is [1-9].  When Period
      is Year, the value of UsedTime is [1-3]
    Type: String
  VSwitchId:
    Description: VSwitchId
    Type: String
  VpcId:
    Description: VpcId
    Type: String
  ZoneId:
    Description: ZoneId
    Type: String
Resources:
  ClickHouseDBCluster:
    Properties:
      Category:
        Ref: Category
      DBClusterDescription:
        Ref: DBClusterDescription
      DBClusterNetworkType:
        Ref: DBClusterNetworkType
      DBClusterType:
        Ref: DBClusterType
      DBClusterVersion:
        Ref: DBClusterVersion
      DBNodeCount:
        Ref: DBNodeCount
      DBNodeStorage:
        Ref: DBNodeStorage
      DbNodeStorageType:
        Ref: DbNodeStorageType
      EncryptionKey:
        Ref: EncryptionKey
      EncryptionType:
        Ref: EncryptionType
      PaymentType:
        Ref: PaymentType
      Period:
        Ref: Period
      UsedTime:
        Ref: UsedTime
      VSwitchId:
        Ref: VSwitchId
      VpcId:
        Ref: VpcId
      ZoneId:
        Ref: ZoneId
    Type: ALIYUN::ClickHouse::DBCluster
Outputs:
  AliUid:
    Description: AliUid
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - AliUid
  Bid:
    Description: BusinessID
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - Bid
  Category:
    Description: 'Series, value: Basic: Basic version'
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - Category
  CommodityCode:
    Description: Product Code
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - CommodityCode
  ConnectionString:
    Description: ConnectionString
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - ConnectionString
  DBClusterDescription:
    Description: DBClusterDescription
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - DBClusterDescription
  DBClusterId:
    Description: The id of DBCluster
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - DBClusterId
  DBClusterNetworkType:
    Description: 'Network type of the cluster instance, value: VPC'
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - DBClusterNetworkType
  DBClusterType:
    Description: 'Cluster instance type, value:  Common: normal instance;  Readonly:
      read-only instance; Guard: disaster recovery instance'
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - DBClusterType
  DBClusterVersion:
    Description: 'Version, value:  19.15.2.2'
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - DBClusterVersion
  DBNodeClass:
    Description: DBNodeClass
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - DBNodeClass
  DBNodeCount:
    Description: Number of node groups
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - DBNodeCount
  DBNodeStorage:
    Description: DBNodeStorage
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - DBNodeStorage
  DbNodeStorageType:
    Description: 'Instance node storage type. Valid values:  cloud_essd, cloud_efficiency.'
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - DbNodeStorageType
  EncryptionKey:
    Description: KMS key ID
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - EncryptionKey
  EncryptionType:
    Description: Kms key type, only cloud disk encryption is supported and the value
      is CloudDisk.
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - EncryptionType
  Engine:
    Description: Engine
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - Engine
  EngineVersion:
    Description: EngineVersion
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - EngineVersion
  IsExpired:
    Description: IsExpired
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - IsExpired
  LockMode:
    Description: LockMode
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - LockMode
  LockReason:
    Description: Reason for lock
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - LockReason
  PaymentType:
    Description: PayType
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - PaymentType
  Period:
    Description: 'Prepaid time period.If the payment type is Prepaid, this parameter
      is mandatory. Specify the prepaid cluster as a yearly or monthly type. Valid
      values:  Year, Month.'
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - Period
  Port:
    Description: Connection port
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - Port
  PublicConnectionString:
    Description: Internet connection address
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - PublicConnectionString
  PublicPort:
    Description: PublicPort
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - PublicPort
  StorageType:
    Description: StorageType
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - StorageType
  VSwitchId:
    Description: VSwitchId
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - VSwitchId
  VpcCloudInstanceId:
    Description: VpcCloudInstanceId
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - VpcCloudInstanceId
  VpcId:
    Description: VpcId
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - VpcId
  ZoneId:
    Description: ZoneId
    Value:
      Fn::GetAtt:
      - ClickHouseDBCluster
      - ZoneId