Create Instance
Operation description
Before using this interface, please make sure you have fully understood the billing method and pricing of the AnalyticDB for PostgreSQL product.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
gpdb:CreateDBInstance | create |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | Region ID. Note
You can call the DescribeRegions interface to view available region IDs.
| cn-hangzhou |
ZoneId | string | Yes | Zone ID. Note
You can call the DescribeRegions interface to view available zone IDs.
| cn-hangzhou-i |
EngineVersion | string | Yes | Engine version. The values are as follows:
| 6.0 |
Engine | string | Yes | Database engine, with the value gpdb. | gpdb |
DBInstanceClass | string | No | Instance type. For more details, see the supplementary description of the DBInstanceClass parameter. Note
This parameter is required when creating a reserved storage mode instance.
| gpdb.group.segsdx1 |
DBInstanceGroupCount | string | No | Number of compute groups. The values are: 2, 4, 8, 12, 16, 24, 32, 64, 96, 128. Note
This parameter is required when creating a reserved storage mode instance.
| 2 |
DBInstanceDescription | string | No | Instance description. | test |
SecurityIPList | string | No | IP whitelist. 127.0.0.1 indicates that no external IP addresses are allowed to access. You can modify the IP whitelist by calling the ModifySecurityIps interface after the instance is created. | 127.0.0.1 |
PayType | string | No | Billing type. The values are as follows:
Note
| Prepaid |
Period | string | No | Unit of the duration for which resources are purchased. The values are as follows:
Note
This parameter is required when creating a subscription-billed instance.
| Month |
UsedTime | string | No | Duration for which resources are purchased. The values are as follows:
Note
This parameter is required when creating a subscription-billed instance.
| 1 |
ClientToken | string | No | Idempotence check. For more information, see How to Ensure Idempotence. | 0c593ea1-3bea-11e9-b96b-88********** |
InstanceNetworkType | string | No | Instance network type, with the value VPC. Note
| VPC |
VPCId | string | No | VPC ID. Note
| vpc-bp19ame5m1r3oejns**** |
VSwitchId | string | No | vSwitch ID. Note
| vsw-bp1cpq8mr64paltkb**** |
PrivateIpAddress | string | No | This parameter is deprecated and should not be passed. | null |
SegStorageType | string | No | Disk storage type, currently only ESSD cloud disks are supported, with the value cloud_essd. Note
This parameter is required when creating an elastic storage mode instance.
| cloud_essd |
SegDiskPerformanceLevel | string | No | ESSD cloud disk performance level. The values are as follows:
Note
| pl1 |
InstanceSpec | string | No | Compute node specifications. For high-availability versions of the elastic storage mode, the values are as follows:
For basic versions of the elastic storage mode, the values are as follows:
For Serverless mode, the values are as follows:
Note
This parameter is required when creating an elastic storage mode instance or a Serverless mode instance.
| 2C16G |
SegNodeNum | string | No | The number of compute nodes. The value description is as follows:
Note
This parameter is required when creating instances in the storage elastic mode or Serverless mode.
| 4 |
MasterNodeNum | string | No | This parameter is deprecated and should not be passed. | null |
DBInstanceMode | string | Yes | Instance resource type. The value description is as follows:
Note
This parameter is required.
| StorageElastic |
StorageType | string | No | This parameter is deprecated and should not be passed. | null |
DBInstanceCategory | string | No | Instance series. The value description is as follows:
Note
This parameter is required when creating an instance in the storage elastic mode.
| HighAvailability |
ResourceGroupId | string | No | The ID of the enterprise resource group where the instance is located. | rg-bp67acfmxazb4p**** |
StorageSize | long | No | The size of the storage space, in GB, with a value range of 50~6000. Note
This parameter is required when creating an instance in the storage elastic mode.
| 200 |
CreateSampleData | boolean | No | Whether to load sample datasets after the instance is created. The values are as follows:
Note
If this parameter is not specified, it defaults to not loading sample datasets.
| false |
Tag | array<object> | No | The Nth tag. The value of N ranges from 1 to 20. | |
object | No | The Nth tag. The value of N ranges from 1 to 20. | ||
Key | string | No | Tag key. The restrictions are as follows:
| TestKey |
Value | string | No | Tag value. The restrictions are as follows:
| TestValue |
ServerlessResource | integer | No | The threshold for computing resources. The value range is 8 to 32, with a step of 8, and the unit is ACU. The default value is 32. Note
This parameter is required only for Serverless auto-scheduling mode instances.
| 32 |
IdleTime | integer | No | The idle release wait time. When the duration without business traffic reaches the specified time, the instance will enter the idle state. The unit is seconds, with a minimum value of 60, and the default value is 600. Note
This parameter is required only for Serverless auto-scheduling mode instances.
| 600 |
ServerlessMode | string | No | The mode of the Serverless instance. The values are as follows:
Note
This parameter is required only for Serverless mode instances.
| Auto |
EncryptionType | string | No | Encryption type. The value description is as follows:
Note
Once cloud disk encryption is enabled, it cannot be disabled.
| CloudDisk |
EncryptionKey | string | No | Key ID. Note
If the value of the EncryptionType parameter is CloudDisk, you need to specify the encryption key ID within the same region through this parameter; otherwise, it should be empty.
| 0d2470df-da7b-4786-b981-88888888**** |
VectorConfigurationStatus | string | No | Whether to enable vector engine optimization. The value description is as follows:
Note
| enabled |
MasterCU | integer | No | Master resources, with the following values:
Note
Master resources above 8 CU will incur charges.
| 8 CU |
SrcDbInstanceName | string | No | ID of the source instance to be cloned. Note
You can call the DescribeDBInstances interface to view details of all AnalyticDB for PostgreSQL instances in the target region, including the instance ID.
| gp-bp*************** |
BackupId | string | No | Backup set ID. Note
You can call the DescribeDataBackups interface to view the backup set IDs of all backup sets under the target instance.
| 1111111111 |
EnableSSL | boolean | No | Indicates whether to enable SSL encryption. The values are as follows:
| false |
ProdType | string | No | Product type. The values are as follows:
Note
If this parameter is not specified, the default value is Standard Edition.
| standard |
DeployMode | string | No | Deployment mode. The values are as follows:
Note
| single |
StandbyZoneId | string | No | ID of the standby zone. Note
| cn-hangzhou-j |
StandbyVSwitchId | string | No | VSwitch ID of the standby zone. Note
| vsw-bp1cpq8mr64paltkb**** |
DBInstanceClass Parameter Supplement
Currently, AnalyticDB for PostgreSQL supports the following two types of instance specifications:
- High Performance: The specification name starts with
gpdb.group.segsdx
, characterized by providing better I/O capabilities, leading to higher performance. - High Capacity: The specification name starts with
gpdb.group.seghdx
, characterized by offering larger and more cost-effective space, meeting higher storage needs.
Therefore, when choosing an instance specification, it is recommended that you select based on the required storage space and computing power.
Additionally, AnalyticDB for PostgreSQL supports external table expansion based on OSS, and data compression on external storage can be achieved through gzip. Data that does not need to participate in real-time computation can be stored externally to further save on storage costs.
High Performance Instance Specifications are as shown in the table below:
[High Performance] Specification | CPU | Memory | Storage Space |
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 |
High Capacity Instance Specifications are as shown in the table below:
[High Capacity] Specification | CPU | Memory | Storage Space |
gpdb.group.seghdx4 | 4 Cores | 32 GB | 2 TB HDD |
gpdb.group.seghdx36 | 36 Cores | 288 GB | 18 TB HDD |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "5414A4E5-4C36-4461-95FC-************",
"DBInstanceId": "gp-bp12ga6v69h86****",
"Port": "3432",
"ConnectionString": "gp-bp12ga6v69h86****.gpdb.rds.aliyuncs.com",
"OrderId": "111111111111"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-10-11 | The request parameters of the API has changed | View Change Details |
2024-05-13 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2024-01-04 | The request parameters of the API has changed | View Change Details |
2023-12-18 | The request parameters of the API has changed | View Change Details |
2023-09-18 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2023-08-17 | The request parameters of the API has changed | View Change Details |
2023-08-17 | The request parameters of the API has changed | View Change Details |
2023-05-23 | The request parameters of the API has changed | View Change Details |
2023-05-04 | The request parameters of the API has changed | View Change Details |
2023-04-18 | The request parameters of the API has changed | View Change Details |