All Products
Search
Document Center

PolarDB:CreateDBInstance

Last Updated:Dec 26, 2025

Creates a PolarDB-X instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action String Yes CreateDBInstance

A required parameter. Set the value to CreateDBInstance.

RegionId String Yes cn-hangzhou

The region where the instance resides.

PayType String Yes PREPAY

The billing method of the instance. Valid values:

  • PREPAY: subscription
  • POSTPAY: pay-as-you-go
DBNodeCount Integer No 2

The number of nodes in the instance. The minimum value is 2.

DBNodeClass String No polarx.x4.2xlarge.2d

The specifications of the node. Valid values:

  • polarx.x4.medium.2e: 2 CPU cores, 8 GB of memory
  • polarx.x4.large.2e: 4 CPU cores, 16 GB of memory
  • polarx.x8.large.2e: 4 CPU cores, 32 GB of memory
  • polarx.x4.xlarge.2e: 8 CPU cores, 32 GB of memory
  • polarx.x8.xlarge.2e: 8 CPU cores, 64 GB of memory
  • polarx.x4.2xlarge.2e: 16 CPU cores, 64 GB of memory
  • polarx.x8.2xlarge.2e: 16 CPU cores, 128 GB of memory
  • polarx.x4.4xlarge.2e: 32 CPU cores, 128 GB of memory
  • polarx.x8.4xlarge.2e: 32 CPU cores, 256 GB of memory
  • polarx.st.8xlarge.2e: 60 CPU cores, 470 GB of memory
  • polarx.st.12xlarge.2e: 90 CPU cores, 720 GB of memory
ClientToken String No xxxxxx-xxx

A client-generated token that is used to ensure the idempotence of the request. Make sure that the token is unique for each request.

NetworkType String No vpc

The network type. Only Virtual Private Cloud (VPC) is supported.

VPCId String No vpc-*****

The ID of the VPC.

VSwitchId String No vsw-*********

The ID of the vSwitch.

UsedTime Integer No 1

For a subscription, specify the duration in months or years.

Note If the duration is specified in years, the valid values are 1, 2, and 3.
Period String No Month

The unit of the billing cycle. For subscription instances, valid values are `Year` and `Month`. For pay-as-you-go instances, the default value is `Hour`.

ResourceGroupId String No null

The ID of the resource group. This feature is not supported. You can leave this parameter empty.

AutoRenew Boolean No true

Specifies whether to enable auto-renewal. Default value: true.

  • true: yes
  • false: no
EngineVersion String Yes 5.7

The MySQL engine version. Valid values: `5.7` and `8.0`.

IsReadDBInstance Boolean No false

Specifies whether the instance is a read-only instance.

  • true: yes
  • false: no
PrimaryDBInstanceName String No pxc-*********

The name of the primary instance. This parameter is required if you create a read-only instance.

TopologyType String Yes 3azones

The topology type. Valid values:

  • 3azones: Three-zone deployment
  • 1azone: Single-zone deployment
PrimaryZone String No cn-shenzhen-e

The primary zone.

SecondaryZone String No cn-shenzhen-a

The secondary zone.

TertiaryZone String No cn-shenzhen-e

The tertiary zone.

ZoneId String No cn-hangzhou-a

The zone of the instance.

CnClass String No polarx.x4.medium.2e

The specifications of the compute node. Valid values:

  • polarx.x4.medium.2e: 2 CPU cores, 8 GB of memory
  • polarx.x4.large.2e: 4 CPU cores, 16 GB of memory
  • polarx.x8.large.2e: 4 CPU cores, 32 GB of memory
  • polarx.x4.xlarge.2e: 8 CPU cores, 32 GB of memory
  • polarx.x8.xlarge.2e: 8 CPU cores, 64 GB of memory
  • polarx.x4.2xlarge.2e: 16 CPU cores, 64 GB of memory
  • polarx.x8.2xlarge.2e: 16 CPU cores, 128 GB of memory
  • polarx.x4.4xlarge.2e: 32 CPU cores, 128 GB of memory
  • polarx.x8.4xlarge.2e: 32 CPU cores, 256 GB of memory
  • polarx.st.8xlarge.2e: 60 CPU cores, 470 GB of memory
  • polarx.st.12xlarge.2e: 90 CPU cores, 720 GB of memory
DnClass String No mysql.n4.medium.25

The specifications of the storage node. Valid values:

  • mysql.n4.medium.25: 2 CPU cores, 8 GB of memory
  • mysql.n4.large.25: 4 CPU cores, 16 GB of memory
  • mysql.x8.large.25: 4 CPU cores, 32 GB of memory
  • mysql.n4.xlarge.25: 8 CPU cores, 32 GB of memory
  • mysql.x8.xlarge.25: 8 CPU cores, 64 GB of memory
  • mysql.n4.2xlarge.25: 16 CPU cores, 64 GB of memory
  • mysql.x8.2xlarge.25: 16 CPU cores, 128 GB of memory
  • mysql.x4.4xlarge.25: 32 CPU cores, 128 GB of memory
  • mysql.x8.4xlarge.25: 32 CPU cores, 256 GB of memory
  • mysql.st.8xlarge.25: 60 CPU cores, 470 GB of memory
  • mysql.st.12xlarge.25: 90 CPU cores, 720 GB of memory
CNNodeCount String No 2

The number of compute nodes.

DNNodeCount String No 2

The number of storage nodes.

IsColumnarReadDBInstance Boolean No true

Specifies whether the instance to create is a column-store read-only instance.

Series String No enterprise

Enterprise Edition (enterprise)

Standard Edition (standard)

CnNums Integer No 2

Storage node disk space

DnStorageSpace String No 1500

Other parameters

Map No xxxx

Other parameters

Response parameters

Parameter

Type

Example

Description

DBInstanceName String pxc-*********

The name of the created instance.

RequestId String 9B2F3840-5C98-475C-B269-2D5C3A31797C

The ID of the request.

OrderId String 12345

The ID of the order.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateDBInstance
&RegionId=cn-hangzhou
&PayType=PREPAY
&DBNodeCount=2
&DBNodeClass=polarx.x4.2xlarge.2d
&ClientToken=xxxxxx-xxx
&NetworkType=vpc
&VPCId=vpc-*****
&VSwitchId=vsw-*********
&UsedTime=1
&Period=Month
&ResourceGroupId=null
&AutoRenew=true
&EngineVersion=2.0
&IsReadDBInstance=false
&PrimaryDBInstanceName=pxc-*********
&TopologyType=3azones
&PrimaryZone=cn-shenzhen-e
&SecondaryZone=cn-shenzhen-a
&TertiaryZone=cn-shenzhen-e
&ZoneId=cn-hangzhou-a
&CnClass=polarx.x4.medium.2e
&DnClass=mysql.n4.medium.25
&CNNodeCount=2
&DNNodeCount=2
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateDBInstanceResponse>
    <DBInstanceName>pxc-*********</DBInstanceName>
    <RequestId>9B2F3840-5C98-475C-B269-2D5C3A31797C</RequestId>
    <OrderId>12345</OrderId>
</CreateDBInstanceResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "DBInstanceName" : "pxc-*********",
  "RequestId" : "9B2F3840-5C98-475C-B269-2D5C3A31797C",
  "OrderId" : "12345"
}

Error codes

For more information about error codes, see the Error Center.