Creates a PolarDB cluster.
Operation description
A DBLink can connect two PolarDB for PostgreSQL (Compatible with Oracle) clusters, or connect a PolarDB for PostgreSQL (Compatible with Oracle) cluster to a self-managed PostgreSQL database on an ECS instance. You can use DBLink to query data across clusters.
You can create up to 10 DBLinks for a cluster.
A DBLink occupies one DBLink quota on both the source cluster and the destination cluster.
The source cluster and the destination cluster or destination ECS instance must be in the same region.
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 available regions. |
cn-hangzhou |
| ZoneId |
string |
No |
The zone ID. Note
You can call the DescribeRegions operation to query available zones. |
cn-hangzhou-j |
| Architecture |
string |
No |
The CPU architecture. Valid values:
Valid values:
|
X86 |
| DBType |
string |
Yes |
The type of the database engine. Valid values:
|
MySQL |
| DBVersion |
string |
Yes |
The database DPI engine version number.
Note
To create a serverless cluster for PolarDB for PostgreSQL, only version 14 is supported. |
5.6 |
| DBNodeClass |
string |
No |
The node specification. For more information, see the following topics:
Note
|
polar.mysql.x4.medium |
| ClusterNetworkType |
string |
No |
The network type of the cluster. Only virtual private clouds (VPCs) are supported. Set the value to VPC. |
VPC |
| DBClusterDescription |
string |
No |
The name of the cluster. The name 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 takes effect only when PayType is set to Prepaid. |
true |
| Period |
string |
No |
This is a required parameter to pass when PayType is set to Prepaid. Specifies the subscription type of the subscription cluster.
|
Month |
| UsedTime |
string |
No |
This parameter is required when PayType is set to Prepaid.
|
1 |
| VPCId |
string |
No |
The VPC ID. |
vpc-********** |
| VSwitchId |
string |
No |
The vSwitch ID. Note
If you specify VPCId, you must also specify VSwitchId. |
vsw-********** |
| CreationOption |
string |
No |
The method used to create the cluster. Valid values:
Default value: Normal. Note
When DBType is set to MySQL and DBVersion is set to 8.0, you can set this parameter to CreateGdnStandby. |
Normal |
| SourceResourceId |
string |
No |
Instance ID of the source ApsaraDB RDS instance or the source PolarDB cluster. This parameter is required only when CreationOption is set to MigrationFromRDS, CloneFromRDS, CloneFromPolarDB, or RecoverFromRecyclebin.
|
rm-************* |
| CloneDataPoint |
string |
No |
The point in time at which data is cloned. Valid values:
Default value: LATEST. Note
If CreationOption is set to CloneFromRDS, this parameter can only be set to LATEST. |
LATEST |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. The token is generated by the client and must be unique among different requests. The token is case-sensitive and cannot exceed 64 ASCII characters in length. |
6000170000591aed949d0f5******************** |
| ResourceGroupId |
string |
No |
The ID of the resource group. |
rg-************ |
| SecurityIPList |
string |
No |
The IP whitelist of the PolarDB cluster. Note
You can configure multiple IP addresses in the whitelist. Separate multiple 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 when CreationOption is set to CreateGdnStandby. |
gdn-*********** |
| CreationCategory |
string |
No |
The edition of the cluster. Valid values:
Note
For more information about editions, see Product editions. |
Normal |
| DefaultTimeZone |
string |
No |
The default time zone of the cluster (UTC). The value can be any time frame within the range of -12:00 to +13:00, such as 00:00. Default value: SYSTEM, which indicates that the default time zone is the same as the time zone of the region. Note
This parameter takes effect only when DBType is set to MySQL. |
SYSTEM |
| LowerCaseTableNames |
string |
No |
Specifies whether table names are case-sensitive. Valid values:
Default value: 1. Note
This parameter takes effect only when DBType is set to MySQL. |
1 |
| BackupRetentionPolicyOnClusterDeletion |
string |
No |
The data retention policy applied when the cluster is deleted. Valid values:
When a cluster is created, the default value is NONE, which means backups are not retained upon cluster deletion. Note
|
NONE |
| StorageSpace |
integer |
No |
The storage space for subscription (pay-by-space) billing. Unit: GB. Note
|
50 |
| DBMinorVersion |
string |
No |
The minor version of the database engine. Valid values:
Note
This parameter takes effect only when DBType is set to MySQL and DBVersion is set 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 list of parameter templates in the target region, including parameter template IDs. |
pcpg-************** |
| Tag |
array<object> |
No |
The list of tags. |
|
|
object |
No |
Note
You can call the DescribeDBClusters operation to query the tags of all clusters under your account. If this parameter is left empty, the default value is false. |
||
| Key |
string |
No |
The tag key. To add multiple tags to the target cluster at a time, click Add to add tag keys. Note
You can add up to 20 tag pairs at a time. |
type |
| Value |
string |
No |
The tag value. To add multiple tags to the target cluster at a time, click Add to add tag values. Note
You can add up to 20 tag pairs at a time. |
test |
| ServerlessType |
string |
No |
The serverless type. Set the value to AgileServerless (agile). Note
Only serverless clusters support this parameter. |
AgileServerless |
| ScaleMin |
string |
No |
The minimum scaling limit for a single node. Valid values: 1 PCU to 31 PCU. Note
Only serverless clusters support this parameter. |
1 |
| ScaleMax |
string |
No |
The maximum scaling limit for a single node. Valid values: 1 PCU to 32 PCU. Note
Only serverless clusters support this parameter. |
3 |
| AllowShutDown |
string |
No |
Specifies whether to enable No-activity Suspension. Valid values:
Note
Only serverless clusters support this parameter. Valid values:
|
true |
| ScaleRoNumMin |
string |
No |
The minimum number of read-only nodes for scaling. Valid values: 0 to 15. Note
Only serverless clusters support this parameter. |
2 |
| ScaleRoNumMax |
string |
No |
The maximum number of read-only nodes for scaling. Valid values: 0 to 15. Note
Only serverless clusters support this parameter. |
4 |
| StorageType |
string |
No |
Valid values for Enterprise Edition storage type:
Valid values for Standard Edition storage type:
|
PSL4 |
| DBNodeNum |
integer |
No |
The number of nodes for Standard Edition and Enterprise Edition. Valid values:
Note
|
1 |
| HotStandbyCluster |
string |
No |
Specifies whether to enable the hot standby cluster. Valid values:
Note
STANDBY takes effect only for PolarDB for PostgreSQL. Valid values:
|
ON |
| StrictConsistency |
string |
No |
Specifies whether multi-zone strong data consistency is enabled for the cluster. Valid values:
Valid values:
|
ON |
| StandbyAZ |
string |
No |
The zone of the hot standby cluster. Note
This parameter takes effect only when the hot standby cluster or multi-zone strong data consistency is enabled. |
cn-hangzhou-g |
| ProxyType |
string |
No |
The type of the database proxy. Valid values:
Note
The proxy type must match the type that corresponds to the node specifications of the cluster:
|
Exclusive |
| ProxyClass |
string |
No |
The specification of the database proxy for Standard Edition. Valid values:
|
polar.maxscale.g2.medium.c |
| LoosePolarLogBin |
string |
No |
Specifies whether to enable the Binlog feature. Valid values:
Note
This parameter takes effect only when DBType is set to MySQL. Valid values:
|
ON |
| LooseXEngine |
string |
No |
Specifies whether to enable the X-Engine storage engine. Valid values:
Note
This parameter takes effect only when CreationOption is not set to CreateGdnStandby, DBType is set to MySQL, and DBVersion is set to 8.0. The memory specification of the node with X-Engine enabled must be 8 GB or more. Valid values:
|
ON |
| LooseXEngineUseMemoryPct |
string |
No |
The percentage of memory allocated to the X-Engine storage engine. Valid values: integers from 10 to 90. Note
This parameter takes effect only when LooseXEngine is set to ON. |
50 |
| StoragePayType |
string |
No |
The billing method for storage. Valid values:
Valid values:
|
Prepaid |
| StorageAutoScale |
string |
No |
Specifies whether to enable automatic storage scaling for Standard Edition clusters. Valid values:
Valid values:
|
Enable |
| StorageUpperBound |
integer |
No |
The upper limit for automatic storage scaling of Standard Edition clusters. Unit: GB. Note
The maximum value is 32000. |
800 |
| ProvisionedIops |
integer |
No |
|
1000 |
| BurstingEnabled |
string |
No |
Specifies whether to enable I/O performance burst for ESSD AutoPL cloud disks. Valid values:
Note
This parameter is supported only when StorageType is set to ESSDAUTOPL. Valid values:
|
false |
| TargetMinorVersion |
string |
No |
The target minor engine version. |
8.0.1.1.54 |
| StorageEncryption |
boolean |
No |
Specifies whether to enable cloud disk encryption. Valid values:
Note
This parameter takes effect only when DBType is set to MySQL. Note
This parameter takes effect only when StorageType is set to a Standard Edition storage type. |
|
| StorageEncryptionKey |
string |
No |
The ID of a custom encryption key for cloud disk encryption in the same region as the instance. If you specify this parameter, cloud disk encryption is automatically enabled and cannot be disabled. To use the default service key for cloud disk encryption, leave this parameter empty. You can view the key ID in the Key Management Service (KMS) console or create a new key. Note
This parameter takes effect only when DBType is set to MySQL. Note
This parameter takes effect only when StorageType is set to a Standard Edition storage type. |
1022xxxxxxxx |
| SourceUid |
integer |
No |
The UID of the account that owns the source backup set in a cross-account backup restoration scenario. |
1022xxxxxxxx |
| CloudProvider |
string |
No |
The cloud service provider to which the instance belongs. |
ENS |
| EnsRegionId |
string |
No |
The ID of the Edge Node Service (ENS) node. This parameter is required when you create an ENS database. |
vn-hanoi-3 |
| AutoUseCoupon |
boolean |
No |
Specifies whether to automatically use coupons. Valid values:
|
true |
| PromotionCode |
string |
No |
The coupon code. If you do not specify this parameter, the default coupon is used. |
727xxxxxx934 |
| AgenticDbType |
string |
No |
The Agentic database engine type. Valid values:
|
dedicated |
| AgenticDbClusterId |
string |
No |
The Agentic cluster ID. |
pagc-****** |
| AgenticDbClusterDescription |
string |
No |
The Agentic cluster description. |
pagc-****** |
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 ID of the resource group. |
rg-*************** |
| AgenticDbClusterId |
string |
The Agentic cluster ID. |
pagc-*************** |
| AgenticDbClusterDescription |
string |
The Agentic cluster description. |
pagc-*************** |
Examples
Success response
JSON format
{
"DBClusterId": "pc-bp1s826a1up******",
"OrderId": "211454967******",
"RequestId": "E56531A4-E552-40BA-9C58-137B80******",
"ResourceGroupId": "rg-***************",
"AgenticDbClusterId": "pagc-***************",
"AgenticDbClusterDescription": "pagc-***************"
}
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.