ALIYUN::POLARDB::DBCluster is used to create a PolarDB cluster.
Syntax
{
"Type": "ALIYUN::POLARDB::DBCluster",
"Properties": {
"VpcId": String,
"DBClusterDescription": String,
"DBType": String,
"ClusterNetworkType": String,
"RenewalStatus": String,
"AutoRenewPeriod": Integer,
"Period": Integer,
"ZoneId": String,
"SecurityGroupIds": List,
"Tags": List,
"SourceResourceId": String,
"MaintainTime": String,
"DBVersion": String,
"CreationOption": String,
"DBNodeClass": String,
"VSwitchId": String,
"SecurityIPList": String,
"CloneDataPoint": String,
"PayType": String,
"CreationCategory": String,
"BackupRetentionPolicyOnClusterDeletion": String,
"ResourceGroupId": String,
"DefaultTimeZone": String,
"GDNId": String,
"LowerCaseTableNames": Integer,
"DBClusterParameters": Map,
"TDEStatus": Boolean,
"PeriodUnit": String,
"ScaleRoNumMin": Integer,
"ScaleMax": Integer,
"AllowShutDown": Boolean,
"ServerlessType": String,
"ScaleRoNumMax": Integer,
"ScaleMin": Integer,
"StorageType": String,
"LooseXEngine": String,
"LoosePolarLogBin": String,
"StorageSpace": Integer,
"ProxyType": String,
"StandbyAZ": String,
"LooseXEngineUseMemoryPct": Integer,
"StorageUpperBound": Integer,
"StrictConsistency": String,
"StoragePayType": String,
"DBNodeNum": Integer,
"ProxyClass": String,
"HotStandbyCluster": String,
"StorageAutoScale": String,
"Architecture": String,
"DBMinorVersion": String,
"ParameterGroupId": String,
"RestartMasterNode": Boolean,
"ColdStorageOption": Map
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
VpcId | String | No | No | The virtual private cloud (VPC) ID. | None. |
DBClusterDescription | String | No | Yes | The description of the cluster. | The description must be 2 to 256 characters in length. It must start with a letter and cannot start with |
DBType | String | Yes | No | The type of the database engine. | Valid values:
|
ClusterNetworkType | String | No | No | The network type of the cluster. | Set the value to VPC. |
RenewalStatus | String | No | Yes | The auto-renewal state of the cluster. | Valid values:
|
AutoRenewPeriod | Integer | No | Yes | The auto-renewal period of the cluster. | Valid values:
Unit: month. |
Period | Integer | No | No | The subscription duration of the cluster. If you set the PayType property to Prepaid, you must specify this property. | Valid values:
Unit: month. |
ZoneId | String | No | No | The zone ID of the cluster. | You can call the DescribeRegions operation to query the available zones. |
SourceResourceId | String | No | No | The ID of the source ApsaraDB RDS instance or PolarDB cluster. | This property takes effect when you set the DBType property to MySQL and the DBVersion property to 5.6. The SourceResourceId property is required if you do not set the CreationOption property to Normal. |
SecurityGroupIds | List | No | Yes | The IDs of the security groups. | You can specify up to three security groups. |
Tags | List | No | Yes | The tags of the cluster. | You can specify up to 20 tags. For more information, see Tags properties. |
MaintainTime | String | No | Yes | The maintenance window of the cluster. | Specify the maintenance window in the ISO 8601 standard in the HH:mmZ-HH:mmZ format. For example, if you want to maintain the cluster from 00:00:00 to 01:00:00 (UTC+8), set this property to 16:00Z-17:00Z. |
DBVersion | String | Yes | No | The version of the database engine. | Valid values:
|
CreationOption | String | No | No | The method that you want use to create the cluster. | Valid values:
If you set the DBType property to MySQL and the DBVersion property to 5.6, you must set the CreationOption property to CloneFromRDS or MigrationFromRDS. |
DBNodeClass | String | Yes | No | The instance type of the node. | For more information, see Billable items. |
VSwitchId | String | No | No | The vSwitch ID of the cluster. | None. |
SecurityIPList | String | No | No | The IP address whitelist of the cluster. | None. |
CloneDataPoint | String | No | No | The point in time at which you want to clone data. | Valid values:
This property takes effect when you set the DBType property to MySQL, the DBVersion property to 5.6, and the CreationOption property to CloneFromRDS or CloneFromPolarDB. |
PayType | String | Yes | No | The billing method of the cluster. | Valid values:
|
CreationCategory | String | No | No | The cluster edition. | Set the value to Normal, which specifies Standard Edition. |
BackupRetentionPolicyOnClusterDeletion | String | No | No | The retention policy for the backup sets when you delete the cluster. | Valid values:
Note This property takes effect only when you set the DBType property to MySQL. |
ResourceGroupId | String | No | Yes | The ID of the resource group. | None. |
DefaultTimeZone | String | No | No | The time zone of the cluster. The time zone must be in UTC. | Default value: SYSTEM. The default time zone of the cluster is the same as the time zone of the region. You can set this property to a value that is on the hour from -12:00:00 to +13:00:00. Example: 00:00:00. Note This property takes effect only when you set the DBType property to MySQL. |
GDNId | String | No | No | The ID of the Global Database Network (GDN). | This property is required if you set the CreationOption property to CreateGdnStandby. |
LowerCaseTableNames | Integer | No | No | Specifies whether table names are case-sensitive. | Valid values:
Note This property takes effect only when you set the DBType property to MySQL. |
DBClusterParameters | Map | No | Yes | The parameters of the cluster. | For more information, see DBClusterParameters properties. |
TDEStatus | Boolean | No | Yes | Specifies whether to enable transparent data encryption (TDE). | Valid values:
Note The property takes effect when you set the DBType property to PostgreSQL or Oracle. |
PeriodUnit | String | No | No | The unit of the subscription duration. | Valid values:
|
ScaleRoNumMin | Integer | No | No | The minimum number of read-only nodes that you can scale in the cluster. | None. |
ScaleMax | Integer | No | No | The maximum number of nodes that you can scale in the cluster. | None. |
AllowShutDown | Boolean | No | No | Specifies whether to enable the no-activity suspension feature. | Valid values:
|
ServerlessType | String | No | No | The serverless type of the cluster. | Set the value to AgileServerless. |
ScaleRoNumMax | Integer | No | No | The maximum number of read-only nodes that you can scale in the cluster. | None. |
ScaleMin | Integer | No | No | The minimum number of nodes that you can scale in the cluster. | None. |
StorageType | String | No | No | The storage type of the cluster. | Valid values for Enterprise Edition clusters:
Valid values for Standard Edition clusters:
Note This property is not supported by serverless clusters. |
LooseXEngine | String | No | No | Specifies whether to enable the X-Engine feature. | Valid values:
Note This property takes effect only if you do not set CreationOption to CreateGdnStandby, and you set DBType to MySQL, and DBVersion to 8.0. To enable X-Engine, the memory size of the node must be no less than 16 GB. |
LoosePolarLogBin | String | No | No | Specifies whether to enable the binary logging feature. | Valid values:
Note This property takes effect when you set the DBType property to MySQL. |
StorageSpace | Integer | No | No | The storage space that is billed based on the subscription billing method. | Unit: GB. Note Valid values for PolarDB for MySQL Standard Edition: 20 to 32000. |
ProxyType | String | No | No | The type of the database proxy. | Valid values:
|
StandbyAZ | String | No | No | The zone where the hot standby storage cluster is stored. | This property is suitable for Standard Edition clusters of Multi-zone Edition. Note This property takes effect only when the multi-zone data consistency feature is enabled. |
LooseXEngineUseMemoryPct | Integer | No | No | The X-Engine memory usage rate. | The value is an integer that ranges from 10 to 90. Note This property takes effect only when you set the LooseXEngine property to ON. |
StorageUpperBound | Integer | No | No | The maximum storage capacity that is allowed for automatic storage expansion of the Standard Edition cluster. | Unit: GB. Note Maximum value: 32000. |
StrictConsistency | String | No | No | Specifies whether to enable the multi-zone data consistency feature. | Valid values:
|
StoragePayType | String | No | No | The billing method of the storage space. | Valid values:
|
DBNodeNum | Integer | No | No | The number of Standard Edition nodes. | Valid values:
Note Default value for Enterprise Edition: 2. Default values for Standard Edition: 1. This property takes effect only for PolarDB for MySQL clusters. |
ProxyClass | String | No | No | The specifications of the Standard Edition PolarProxy. | Valid values:
|
HotStandbyCluster | String | No | No | Specifies whether to enable the hot standby storage cluster feature. | Valid values:
Note The default value for Standard Edition clusters is STANDBY. |
StorageAutoScale | String | No | No | Specifies whether to enable the automatic storage expansion feature for Standard Edition clusters. | Valid values:
|
Architecture | String | No | No | The architecture of the CPU. | Valid values:
|
DBMinorVersion | String | No | No | The minor version of the cluster. | Valid values:
|
ParameterGroupId | String | No | No | The ID of the parameter template. | You can call the DescribeParameterGroups operation to query the parameter templates of a specified region, including the IDs of the parameter templates. |
RestartMasterNode | Boolean | No | No | Specifies whether to restart the primary node. | Valid values:
|
ColdStorageOption | Map | No | No | The option for cold data archiving. | For more information, see ColdStorageOption properties. |
Tags syntax
"Tags": [
{
"Key": String,
"Value": String
}
]
Tags properties
Property | Type | Required | Editable | Description | Constraint |
Key | String | Yes | No | The tag key. | The tag key must be 1 to 128 characters in length, and cannot contain |
Value | String | No | No | The tag value. | The tag value can be up to 128 characters in length, and cannot contain |
DBClusterParameters syntax
"DBClusterParameters": {
"Parameters": String,
"EffectiveTime": String
}
DBClusterParameters property
Property | Type | Required | Editable | Description | Constraint |
Parameters | String | No | Yes | The JSON string that consists of the parameters of the cluster and the parameter values. | All the parameter values are of the string type. |
EffectiveTime | String | No | Yes | The time when the parameters take effect. | Valid values:
|
ColdStorageOption syntax
"ColdStorageOption": {
"Description": String,
"Enable": Boolean
}
ColdStorageOption properties
Property | Type | Required | Editable | Description | Constraint |
Description | String | No | No | The description of the cold data archiving feature. | If you specify this property, the cold data archiving feature is enabled. The description can be up to 256 characters in length. |
Enable | Boolean | No | No | Specifies whether to enable the cold data archiving feature. | Valid values:
|
Return values
Fn::GetAtt
DBClusterId: the cluster ID.
OrderId: the order ID.
DBNodeIds: the IDs of the nodes in the cluster.
PrimaryEndpointId: the primary endpoint ID.
CustomEndpointIds: the IDs of the custom cluster endpoints.
CustomConnectionStrings: the custom connection strings of the cluster.
PrimaryConnectionString: the primary connection string of the cluster.
ClusterConnectionString: the custom connection string of the cluster.
ClusterEndpointId: the cluster endpoint ID.
PrimaryEndpointIds: the primary endpoint IDs of the cluster.
PrimaryConnectionStrings: the primary endpoints of the cluster.
ColdStorageInstanceId: the ID of the instance with the cold data archiving feature enabled.
DBClusterDescription: the description of the cluster.
Examples
For more examples, visit POLARDB.yml. In the examples, the ALIYUN::POLARDB::DBCluster, ALIYUN::POLARDB::Account, ALIYUN::POLARDB::DBInstance, ALIYUN::POLARDB::DBNodes, ALIYUN::POLARDB::AccountPrivilege, ALIYUN::POLARDB::DBClusterAccessWhiteList, and ALIYUN::POLARDB::DBClusterEndpointAddress resource types are used.