ALIYUN::ADBLake::DBCluster

ALIYUN::ADBLake::DBCluster类型用于创建AnalyticDB MySQL湖仓版(3.0)集群。

语法

{
  "Type": "ALIYUN::ADBLake::DBCluster",
  "Properties": {
    "ComputeResource": String,
    "DBClusterVersion": String,
    "PayType": String,
    "StorageResource": String,
    "VPCId": String,
    "VSwitchId": String,
    "ZoneId": String,
    "BackupSetId": String,
    "DBClusterDescription": String,
    "EnableDefaultResourcePool": Boolean,
    "PeriodType": String,
    "Period": String,
    "RestoreToTime": String,
    "ResourceGroupId": String,
    "RestoreType": String,
    "SourceDbClusterId": String,
    "Tags": List
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

ComputeResource

String

计算预留资源。

取值范围:0ACU~4096ACU,步长:16。1ACU约等于1核4 GB。

说明

参数填写时,需要带单位。

DBClusterVersion

String

AnalyticDB MySQL湖仓版集群的版本。

取值:5.0

PayType

String

付费类型。

取值:

  • Postpaid:按量付费。

  • Prepaid:包年包月。

StorageResource

String

存储预留资源。

取值范围:0ACU~2064ACU,步长:24。1ACU约等于1核4 GB。

说明

参数填写时,需要带单位。

VPCId

String

专有网络ID。

VSwitchId

String

虚拟交换机ID。

ZoneId

String

可用区ID。

说明

您可以调用DescribeRegions - 查询地域和可用区接口查看指定 AnalyticDB MySQL 湖仓版(3.0)集群的可用区ID。

BackupSetId

String

备份集的ID。

DBClusterDescription

String

集群描述。

约束:

  • 不能以http://或者https://开头。

  • 长度为 2~256个字符。

EnableDefaultResourcePool

Boolean

计算预留资源是否全部分配给默认资源组。

取值说明:

  • true(默认值):是。

  • false:否。

PeriodType

String

指定包年包月集群为包年或包月类型。

取值:

  • Year:包年类型。

  • Month:包月类型。

Period

String

指定包年包月集群的购买时长。

取值:

  • 当PeriodType为Year时,Period取值范围为:1~3(整数)。

  • 当PeriodType为Month时,Period取值范围为:1~9(整数)。

RestoreToTime

String

基于备份集恢复的时间点。

ResourceGroupId

String

资源组ID。

RestoreType

String

恢复方式。

取值:

  • backup:基于备份集恢复,您还需要传入参数BackupSetIdSourceDBClusterId

  • timepoint:基于时间点恢复,您还需要传入参数RestoreToTimeSourceDBClusterId

SourceDbClusterId

String

AnalyticDB MySQL数仓版集群的源实例ID

Tags

List

标签列表信息。

请参见Tags属性

Tags语法

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

Tags属性

属性名称

类型

必须

允许更新

描述

约束

Key

String

标签键。

可设置1~20个。

Value

String

标签值。

可设置1~20个。

返回值

Fn::GetAtt

  • DBClusterId:AnalyticDB MySQL湖仓版(3.0)集群ID。

  • OrderId:订单ID。

  • ConnectionString:集群的网络连接地址。

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  StorageResource:
    Type: String
    Description:
      en: |-
        The amount of reserved storage resources. Unit: AnalyticDB compute units (ACUs). Valid values: 0ACU to 2064ACU. The value must be in increments of 24 ACUs. Each ACU is equivalent to 1 core and 4 GB memory.
        Note This parameter must be specified with a unit.
    Required: true
  ZoneId:
    AssociationProperty: ZoneId
    Type: String
    Description:
      en: |-
        The zone ID.
        Note You can call the  DescribeRegions  operation to query the most recent zone list.
    Required: true
  VPCId:
    Type: String
    Description:
      en: The virtual private cloud (VPC) ID of the cluster.
    Required: true
  VSwitchId:
    AssociationPropertyMetadata:
      VpcId: ${VpcId}
      ZoneId: ${ZoneId}
    AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
    Type: String
    Description:
      en: The vSwitch ID of the cluster.
    Required: true
  ComputeResource:
    Type: String
    Description:
      en: |-
        The amount of reserved computing resources. Unit: ACUs. Valid values: 0ACU to 4096ACU. The value must be in increments of 16 ACUs. Each ACU is equivalent to 1 core and 4 GB memory.
        Note This parameter must be specified with a unit.
    Required: true
  PayType:
    Type: String
    Description:
      en: |-
        The billing method of the cluster. Valid values:
        Postpaid: pay-as-you-go.
        Prepaid: subscription.
    AllowedValues:
      - PayAsYouGo
      - Subscription
    Required: true
    Default: PayAsYouGo
  DBClusterVersion:
    Type: String
    Description:
      en: The version of the cluster. Set the value to 5.0.
    Required: true
Resources:
  DBCluster:
    Type: ALIYUN::ADBLake::DBCluster
    Properties:
      StorageResource:
        Ref: StorageResource
      ZoneId:
        Ref: ZoneId
      VPCId:
        Ref: VPCId
      VSwitchId:
        Ref: VSwitchId
      ComputeResource:
        Ref: ComputeResource
      PayType:
        Ref: PayType
      DBClusterVersion:
        Ref: DBClusterVersion
Outputs:
  DBClusterId:
    Description: The ID of the AnalyticDB for MySQL Data Lakehouse Edition (V3.0) cluster.
    Value:
      Fn::GetAtt:
        - DBCluster
        - DBClusterId
  OrderId:
    Description: The order ID.
    Value:
      Fn::GetAtt:
        - DBCluster
        - OrderId
  ConnectionString:
    Description: The public endpoint that is used to connect to the cluster.
    Value:
      Fn::GetAtt:
        - DBCluster
        - ConnectionString

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "StorageResource": {
      "Type": "String",
      "Description": {
        "en": "The amount of reserved storage resources. Unit: AnalyticDB compute units (ACUs). Valid values: 0ACU to 2064ACU. The value must be in increments of 24 ACUs. Each ACU is equivalent to 1 core and 4 GB memory.\nNote This parameter must be specified with a unit."
      },
      "Required": true
    },
    "ZoneId": {
      "AssociationProperty": "ZoneId",
      "Type": "String",
      "Description": {
        "en": "The zone ID.\nNote You can call the  DescribeRegions  operation to query the most recent zone list."
      },
      "Required": true
    },
    "VPCId": {
      "Type": "String",
      "Description": {
        "en": "The virtual private cloud (VPC) ID of the cluster."
      },
      "Required": true
    },
    "VSwitchId": {
      "AssociationPropertyMetadata": {
        "VpcId": "${VpcId}",
        "ZoneId": "${ZoneId}"
      },
      "AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
      "Type": "String",
      "Description": {
        "en": "The vSwitch ID of the cluster."
      },
      "Required": true
    },
    "ComputeResource": {
      "Type": "String",
      "Description": {
        "en": "The amount of reserved computing resources. Unit: ACUs. Valid values: 0ACU to 4096ACU. The value must be in increments of 16 ACUs. Each ACU is equivalent to 1 core and 4 GB memory.\nNote This parameter must be specified with a unit."
      },
      "Required": true
    },
    "PayType": {
      "Type": "String",
      "Description": {
        "en": "The billing method of the cluster. Valid values:\nPostpaid: pay-as-you-go.\nPrepaid: subscription."
      },
      "AllowedValues": [
        "PayAsYouGo",
        "Subscription"
      ],
      "Required": true,
      "Default": "PayAsYouGo"
    },
    "DBClusterVersion": {
      "Type": "String",
      "Description": {
        "en": "The version of the cluster. Set the value to 5.0."
      },
      "Required": true
    }
  },
  "Resources": {
    "DBCluster": {
      "Type": "ALIYUN::ADBLake::DBCluster",
      "Properties": {
        "StorageResource": {
          "Ref": "StorageResource"
        },
        "ZoneId": {
          "Ref": "ZoneId"
        },
        "VPCId": {
          "Ref": "VPCId"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "ComputeResource": {
          "Ref": "ComputeResource"
        },
        "PayType": {
          "Ref": "PayType"
        },
        "DBClusterVersion": {
          "Ref": "DBClusterVersion"
        }
      }
    }
  },
  "Outputs": {
    "DBClusterId": {
      "Description": "The ID of the AnalyticDB for MySQL Data Lakehouse Edition (V3.0) cluster.",
      "Value": {
        "Fn::GetAtt": [
          "DBCluster",
          "DBClusterId"
        ]
      }
    },
    "OrderId": {
      "Description": "The order ID.",
      "Value": {
        "Fn::GetAtt": [
          "DBCluster",
          "OrderId"
        ]
      }
    },
    "ConnectionString": {
      "Description": "The public endpoint that is used to connect to the cluster.",
      "Value": {
        "Fn::GetAtt": [
          "DBCluster",
          "ConnectionString"
        ]
      }
    }
  }
}