Creates a PolarDB-X instance.
Debugging
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:
|
| 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:
|
| 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.
|
| 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.
|
| 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:
|
| 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:
|
| DnClass | String | No | mysql.n4.medium.25 | The specifications of the storage node. Valid values:
|
| 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.