Creates a PolarDB cluster.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateDBCluster | The operation that you want to perform. Set the value to CreateDBCluster. |
RegionId | String | Yes | cn-hangzhou | The region ID of the cluster. Note You can call the DescribeRegions operation to query available regions. |
ZoneId | String | No | cn-hangzhou-g | The zone ID of the cluster. Note You can call the DescribeRegions operation to query available zones. |
DBType | String | Yes | MySQL | The type of the database engine. Valid values:
|
DBVersion | String | Yes | 5.6 | The version of the database engine.
|
DBNodeClass | String | Yes | polar.mysql.x2.medium | The specifications of the node.
|
ClusterNetworkType | String | No | VPC | The network type of the cluster. Only virtual private clouds (VPCs) are supported. Set the value to VPC. |
DBClusterDescription | String | No | test | The name of the cluster. The name must meet the following requirements:
|
PayType | String | Yes | Postpaid | The billing method. Valid values:
|
AutoRenew | Boolean | No | true | Specifies whether to enable automatic renewal. Valid values:
Default value: false. Note This parameter is valid only when the PayType parameter is set to Prepaid. |
Period | String | No | Month | The subscription type of the subscription cluster. This parameter is required only when the PayType parameter is set to Prepaid. Valid values:
|
UsedTime | String | No | 1 |
|
VPCId | String | No | vpc-********** | The virtual private cloud (VPC) ID of the cluster. |
VSwitchId | String | No | vsw-********** | The vSwitch ID of the cluster. Note If the VPCId parameter is specified, the VSwitchId parameter is required. |
CreationOption | String | No | Normal | The method that is used to create a cluster. Valid values:
Default value: Normal. Note If the DBType parameter is set to MySQL and the DBVersion parameter is set to 8.0, this parameter can be set to CreateGdnStandby. |
SourceResourceId | String | No | rm-************* | The ID of the source ApsaraDB RDS instance or PolarDB cluster. This parameter is required only when the CreationOption parameter is set to MigrationFromRDS, CloneFromRDS, or CloneFromPolarDB.
|
CloneDataPoint | String | No | LATEST | The point in time when you want to clone data. Valid values:
Note If the CreationOption parameter is set to CloneFromRDS, the value of this parameter must be LATEST. |
ClientToken | String | No | 6000170000591aed949d0f5******************** | The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length. The token is case-sensitive. |
ResourceGroupId | String | No | rg-************ | The ID of the resource group. |
SecurityIPList | String | No | 10.***.***.*** | The IP whitelist of the cluster. Note The whitelist can contain multiple IP addresses. Separate multiple IP addresses with commas (,). |
TDEStatus | Boolean | No | true | Specifies whether to enable transparent data encryption (TDE). Default value: false. Valid values:
Note
|
GDNId | String | No | gdn-*********** | The ID of the Global Database Network (GDN). Note This parameter is required only when the CreationOption parameter is set to CreateGdnStandby. |
CreationCategory | String | No | Normal | The edition of the cluster. Default value: Normal. Valid values:
Note
For more information, see Product editions. |
DefaultTimeZone | String | No | SYSTEM | The time zone of the cluster. You can set the parameter to a value that is on the hour from -12:00 to +13:00 based on UTC. Example: 00:00. Default value: SYSTEM. This value indicates that the time zone of the cluster is the same as the time zone of the region. Note This parameter is valid only when the DBType parameter is set to MySQL. |
LowerCaseTableNames | String | No | 1 | Specifies whether the table names are case-sensitive. Valid values:
Default value: 1. Note This parameter is valid only when the DBType parameter is set to MySQL. |
BackupRetentionPolicyOnClusterDeletion | String | No | NONE | The retention policy for the backup sets when you delete the cluster. Valid values:
The default value is NONE after you create a cluster. Note
|
StorageSpace | Long | No | 50 | The storage space that uses the subscription billing method. Unit: GB. |
DBMinorVersion | String | No | 8.0.1 | The minor version of the database engine. Valid values:
Note This parameter is valid only when the DBType parameter is set to MySQL and the DBVersion parameter is set to 8.0. |
ParameterGroupId | String | No | pcpg-************** | The ID of the parameter template. Note You can call the DescribeParameterGroups operation to query the details of all parameter templates of a specified region, such as the ID of a parameter template. |
Tag.N.Key | String | No | type | The key of the tag that you want to create for the cluster. To create multiple tags for a cluster at a time, click the + icon. Note You can create up to 20 key-value pairs of tags at a time. Each value of Tag.N.Key is paired with a value of Tag.N.Value . |
Tag.N.Value | String | No | test | The value of the tag that you want to create. To create multiple tags for a cluster at a time, click the + icon. Note You can create up to 20 key-value pairs of tags at a time. Each value of the Tag.N.Value parameter is paired with a value of the Tag.N.Key parameter. |
ServerlessType | String | No | AgileServerless | The type of the serverless cluster. Set the value to AgileServerless. Note This parameter is valid only for serverless clusters. |
ScaleMin | String | No | 1 | The minimum number of PCUs per node for scaling. Valid values: 1 PCU to 31 PCUs. Note This parameter is valid only for serverless clusters. |
ScaleMax | String | No | 3 | The maximum number of PCUs per node for scaling. Valid values: 1 PCU to 32 PCUs. Note This parameter is valid only for serverless clusters. |
AllowShutDown | String | No | true | Specifies whether to enable the no-activity suspension feature. Default value: false. Valid values:
|
ScaleRoNumMin | String | No | 2 | The minimum number of read-only nodes for scaling. Valid values: 0 to 15. Note This parameter is valid only for serverless clusters. |
ScaleRoNumMax | String | No | 4 | The maximum number of read-only nodes for scaling. Valid values: 0 to 15. Note This parameter is valid only for serverless clusters. |
StorageType | String | No | PSL4 | The storage type. Valid values for Enterprise Edition:
Valid values for Standard Edition:
|
DBNodeNum | Integer | No | 1 | The number of Standard Edition nodes. Default value: 1. Valid values:
|
HotStandbyCluster | String | No | ON | Specifies whether to enable the hot standby storage cluster feature. Valid values:
|
ProxyType | String | No | Exclusive | The type of PolarProxy. Default value: OFF. Valid values:
|
ProxyClass | String | No | polar.maxscale.g2.medium.c | The specifications of the Standard Edition PolarProxy. Valid values:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | E56531A4-E552-40BA-9C58-137B80****** | The ID of the request. |
ResourceGroupId | String | rg-*************** | The ID of the resource group. |
DBClusterId | String | pc-bp1s826a1up****** | The ID of the cluster. |
OrderId | String | 211454967****** | The ID of the order. |
Examples
Sample requests
http(s)://polardb.aliyuncs.com/?Action=CreateDBCluster
&RegionId=cn-hangzhou
&ZoneId=cn-hangzhou-g
&DBType=MySQL
&DBVersion=5.6
&DBNodeClass=polar.mysql.x2.medium
&ClusterNetworkType=VPC
&DBClusterDescription=test
&PayType=Postpaid
&AutoRenew=true
&Period=Month
&UsedTime=1
&VPCId=vpc-**********
&VSwitchId=vsw-**********
&CreationOption=Normal
&SourceResourceId=rm-*************
&CloneDataPoint=LATEST
&ClientToken=6000170000591aed949d0f5********************
&ResourceGroupId=rg-************
&SecurityIPList=10.***.***.***
&TDEStatus=true
&GDNId= gdn-***********
&CreationCategory=Normal
&DefaultTimeZone=SYSTEM
&LowerCaseTableNames=1
&BackupRetentionPolicyOnClusterDeletion=NONE
&StorageSpace=50
&DBMinorVersion=8.0.1
&ParameterGroupId=pcpg-**************
&Tag=[{"Key":"type","Value":"test"}]
&ServerlessType=AgileServerless
&ScaleMin=1
&ScaleMax=3
&AllowShutDown=true
&ScaleRoNumMin=2
&ScaleRoNumMax=4
&StorageType=PSL4
&DBNodeNum=1
&HotStandbyCluster=ON
&ProxyType=Exclusive
&ProxyClass=polar.maxscale.g2.medium.c
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateDBClusterResponse>
<RequestId>E56531A4-E552-40BA-9C58-137B80******</RequestId>
<ResourceGroupId>rg-***************</ResourceGroupId>
<DBClusterId>pc-bp1s826a1up******</DBClusterId>
<OrderId>211454967******</OrderId>
</CreateDBClusterResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "E56531A4-E552-40BA-9C58-137B80******",
"ResourceGroupId" : "rg-***************",
"DBClusterId" : "pc-bp1s826a1up******",
"OrderId" : "211454967******"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidBackupRetentionPolicyOnClusterDeletion.Malformed | The specified BackupRetentionPolicyOnClusterDeletion is invalid. | The error message returned because the specified BackupRetentionPolicyOnClusterDeletion parameter is invalid. |
400 | InvalidLowerCaseTableNames.Malformed | The specified LowerCaseTableNames is invalid. | The error message returned because the specified LowerCaseTableNames parameter is invalid. |
400 | InvalidDefaultTimeZone.Malformed | The specified DefaultTimeZone is invalid. | The error message returned because the specified DefaultTimeZone parameter is invalid. |
400 | Location.FailedGetSubDomain | The specified regionId does not match the zoneId or the zoneId does not exist. | The error message returned because the specified region ID or zone ID is invalid or the specified zone ID does not exist. |
400 | InvalidLowerCaseTableNames.Malformed | The specified LowerCaseTableNames value is invalid. | The error message returned because the specified lowercase letter name is invalid. |
400 | MissParameter.GDNId | The GDNId parameter is required. | The error message returned because the GDNId parameter is not specified. |
For a list of error codes, see Service error codes.