Creates an AnalyticDB for PostgreSQL instance.
Operation description
Before you call this operation, make sure that you fully understand the billing methods and pricing of AnalyticDB for PostgreSQL.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
gpdb:CreateDBInstance |
create |
*DBInstance
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. Note
You can call the DescribeRegions operation to query available region IDs. |
cn-hangzhou |
| ZoneId |
string |
Yes |
The zone ID. Note
You can call the DescribeRegions operation to query available zone IDs. |
cn-hangzhou-i |
| EngineVersion |
string |
Yes |
The database engine version. Valid values:
|
6.0 |
| Engine |
string |
Yes |
The database engine. Set the value to gpdb. |
gpdb |
| DBInstanceClass |
string |
No |
The instance specifications. For more information, see the supplementary description of the DBInstanceClass parameter. Note
This parameter is required when you create a storage reservation mode instance. |
gpdb.group.segsdx1 |
| DBInstanceGroupCount |
string |
No |
The number of compute groups. Valid values: 2, 4, 8, 12, 16, 24, 32, 64, 96, and 128. Note
This parameter is required when you create a storage reservation mode instance. |
2 |
| DBInstanceDescription |
string |
No |
The description of the instance. |
test |
| SecurityIPList |
string |
No |
The IP address whitelist. A value of 127.0.0.1 indicates that no external IP addresses are allowed to access the instance. After the instance is created, you can call the ModifySecurityIps operation to modify the IP address whitelist. |
127.0.0.1 |
| PayType |
string |
No |
The billing method. Valid values:
Note
|
Prepaid |
| Period |
string |
No |
The unit of the subscription duration. Valid values:
Note
This parameter is required when you create a subscription instance. |
Month |
| UsedTime |
string |
No |
The subscription duration. Valid values:
Note
This parameter is required when you create a subscription instance. |
1 |
| ClientToken |
string |
No |
The client token used for idempotence checks. For more information, see How to ensure idempotence. |
0c593ea1-3bea-11e9-b96b-88********** |
| InstanceNetworkType |
string |
No |
The network type of the instance. Set the value to VPC. Note
|
VPC |
| VPCId |
string |
No |
The VPC ID. Note
|
vpc-bp19ame5m1r3oejns**** |
| VSwitchId |
string |
No |
The vSwitch ID. Note
|
vsw-bp1cpq8mr64paltkb**** |
| PrivateIpAddress |
string |
No |
[Deprecated] This parameter is deprecated. You do not need to specify this parameter. |
null |
| SegStorageType |
string |
No |
The cloud disk storage type. Currently, only ESSD cloud disks are supported. Set the value to cloud_essd. Note
This parameter is required when you create a storage elastic mode instance. |
cloud_essd |
| SegDiskPerformanceLevel |
string |
No |
The performance level (PL) of the ESSD cloud disk. Valid values:
Note
|
pl1 |
| InstanceSpec |
string |
No |
The node specifications of compute nodes. Valid values for storage elastic mode (high-availability edition):
Valid values for storage elastic mode (basic edition):
Valid values for Serverless mode:
Note
This parameter is required when you create a storage elastic mode instance or a Serverless mode instance. |
2C16G |
| SegNodeNum |
string |
No |
The number of compute nodes. Valid values:
Note
This parameter is required when you create a storage elastic mode instance or a Serverless mode instance. |
4 |
| MasterNodeNum |
string |
No |
[Deprecated] This parameter is deprecated. You do not need to specify this parameter. |
null |
| DBInstanceMode |
string |
Yes |
The resource type of the instance. Valid values:
Note
This parameter is required. |
StorageElastic |
| StorageType |
string |
No |
[Deprecated] This parameter is deprecated. You do not need to specify this parameter. |
null |
| DBInstanceCategory |
string |
No |
The instance edition. Valid values:
Note
This parameter is required when you create a storage elastic mode instance. |
HighAvailability |
| ResourceGroupId |
string |
No |
The ID of the enterprise resource group to which the instance belongs. |
rg-bp67acfmxazb4p**** |
| StorageSize |
integer |
No |
The storage capacity. Unit: GB. Valid values: 50 to 6000. Note
This parameter is required when you create a storage elastic mode instance. |
200 |
| CreateSampleData |
boolean |
No |
Specifies whether to load a sample dataset after the instance is created. Valid values:
Note
If you do not specify this parameter, the default value is false. |
false |
| Tag |
array<object> |
No |
The Nth tag. Valid values of N: 1 to 20. |
|
|
object |
No |
The Nth tag. Valid values of N: 1 to 20. |
||
| Key |
string |
No |
The tag key. The following limits apply:
|
TestKey |
| Value |
string |
No |
The tag value. The following limits apply:
|
TestValue |
| ServerlessResource |
integer |
No |
The compute resource threshold. Valid values: 16 to 1024. The step size is 8. Unit: ACU. Note
This parameter is required only for Serverless instances in automatic scheduling mode. |
16 |
| IdleTime |
integer |
No |
The idle release wait time. The instance transitions to an idle state after no service traffic is detected for the specified duration. Unit: seconds. Minimum value: 60. Default value: 600. Note
This parameter is required only for Serverless instances in automatic scheduling mode. |
600 |
| ServerlessMode |
string |
No |
The mode of the Serverless instance. Valid values:
Note
|
Auto |
| EncryptionType |
string |
No |
The encryption type. Valid values:
Note
Cloud disk encryption cannot be disabled after it is enabled. |
CloudDisk |
| EncryptionKey |
string |
No |
The encryption key ID. Note
If the EncryptionType parameter is set to CloudDisk, specify the encryption key ID in the same region. Otherwise, leave this parameter empty. |
0d2470df-da7b-4786-b981-88888888**** |
| VectorConfigurationStatus |
string |
No |
Specifies whether to enable vector engine optimization. Valid values:
Note
|
enabled |
| MasterCU |
integer |
No |
The master resources. Valid values:
Note
Master resources above 8 CU incur additional fees. |
8 CU |
| SrcDbInstanceName |
string |
No |
The ID of the source instance to clone. Note
You can call the DescribeDBInstances operation to query the details of all AnalyticDB for PostgreSQL instances in the target region, including instance IDs. |
gp-bp*************** |
| BackupId |
string |
No |
The backup set ID. Note
You can call the DescribeDataBackups operation to query the backup set IDs of all backup sets for the target instance. |
1111111111 |
| EnableSSL |
boolean |
No |
Indicates whether to enable Secure Sockets Layer (SSL) encryption. Valid values:
|
false |
| ProdType |
string |
No |
The product type. Valid values:
Note
If you do not specify this parameter, the default value is Standard Edition. |
standard |
| DeployMode |
string |
No |
The deployment mode. Valid values:
Note
|
single |
| StandbyZoneId |
string |
No |
The secondary zone ID. Note
|
cn-hangzhou-j |
| StandbyVSwitchId |
string |
No |
The vSwitch ID in the secondary zone. Note
|
vsw-bp1cpq8mr64paltkb**** |
| MasterAISpec |
string |
No |
Specify this parameter if you want to change the master node to a MasterAI node. Note
|
ADB.AIMedium.2 |
| AINodeSpecInfos |
array<object> |
No |
The AI node specifications information. |
|
|
object |
No |
The AI node specifications information. |
||
| AINodeNum |
string |
No |
The number of AI nodes. |
1 |
| AINodeSpec |
string |
No |
The AI node specifications. |
ADB.AIMedium.2 |
| CacheStorageSize |
string |
No |
The Serverless cache storage size. Valid values: 800 to 102400. The step size is 32 GB. Unit: GB. |
800 |
Supplementary description of the DBInstanceClass parameter
Currently, AnalyticDB for PostgreSQL supports the following two types of instance specifications:
High-performance: Specification names start with gpdb.group.segsdx. These specifications provide better I/O capabilities and higher performance.
High-capacity: Specification names start with gpdb.group.seghdx. These specifications provide larger and more cost-effective storage to meet higher storage requirements.
When you select instance specifications, select them based on your storage and computing requirements.
AnalyticDB for PostgreSQL also supports OSS-based external table extensions and data compression on external storage by using gzip. Data that does not need to participate in real-time computing can be stored in external storage to further reduce storage costs.
The following table describes the specifications of high-performance instances.
High-performance specification |
CPU |
Memory |
Storage |
gpdb.group.segsdx1 |
1 Core |
8 GB |
80 GB SSD |
gpdb.group.segsdx2 |
2 Cores |
16 GB |
160 GB SSD |
gpdb.group.segsdx16 |
16 Cores |
128 GB |
1.28 TB SSD |
The following table describes the specifications of high-capacity instances.
High-capacity specification |
CPU |
Memory |
Storage |
gpdb.group.seghdx4 |
4 Cores |
32 GB |
2 TB HDD |
gpdb.group.seghdx36 |
36 Cores |
288 GB |
18 TB HDD |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
5414A4E5-4C36-4461-95FC-************ |
| DBInstanceId |
string |
The instance ID. |
gp-bp12ga6v69h86**** |
| Port |
string |
[Deprecated] This parameter is deprecated and no value is returned. You can call the DescribeDBInstanceAttribute operation to query the port number of the instance. |
3432 |
| ConnectionString |
string |
[Deprecated] This parameter is deprecated and no value is returned. You can call the DescribeDBInstanceAttribute operation to query the endpoint of the instance. |
gp-bp12ga6v69h86****.gpdb.rds.aliyuncs.com |
| OrderId |
string |
The order ID. |
111111111111 |
Examples
Success response
JSON format
{
"RequestId": "5414A4E5-4C36-4461-95FC-************",
"DBInstanceId": "gp-bp12ga6v69h86****",
"Port": "3432",
"ConnectionString": "gp-bp12ga6v69h86****.gpdb.rds.aliyuncs.com",
"OrderId": "111111111111"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.