Creates an AnalyticDB for PostgreSQL instance.
Description
This operation is called when you need to create AnalyticDB for PostgreSQL instances to meet the requirements of new applications or services.
Before you call this operation, make sure that you are familiar with the billing methods and pricing of AnalyticDB for PostgreSQL instances. For more information, see Billing methods and AnalyticDB for PostgreSQL pricing.
Limits
You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
Debugging
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. Note You can call the DescribeRegions operation to query the most recent region list.
|
ZoneId | String | Yes | cn-hangzhou-i |
The zone ID of the instance. Note You can call the DescribeRegions operation to query the most recent zone list.
|
EngineVersion | String | Yes | 6.0 |
The version of the database engine. Set the value to 6.0. |
Engine | String | Yes | gpdb |
The engine of the database. Set the value to gpdb. |
DBInstanceClass | String | No | gpdb.group.segsdx1 |
The instance type of the instance. For information, see Instance types. Note This parameter is required to create an instance in reserved storage mode.
|
DBInstanceGroupCount | String | No | 2 |
The number of compute groups. Valid values: 2, 4, 8, 12, 16, 24, 32, 64, 96, and 128. Note This parameter is required to create an instance in reserved storage mode.
|
DBInstanceDescription | String | No | test |
The description of the instance. |
SecurityIPList | String | Yes | 127.0.0.1 |
The IP address whitelist of the instance. A value of 127.0.0.1 specifies that no IP address is allowed for external access. You can call the ModifySecurityIps operation to modify the IP address whitelist after you create an instance. |
PayType | String | No | Prepaid |
The billing method of the instance. Valid values:
Note
|
Period | String | No | Month |
The unit of the subscription period. Valid values:
Note This parameter is required when PayType is set to Prepaid.
|
UsedTime | String | No | 1 |
The subscription period.
Note This parameter is required when PayType is set to Prepaid.
|
ClientToken | String | No | 0c593ea1-3bea-11e9-b96b-88********** |
The client token that is used to ensure the idempotence of the request. For more information, see How to ensure idempotence. |
InstanceNetworkType | String | No | VPC |
The network type of the instance. Set the value to VPC. Note
|
VPCId | String | No | vpc-bp******************* |
The ID of the VPC. Note
|
VSwitchId | String | No | vsw-bp******************* |
The ID of the vSwitch. Note
|
SegStorageType | String | No | cloud_essd |
The storage type of the instance. Valid values:
Note
|
InstanceSpec | String | No | 2C16G |
The specifications of compute nodes. Valid values for High-availability Edition instances in elastic storage mode:
Valid values for Basic Edition instances in elastic storage mode:
Valid values for instances in Serverless mode:
Note This parameter is required to create an instance in elastic storage mode or Serverless
mode.
|
SegNodeNum | String | No | 4 |
The number of compute nodes.
Note This parameter is required to create an instance in elastic storage mode or Serverless
mode.
|
MasterNodeNum | String | No | 1 |
The number of coordinator nodes. Valid values: 1 and 2. Note If this parameter is not specified, the value 1 is used.
|
DBInstanceMode | String | No | StorageElastic |
The resource type of the instance. Valid values:
Note This parameter is required.
|
StorageType | String | No | null |
This parameter is no longer used. |
DBInstanceCategory | String | No | HighAvailability |
The edition of the instance. Valid values:
Note This parameter is required to create an instance in elastic storage mode.
|
StorageSize | Long | No | 200 |
The storage capacity of the instance. Unit: GB. Valid values: 50 to 4000. Note This parameter is required to create an instance in elastic storage mode.
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 5414A4E5-4C36-4461-95FC-************ |
The ID of the request. |
DBInstanceId | String | gp-bp*************** |
The ID of the instance. |
Port | String | 3432 |
An invalid parameter. It is no longer returned when you call this operation. You can call the DescribeDBInstanceAttribute operation to query the port that is used to connect to the instance. |
ConnectionString | String | gp-bp***************.gpdb.rds.aliyuncs.com |
An invalid parameter. It is no longer returned when you call this operation. You can call the DescribeDBInstanceAttribute operation to query the endpoint that is used to connect to the instance. |
OrderId | String | 111111111111 |
The ID of the order. |
Examples
Sample requests
http(s)://gpdb.aliyuncs.com/?Action=CreateDBInstance
&RegionId=cn-hangzhou
&ZoneId=cn-hangzhou-i
&EngineVersion=6.0
&Engine=gpdb
&DBInstanceDescription=test
&SecurityIPList=127.0.0.1
&PayType=Prepaid
&Period=Month
&UsedTime=1
&InstanceNetworkType=VPC
&VPCId=vpc-bp*******************
&VSwitchId=vsw-bp*******************
&SegStorageType=cloud_essd
&InstanceSpec=2C16G
&SegNodeNum=4
&MasterNodeNum=1
&DBInstanceMode=StorageElastic
&DBInstanceCategory=HighAvailability
&StorageSize=200
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateDBInstanceResponse>
<RequestId>5414A4E5-4C36-4461-95FC-************</RequestId>
<DBInstanceId>gp-bp***************</DBInstanceId>
<OrderId>111111111111</OrderId>
</CreateDBInstanceResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "5414A4E5-4C36-4461-95FC-************",
"DBInstanceId" : "gp-bp***************",
"OrderId" : "111111111111"
}
Error codes
For a list of error codes, visit the API Error Center.