Creates a PolarDB-X instance.


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 of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateDBInstance

The operation that you want to perform. Set the value to CreateDBInstance.

RegionId String Yes cn-hangzhou

The region ID of the instance that you want to create.

PayType String Yes PREPAY

The billing method of the instance. Valid values:

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

The number of nodes that you want to create in the instance.

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

The specification of nodes. If you want to use a specification of 16 cores and 64 GB memory, set the value to polarx.x4.2xlarge.2e.

ClientToken String No xxxxxx-xxx

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 ensure that it is unique among different requests.

NetworkType String No vpc

The network type of the instance. Valid values:

  • vpc: virtual private cloud (VPC)
  • classic: classic networks
VPCId String No vpc-*****

The ID of the VPC.

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

The ID of the vSwitch.

UsedTime Integer No 1

The subscription period of the instance. Unit: month or year.

Period String No Month

The unit of the billing cycle for the instance. The valid values vary based on the billing method. If you use the subscription billing method, set the value to Year or Month. If you use the pay-as-you-go billing method, the value is automatically set to Hour.

ResourceGroupId String No null

The ID of the resource group to which the instance belongs. This parameter is currently unavailable and can be set to null.

AutoRenew Boolean No true

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

  • true: Enable auto-renewal.
  • false: Disable auto-renewal.
EngineVersion String Yes 2.0

The version of the database engine. Set the value to 2.0.

IsReadDBInstance Boolean No false

Specifies whether the instance is a read-only instance.

  • true: The instance is a read-only instance.
  • false: The instance is not a read-only instance.
PrimaryDBInstanceName String No pxc-*********

The name of the primary instance. If you create a read-only instance, you must configure this parameter.

TopologyType String No 3azones/1azone

The topology type of the instance.

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 ID of the zone in which the instance is located.

Response parameters

Name Type Example Description
DBInstanceName String pxc-*********

The name of the instance that you create.

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

The ID of the request.

OrderId String 12345

The ID of the order.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

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

Error codes

For a list of error codes, visit the API Error Center.