Creates a PolarDB cluster.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | No | CreateDBCluster |
The operation that you want to perform. Set the value to CreateDBCluster. |
DBNodeClass | String | Yes | polar.mysql.x2.medium |
The specification of the node. For more information, see Specifications of compute nodes. |
DBType | String | Yes | MySQL |
The type of the database engine. Valid values:
|
DBVersion | String | Yes | 5.6 |
The version number of the database engine. Valid values:
|
PayType | String | Yes | Postpaid |
The billing method. Valid values:
|
RegionId | String | Yes | cn-hangzhou |
The ID of the region. Note You can call the DescribeRegions operation to query available regions.
|
ZoneId | String | No | cn-hangzhou-g |
The ID of the zone. Note You can call the DescribeRegions operation to query available zones.
|
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:
|
AutoRenew | Boolean | No | true |
Specifies whether to enable automatic renewal. Valid values:
The default value is false. Note This parameter takes effect only when PayType is set to Prepaid.
|
Period | String | No | Month |
If PayType is set to Prepaid, this parameter is required. This parameter specifies whether the subscription is annual or monthly.
|
UsedTime | String | No | 1 |
|
VPCId | String | No | vpc-********** |
The ID of the VPC. |
VSwitchId | String | No | vsw-********** |
The ID of the vSwitch. |
CreationOption | String | No | Normal |
The method that is used to create a cluster. Valid values:
The default value is Normal. Note
|
SourceResourceId | String | No | rm-************* |
The ID of the source RDS instance or the ID of the source PolarDB cluster. This parameter is required only when CreationOption is set to MigrationFromRDS, CloneFromRDS, or CloneFromPolarDB.
|
CloneDataPoint | String | No | LATEST |
The time point of data to be cloned. Valid values:
Note If CreationOption is set to CloneFromRDS, the value of this parameter must be LATEST.
|
ClientToken | String | No | 6000170000591aed949d0f5******************** |
The client token is used to ensure the idempotence of requests. A client token is generated in the client and is unique for different requests. The value is case-sensitive and can contain a maximum of 64 ASCII characters in length. |
ResourceGroupId | String | No | rg-************ |
The ID of the resource group. |
SecurityIPList | String | No | 10.***. ***. *** |
The whitelist of the PolarDB cluster. |
TDEStatus | Boolean | No | true |
Specifies whether to enable transparent data encryption (TDE). Valid values:
Note
|
GDNId | String | No | gdn-*********** |
The ID of the global database network (GDN). Note This parameter is required if CreationOption is set to CreateGdnStandby.
|
CreationCategory | String | No | Normal |
The edition of the PolarDB service. Valid values:
Note
For more information, see Product editions. |
DefaultTimeZone | String | No | SYSTEM |
The time zone of the cluster. The time must be in UTC. Valid values:
|
LowerCaseTableNames | String | No | 1 |
Specifies whether the table name is case-sensitive. Valid values:
The default value is 1. Note This parameter takes effect only when DBType 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 when you create the cluster. The system deletes all backup sets after you delete the cluster. Note This parameter takes effect only when DBType is set to MySQL.
|
DBMinorVersion | String | No | 8.0.1 |
The minor version of the database engine.
|
ParameterGroupId | String | No | pcpg-************** |
The ID of the parameter template. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
DBClusterId | String | pc-**************** |
The ID of the cluster. |
OrderId | String | 111111111111111 |
The ID of the order. |
RequestId | String | E56531A4-E552-40BA-9C58-137B80****** |
The ID of the request. |
ResourceGroupId | String | rg-*************** |
The ID of the resource group. |
Examples
Sample requests
http(s)://polardb.aliyuncs.com/? Action=CreateDBCluster
&DBNodeClass=polar.mysql.x2.medium
&DBType=MySQL
&DBVersion=5.6
&PayType=Postpaid
&RegionId=cn-hangzhou
&<Common request parameters>
Sample success responses
XML
format
<CreateDBClusterResponse>
<RequestId>E56531A4-E552-40BA-9C58-137B80******</RequestId>
<ResourceGroupId>rg-***************</ResourceGroupId>
<DBClusterId>pc-****************</DBClusterId>
<OrderId>111111111111111</OrderId>
</CreateDBClusterResponse>
JSON
format
{
"RequestId": "E56531A4-E552-40BA-9C58-137B80******",
"ResourceGroupId": "rg-***************",
"DBClusterId": "pc-****************",
"OrderId": 111111111111111
}
Error codes
HttpCode | 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. |
For a list of error codes, visit the API Error Center.