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 and pricing. |
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 payment type. 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 auto-renewal. Valid values:
Default value: false Note This parameter only takes effect when PayType is set to Prepaid.
|
Period | String | No | Month |
If the payment type is Prepaid, this parameter is required. This parameter specifies whether the subscription type of the cluster is monthly subscription or annual subscription.
|
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:
Default value: 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 if 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 can be only 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 parameter value, but you must make sure that the parameter value is unique among different requests. The parameter 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 product edition. Valid values:
Note
|
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:
Default value: 1 Note This parameter only takes effect when DBType is set to MySQL.
|
BackupRetentionPolicyOnClusterDeletion | String | No | NONE |
The retention policy for retaining the backup sets when you delete the cluster. Valid values:
The default value is NONE when you create the cluster. The default value NONE indicates that no backup sets are retained when the cluster is deleted. Note This parameter only takes effect when DBType is set to MySQL.
|
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.