ALIYUN::ClickHouse::EnterpriseDBCluster

更新时间:
复制为 MD 格式

ALIYUN::ClickHouse::EnterpriseDBCluster类型用于创建企业版数据库实例。

语法

{
  "Type": "ALIYUN::ClickHouse::EnterpriseDBCluster",
  "Properties": {
    "Engine": String,
    "NodeScaleMin": Integer,
    "NodeCount": Integer,
    "NodeScaleMax": Integer,
    "VSwitchId": String,
    "VpcId": String,
    "ZoneId": String,
    "BackupSetId": String,
    "DBTimeZone": String,
    "DeploySchema": String,
    "DBInstanceDescription": String,
    "MultiZone": List,
    "ResourceGroupId": String,
    "StorageType": String,
    "SourceDBInstanceId": String,
    "StorageQuota": Integer,
    "Tags": List
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

Engine

String

引擎类型。

取值:

  • clickhouse

NodeScaleMin

Integer

serverless 节点弹性伸缩最小值。

取值范围 4-32。

NodeCount

Integer

节点个数。

取值范围 2-16。使用 NodeScaleMin、NodeScaleMax 配置弹性区间时必填。

NodeScaleMax

Integer

serverless 节点弹性伸缩最大值。

取值范围 4-32,且必须大于最小值

VSwitchId

String

交换机 ID。

VpcId

String

VPC ID。

ZoneId

String

可用区 ID。

BackupSetId

String

备份集 ID。

DBTimeZone

String

数据库内核时区设置。

DeploySchema

String

集群可用区部署状态。

取值:

  • single_az:server 部署到主可用区 ZoneId。

  • multi_az:server 部署到多可用区 MultiZones。

DBInstanceDescription

String

集群说明。

MultiZone

List

多可用区配置。

更多信息,请参考MultiZone属性

ResourceGroupId

String

集群资源组 ID。

StorageType

String

存储类型。

SourceDBInstanceId

String

集群例 ID。

StorageQuota

Integer

存储预购量(GB)。

Tags

List

集群绑定的自定义标签。

更多信息,请参考Tags属性

MultiZone语法

"MultiZone": [
  {
    "ZoneId": String,
    "VSwitchIds": List
  }
]

MultiZone属性

属性名称

类型

必须

允许更新

描述

约束

VSwitchIds

List

交换机 ID列表。

ZoneId

String

可用区 ID。

Tags语法

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

Tags属性

属性名称

类型

必须

允许更新

描述

约束

Key

String

标签键。

Value

String

标签值。

返回值

Fn::GetAtt

DBInstanceId:企业版数据库实例ID

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  NodeScaleMin:
    Type: Number
    Description:
      en: The minimum number of nodes for scaling.
    Required: true
    MinValue: 4
    MaxValue: 32
  ZoneId:
    AssociationProperty: ZoneId
    Type: String
    Description:
      en: The ID of the zone.
    Required: true
  NodeCount:
    Type: Number
    Description:
      en: The number of nodes.
    Required: true
    MinValue: 2
    MaxValue: 16
  VSwitchId:
    AssociationPropertyMetadata:
      VpcId: ${VpcId}
      ZoneId: ${ZoneId}
    AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
    Type: String
    Description:
      en: The ID of the VSwitch.
    Required: true
  VpcId:
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
    Type: String
    Description:
      en: The ID of the VPC.
    Required: true
  NodeScaleMax:
    Type: Number
    Description:
      en: The maximum number of nodes for scaling.
    Required: true
    MinValue: 4
    MaxValue: 32
  Engine:
    Type: String
    Description:
      en: The engine type.
    AllowedValues:
      - clickhouse
    Required: true
    Default: clickhouse
Resources:
  EnterpriseDBCluster:
    Type: ALIYUN::ClickHouse::EnterpriseDBCluster
    Properties:
      NodeScaleMin:
        Ref: NodeScaleMin
      ZoneId:
        Ref: ZoneId
      NodeCount:
        Ref: NodeCount
      VSwitchId:
        Ref: VSwitchId
      VpcId:
        Ref: VpcId
      NodeScaleMax:
        Ref: NodeScaleMax
      Engine:
        Ref: Engine
Outputs:
  DBInstanceId:
    Description: The ID of the database instance.
    Value:
      Fn::GetAtt:
        - EnterpriseDBCluster
        - DBInstanceId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "NodeScaleMin": {
      "Type": "Number",
      "Description": {
        "en": "The minimum number of nodes for scaling."
      },
      "Required": true,
      "MinValue": 4,
      "MaxValue": 32
    },
    "ZoneId": {
      "AssociationProperty": "ZoneId",
      "Type": "String",
      "Description": {
        "en": "The ID of the zone."
      },
      "Required": true
    },
    "NodeCount": {
      "Type": "Number",
      "Description": {
        "en": "The number of nodes."
      },
      "Required": true,
      "MinValue": 2,
      "MaxValue": 16
    },
    "VSwitchId": {
      "AssociationPropertyMetadata": {
        "VpcId": "${VpcId}",
        "ZoneId": "${ZoneId}"
      },
      "AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
      "Type": "String",
      "Description": {
        "en": "The ID of the VSwitch."
      },
      "Required": true
    },
    "VpcId": {
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
      "Type": "String",
      "Description": {
        "en": "The ID of the VPC."
      },
      "Required": true
    },
    "NodeScaleMax": {
      "Type": "Number",
      "Description": {
        "en": "The maximum number of nodes for scaling."
      },
      "Required": true,
      "MinValue": 4,
      "MaxValue": 32
    },
    "Engine": {
      "Type": "String",
      "Description": {
        "en": "The engine type."
      },
      "AllowedValues": [
        "clickhouse"
      ],
      "Required": true,
      "Default": "clickhouse"
    }
  },
  "Resources": {
    "EnterpriseDBCluster": {
      "Type": "ALIYUN::ClickHouse::EnterpriseDBCluster",
      "Properties": {
        "NodeScaleMin": {
          "Ref": "NodeScaleMin"
        },
        "ZoneId": {
          "Ref": "ZoneId"
        },
        "NodeCount": {
          "Ref": "NodeCount"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "VpcId": {
          "Ref": "VpcId"
        },
        "NodeScaleMax": {
          "Ref": "NodeScaleMax"
        },
        "Engine": {
          "Ref": "Engine"
        }
      }
    }
  },
  "Outputs": {
    "DBInstanceId": {
      "Description": "The ID of the database instance.",
      "Value": {
        "Fn::GetAtt": [
          "EnterpriseDBCluster",
          "DBInstanceId"
        ]
      }
    }
  }
}