This operation creates a PolarDB cluster.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
polardb:CreateDBCluster |
create |
*DBCluster
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. Note
You can call the DescribeRegions operation to query the most recent region list. |
cn-hangzhou |
| ZoneId |
string |
No |
The zone ID. Note
You can call the DescribeRegions operation to query the available zones. |
cn-hangzhou-j |
| Architecture |
string |
No |
The CPU architecture. Valid values:
|
X86 |
| DBType |
string |
Yes |
The database engine. Valid values:
|
MySQL |
| DBVersion |
string |
Yes |
The version of the database engine.
Note
To create a serverless cluster for PolarDB for PostgreSQL, you must set this parameter to 14. |
5.6 |
| DBNodeClass |
string |
No |
The node specifications. For more information, see the following documents:
Note
|
polar.mysql.x4.medium |
| ClusterNetworkType |
string |
No |
The network type of the cluster. Currently, only virtual private cloud (VPC) is supported. The value is fixed as VPC. |
VPC |
| DBClusterDescription |
string |
No |
The description of the cluster. The description must meet the following requirements:
|
test |
| PayType |
string |
Yes |
The billing method. Valid values:
|
Postpaid |
| AutoRenew |
boolean |
No |
Specifies whether to enable auto-renewal. Valid values:
Default value: false. Note
This parameter is valid only if the PayType parameter is set to Prepaid. |
true |
| Period |
string |
No |
This parameter is required if the PayType parameter is set to Prepaid. The subscription type of the subscription cluster.
|
Month |
| UsedTime |
string |
No |
This parameter is required if the PayType parameter is set to Prepaid.
|
1 |
| VPCId |
string |
No |
The VPC ID. |
vpc-********** |
| VSwitchId |
string |
No |
The virtual switch ID. Note
If you specify a VPCId, you must also specify this parameter. |
vsw-********** |
| CreationOption |
string |
No |
The method used to create the cluster. Valid values:
Default value: Normal. Note
If DBType is set to MySQL and DBVersion is set to 8.0, this parameter can be set to CreateGdnStandby. |
Normal |
| SourceResourceId |
string |
No |
The ID of the source ApsaraDB RDS instance or PolarDB cluster. This parameter is required only if you set CreationOption to MigrationFromRDS, CloneFromRDS, CloneFromPolarDB, or RecoverFromRecyclebin.
|
rm-************* |
| CloneDataPoint |
string |
No |
The point in time for the clone. Valid values:
Default value: LATEST. Note
If you set CreationOption to CloneFromRDS, you can only set this parameter to LATEST. |
LATEST |
| ClientToken |
string |
No |
A 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 the value is unique among different requests. The token is case-sensitive and cannot exceed 64 ASCII characters. |
6000170000591aed949d0f5******************** |
| ResourceGroupId |
string |
No |
The resource group ID. |
rg-************ |
| SecurityIPList |
string |
No |
The IP whitelist of the cluster. Note
You can add multiple IP addresses to the whitelist. Separate the IP addresses with commas (,). |
10.***.***.*** |
| TDEStatus |
boolean |
No |
Specifies whether to enable transparent data encryption (TDE). Valid values:
Note
|
true |
| GDNId |
string |
No |
The ID of the Global Database Network (GDN). Note
This parameter is required if CreationOption is set to CreateGdnStandby. |
gdn-*********** |
| CreationCategory |
string |
No |
The product series. Valid values:
Note
For more information about product series, see Product series. |
Normal |
| DefaultTimeZone |
string |
No |
The time zone of the cluster. The time zone must be a value from **-12:00 to +13:00** in the UTC+ Note
This parameter is valid only if you set DBType to MySQL. |
SYSTEM |
| LowerCaseTableNames |
string |
No |
Specifies whether the table names are case-sensitive. Valid values:
Default value: 1. Note
This parameter is valid only if you set DBType to MySQL. |
1 |
| BackupRetentionPolicyOnClusterDeletion |
string |
No |
The backup retention policy for the cluster when it is deleted. Valid values:
The default value is NONE when you create a cluster. This indicates that no backup sets are retained when the cluster is deleted. Note
|
NONE |
| StorageSpace |
integer |
No |
The storage space of the subscription cluster that uses the subscription billing method for storage. Unit: GB. Note
|
50 |
| DBMinorVersion |
string |
No |
The minor version of the database engine. Valid values:
Note
This parameter is valid only if you set DBType to MySQL and DBVersion to 8.0. |
8.0.1 |
| ParameterGroupId |
string |
No |
The ID of the parameter template. Note
You can call the DescribeParameterGroups operation to query the parameter templates in a region, including the ID of each parameter template. |
pcpg-************** |
| Tag |
array<object> |
No |
The tags of the cluster. |
|
|
object |
No |
|||
| Key |
string |
No |
The key of tag N. Note
You can add up to 20 tags. |
type |
| Value |
string |
No |
The value of tag N. Note
You can add up to 20 tags. |
test |
| ServerlessType |
string |
No |
The type of the serverless cluster. The value is fixed as AgileServerless. Note
This parameter is supported only for serverless clusters. |
AgileServerless |
| ScaleMin |
string |
No |
The minimum number of PolarDB Capacity Units (PCUs) for a single node. Valid values: 1 to 31. Note
This parameter is supported only for serverless clusters. |
1 |
| ScaleMax |
string |
No |
The maximum number of PCUs for a single node. Valid values: 1 to 32. Note
This parameter is supported only for serverless clusters. |
3 |
| AllowShutDown |
string |
No |
Specifies whether to enable No-activity Suspension. Valid values:
Note
This parameter is supported only for serverless clusters. |
true |
| ScaleRoNumMin |
string |
No |
The minimum number of read-only nodes for scaling. Valid values: 0 to 15. Note
This parameter is supported only for serverless clusters. |
2 |
| ScaleRoNumMax |
string |
No |
The maximum number of read-only nodes for scaling. Valid values: 0 to 15. Note
This parameter is supported only for serverless clusters. |
4 |
| StorageType |
string |
No |
The storage class of the Enterprise Edition cluster. Valid values:
The storage class of the Standard Edition cluster. Valid values:
|
PSL4 |
| DBNodeNum |
integer |
No |
The number of nodes for the Standard Edition or Enterprise Edition cluster. Valid values:
Note
|
1 |
| HotStandbyCluster |
string |
No |
Specifies whether to enable the hot standby cluster feature. Valid values:
Note
STANDBY is valid only for PolarDB for PostgreSQL. |
ON |
| StrictConsistency |
string |
No |
Specifies whether to enable strong consistency for multi-zone data. Valid values:
|
ON |
| StandbyAZ |
string |
No |
The zone of the hot standby cluster. Note
This parameter is valid only if you enable the hot standby cluster feature or strong consistency for multi-zone data. |
cn-hangzhou-g |
| ProxyType |
string |
No |
The type of the database proxy. Valid values:
Note
The proxy type must be consistent with the type of the node specifications of the cluster. For example:
|
Exclusive |
| ProxyClass |
string |
No |
The specifications of the database proxy for the Standard Edition cluster. Valid values:
|
polar.maxscale.g2.medium.c |
| LoosePolarLogBin |
string |
No |
Specifies whether to enable binary logging. Valid values:
Note
This parameter is valid only if you set DBType to MySQL. |
ON |
| LooseXEngine |
string |
No |
Specifies whether to enable the X-Engine storage engine. Valid values:
Note
This parameter is valid only if you set CreationOption to a value other than CreateGdnStandby, DBType to MySQL, and DBVersion to 8.0. The memory of a node with X-Engine enabled must be 8 GB or larger. |
ON |
| LooseXEngineUseMemoryPct |
string |
No |
The percentage of memory that is allocated to the X-Engine storage engine. Valid values: integers from 10 to 90. Note
This parameter is valid only if you set LooseXEngine to ON. |
50 |
| StoragePayType |
string |
No |
The billing method for storage. Valid values:
|
Prepaid |
| StorageAutoScale |
string |
No |
Specifies whether to enable automatic storage scaling for a Standard Edition cluster. Valid values:
|
Enable |
| StorageUpperBound |
integer |
No |
The upper limit of the storage space for the automatic scaling of a Standard Edition cluster. Unit: GB. Note
The maximum value is 32000. |
800 |
| ProvisionedIops |
integer |
No |
|
1000 |
| BurstingEnabled |
string |
No |
Specifies whether to enable the performance burst feature for the ESSD AutoPL disk. Valid values:
Note
This parameter is valid only when you set StorageType to ESSDAUTOPL. |
false |
| TargetMinorVersion |
string |
No |
||
| StorageEncryption |
boolean |
No |
Specifies whether to enable disk encryption. Valid values:
Note
This parameter is valid only if you set DBType to MySQL. Note
This parameter is valid only when the StorageType parameter is set to a storage class of the Standard Edition. |
|
| StorageEncryptionKey |
string |
No |
The ID of the custom key for disk encryption in the same region as the instance. If you specify this parameter, disk encryption is automatically enabled. After disk encryption is enabled, it cannot be disabled. If you want to use the default service key for disk encryption, leave this parameter empty. You can view the key ID or create a key in the Key Management Service (KMS) console. Note
This parameter is valid only if you set DBType to MySQL. Note
This parameter is valid only when the StorageType parameter is set to a storage class of the Standard Edition. |
|
| SourceUid |
integer |
No |
1022xxxxxxxx |
|
| CloudProvider |
string |
No |
ENS |
|
| EnsRegionId |
string |
No |
vn-hanoi-3 |
|
| AutoUseCoupon |
boolean |
No |
||
| PromotionCode |
string |
No |
727xxxxxx934 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| DBClusterId |
string |
The cluster ID. |
pc-bp1s826a1up****** |
| OrderId |
string |
The order ID. |
211454967****** |
| RequestId |
string |
The request ID. |
E56531A4-E552-40BA-9C58-137B80****** |
| ResourceGroupId |
string |
The resource group ID. |
rg-*************** |
Examples
Success response
JSON format
{
"DBClusterId": "pc-bp1s826a1up******",
"OrderId": "211454967******",
"RequestId": "E56531A4-E552-40BA-9C58-137B80******",
"ResourceGroupId": "rg-***************"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidBackupRetentionPolicyOnClusterDeletion.Malformed | The specified BackupRetentionPolicyOnClusterDeletion is invalid. | The specified BackupRetentionPolicyOnClusterDeletion parameter is invalid. |
| 400 | InvalidLowerCaseTableNames.Malformed | The specified LowerCaseTableNames is invalid. | The specified LowerCaseTableNames parameter is invalid. |
| 400 | InvalidDefaultTimeZone.Malformed | The specified DefaultTimeZone is invalid. | The specified DefaultTimeZone parameter is invalid. |
| 400 | Location.FailedGetSubDomain | The specified regionId does not match the zoneId or the zoneId does not exist. | The specified region ID or zone ID is invalid or the specified zone ID does not exist. |
| 400 | MissParameter.GDNId | The GDNId parameter is required. | The GDNId parameter is required. |
| 400 | EntityNotExist.ResourceGroup | The resource group does not exist.. | The resource group does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.