Creates a PolarDB cluster.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
polardb:CreateDBCluster | create |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the cluster. Note
You can call the DescribeRegions operation to query available regions.
| cn-hangzhou |
ZoneId | string | No | The zone ID of the cluster. Note
You can call the DescribeRegions operation to query available zones.
| cn-hangzhou-g |
Architecture | string | No | The CPU architecture. Valid values:
| X86 |
DBType | string | Yes | The type of the database engine. Valid values:
| MySQL |
DBVersion | string | Yes | The version of the database engine.
| 5.6 |
DBNodeClass | string | Yes | The node specifications. For more information, see the following topics:
Note
| polar.mysql.x2.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 automatic renewal. Valid values:
Default value: false. Note
This parameter is valid only when the PayType parameter is set to Prepaid.
| true |
Period | string | No | The subscription type of the subscription cluster. This parameter is required only when the PayType parameter is set to Prepaid. Valid values:
| Month |
UsedTime | string | No |
| 1 |
VPCId | string | No | The virtual private cloud (VPC) ID of the cluster. | vpc-********** |
VSwitchId | string | No | The vSwitch ID of the cluster. Note
If the VPCId parameter is specified, the VSwitchId parameter is required.
| vsw-********** |
CreationOption | string | No | The method that is used to create a cluster. Valid values:
Default value: Normal. Note
| Normal |
SourceResourceId | string | No | 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.
| rm-************* |
CloneDataPoint | string | No | The point in time when you want to clone data. Valid values:
Default value: LATEST. Note
If the CreationOption parameter is set to CloneFromRDS, the value of this parameter must be LATEST.
| LATEST |
ClientToken | string | No | 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. | 6000170000591aed949d0f5******************** |
ResourceGroupId | string | No | The ID of the resource group. | rg-************ |
SecurityIPList | string | No | The IP whitelist of the cluster. Note
The whitelist can contain multiple IP addresses. Separate multiple IP addresses with commas (,).
| 10.***.***.*** |
TDEStatus | boolean | No | Specifies whether to enable transparent data encryption (TDE). Default value: false. Valid values:
Note
| true |
GDNId | string | No | The ID of the Global Database Network (GDN). Note
This parameter is required only when the CreationOption parameter is set to CreateGdnStandby.
| gdn-*********** |
CreationCategory | string | No | The edition of the cluster. Default value: Normal. Valid values:
Note
For more information, see Product editions. | Normal |
DefaultTimeZone | string | No | The time zone of the cluster. The time must be in UTC. You can set the parameter to a value that is on the hour from -12:00 to +13:00. Example: 00:00. Default value: SYSTEM, which means that the value is the same as the time zone of the region. Note
This parameter is valid only when the DBType parameter is set 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 when the DBType parameter is set to MySQL.
| 1 |
BackupRetentionPolicyOnClusterDeletion | string | No | 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
| NONE |
StorageSpace | long | No | The storage space that uses the subscription billing method. Unit: GB. | 50 |
DBMinorVersion | string | No | 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.
| 8.0.1 |
ParameterGroupId | string | No | 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.
| pcpg-************** |
Tag | array<object> | No | 1 | |
object | No | 1 | ||
Key | string | No | 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 the Tag.N.Key parameter is paired with a value of the Tag.N.Value parameter.
| type |
Value | string | No | The value 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 the Tag.N.Value parameter is paired with a value of the Tag.N.Key parameter.
| test |
ServerlessType | string | No | The type of the serverless cluster. Set the value to AgileServerless. Note
This parameter is valid only for serverless clusters.
| AgileServerless |
ScaleMin | string | No | 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.
| 1 |
ScaleMax | string | No | 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.
| 3 |
AllowShutDown | string | No | Specifies whether to enable the no-activity suspension feature. Default value: false. Valid values:
Note
This parameter is valid 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 valid 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 valid only for serverless clusters.
| 4 |
StorageType | string | No | The storage type. Valid values for Enterprise Edition:
Valid values for Standard Edition:
Note
This parameter is invalid for serverless clusters.
| PSL4 |
StrictConsistency | string | No | Specifies whether to enable multi-zone data consistency. Valid values:
| ON |
LooseXEngine | string | No | Specifies whether to enable X-Engine. Valid values:
Note
This parameter takes effect only if you do not set CreationOption to CreateGdnStandby and you set DBType to MySQL and DBVersion to 8.0. To enable X-Engine on a node, make sure that the memory of the node is greater than or equal to 8 GB in size.
| ON |
ProvisionedIops | long | No | The provisioned read/write IOPS of the ESSD AutoPL disk. Valid values: 0 to min{50,000, 1,000 × Capacity - Baseline IOPS} Baseline IOPS = min{1,800 + 50 × Capacity, 50,000} Note
This parameter is available only if the StorageType parameter is set to ESSDAUTOPL.
| 1000 |
Response parameters
Examples
Sample success responses
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 | InvalidLowerCaseTableNames.Malformed | The specified LowerCaseTableNames value is invalid. | The specified lowercase letter name is invalid. |
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. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-11-16 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-10-12 | The Error code has changed | View Change Details |
2023-08-03 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-08-01 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-06-20 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-05-25 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-04-19 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-03-14 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2022-11-16 | The Error code has changed | View Change Details |
2022-11-02 | The Error code has changed. The request parameters of the API has changed | View Change Details |