All Products
Search
Document Center

AnalyticDB:CreateDBInstance

Last Updated:Mar 21, 2026

Create an AnalyticDB for PostgreSQL instance.

Operation description

Before using this API, review the Pricing Model and Pricing for AnalyticDB for PostgreSQL.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

gpdb:CreateDBInstance

create

*DBInstance

acs:gpdb:{#regionId}:{#accountId}:dbinstance/*

  • gpdb:EncryptionType
  • gpdb:SSLEnabled
None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The Region ID.

Note

You can call the DescribeRegions operation to query available regions.

cn-hangzhou

ZoneId

string

Yes

The Zone ID.

Note

You can call the DescribeRegions operation to query available zones.

cn-hangzhou-i

EngineVersion

string

Yes

The engine version. Valid values:

  • 6.0: Greenplum 6.0.

  • 7.0: Greenplum 7.0.

6.0

Engine

string

Yes

The database engine. Set the value to gpdb.

gpdb

DBInstanceClass

string

No

The instance type. For information about instance types, see Instance types.

Note

This parameter is required when you create an instance in Reserved Storage Mode.

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 an instance in Reserved Storage Mode.

2

DBInstanceDescription

string

No

The description of the instance.

test

SecurityIPList

string

No

The IP Whitelist of the instance.

A value of 127.0.0.1 indicates that no external IP addresses can access the instance. To modify the IP Whitelist after the instance is created, call the ModifySecurityIps operation.

127.0.0.1

PayType

string

No

The billing method. Valid values:

  • Postpaid: Pay-As-You-Go.

  • Prepaid: Subscription.

Note
  • The default value is Postpaid.

  • For Subscription instances of one year or longer, discounts apply.

Prepaid

Period

string

No

The unit for the subscription duration. Valid values:

  • Month

  • Year

Note

This parameter is required if you set PayType to Prepaid.

Month

UsedTime

string

No

The subscription duration. Valid values:

  • If Period is set to Month, valid values are 1 to 9.

  • If Period is set to Year, valid values are 1 to 3.

Note

This parameter is required if you set PayType to Prepaid.

1

ClientToken

string

No

A client token that ensures request idempotence. 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
  • Only the VPC network type is supported.

  • If you do not specify this parameter, VPC is used by default.

VPC

VPCId

string

No

The ID of the Virtual Private Cloud (VPC).

Note
  • The VPC must be in the region specified by RegionId.

  • The Region of the VPC must match the RegionId.

vpc-bp19ame5m1r3oejns****

VSwitchId

string

No

The ID of the vSwitch.

Note
  • The vSwitch must be in the zone specified by ZoneId.

  • The Zone for the vSwitch must match the ZoneId.

vsw-bp1cpq8mr64paltkb****

PrivateIpAddress

string

No

This parameter is deprecated.

null

SegStorageType

string

No

The disk storage type. Set this to cloud_essd, which specifies an Enhanced SSD (ESSD), the only supported type.

Note

This parameter is required when you create an instance in Storage-Elastic Mode.

cloud_essd

SegDiskPerformanceLevel

string

No

The performance level of the ESSD. Valid values:

  • pl0: PL0

  • pl1: PL1

  • pl2: PL2

Note
  • This parameter is valid only when SegStorageType is set to cloud_essd.

  • The default value is pl1.

pl1

InstanceSpec

string

No

The compute node specifications.

Valid values for a High-Availability Edition instance in Storage-Elastic Mode:

  • 2C16G

  • 4C32G

  • 16C128G

Valid values for a Basic Edition instance in Storage-Elastic Mode:

  • 2C8G

  • 4C16G

  • 8C32G

  • 16C64G

Valid values for a Serverless Mode instance:

  • 4C16G

  • 8C32G

Note

This parameter is required when you create an instance in Storage-Elastic Mode or Serverless Mode.

2C16G

SegNodeNum

string

No

The number of compute nodes. Valid values:

  • For a High-Availability Edition instance in Storage-Elastic Mode, the value must be a multiple of 4, from 4 to 512.

  • For a Basic Edition instance in Storage-Elastic Mode, the value must be a multiple of 2, from 2 to 512.

  • For a Serverless Mode instance, the value must be a multiple of 2, from 2 to 512.

Note

This parameter is required when you create an instance in Storage-Elastic Mode or Serverless Mode.

4

MasterNodeNum

string

No

This parameter is deprecated.

null

DBInstanceMode

string

Yes

The instance mode. Valid values:

  • StorageElastic: Storage-Elastic Mode.

  • Serverless: Serverless Mode.

  • Classic: Reserved Storage Mode.

Note

This parameter is required.

StorageElastic

StorageType

string

No

This parameter is deprecated.

null

DBInstanceCategory

string

No

The instance edition. Valid values:

  • HighAvailability: High-Availability Edition.

  • Basic: Basic Edition.

Note

This parameter is required when you create an instance in Storage-Elastic Mode.

HighAvailability

ResourceGroupId

string

No

The ID of the resource group for the instance.

rg-bp67acfmxazb4p****

StorageSize

integer

No

The storage capacity of the instance. Unit: GB. The value can range from 50 to 6000.

Note

This parameter is required when you create an instance in Storage-Elastic Mode.

200

CreateSampleData

boolean

No

Indicates whether to load a sample dataset after the instance is created. Valid values:

  • true: Loads a sample dataset.

  • false: Does not load a sample dataset.

Note

The default is false.

false

Tag

array<object>

No

The tags to add to the instance. You can add up to 20 tags.

object

No

A tag.

Key

string

No

The Tag Key. The following limits apply:

  • Cannot be an empty string.

  • Maximum length: 128 characters.

  • Cannot start with aliyun or acs:, and cannot contain http:// or https://.

TestKey

Value

string

No

The Tag Value. The following limits apply:

  • Can be an empty string.

  • Maximum length: 128 characters.

  • Cannot start with acs: and cannot contain http:// or https://.

TestValue

ServerlessResource

integer

No

The amount of computing resources in AnalyticDB Compute Units (ACUs). The value must be a multiple of 8, from 8 to 32. The default value is 32.

Note

This parameter is required only for a Serverless instance that uses automatic scheduling.

32

IdleTime

integer

No

The idle time in seconds before the instance is automatically paused. The minimum value is 60 and the default is 600.

Note

This parameter is required only for a Serverless instance that uses automatic scheduling.

600

ServerlessMode

string

No

The scheduling mode of the Serverless instance. Valid values:

  • Manual: manual scheduling. This is the default value.

  • Auto: automatic scheduling.

Note
  • This parameter is required only for Serverless instances.

  • The automatic scheduling feature for AnalyticDB for PostgreSQL Serverless Mode instances is in canary release. To use this feature, submit a ticket.

Auto

EncryptionType

string

No

The encryption type. Valid values:

  • NULL: disables encryption. This is the default value.

  • CloudDisk: Enables disk encryption. You must also specify EncryptionKey.

Note

After disk encryption is enabled, it cannot be disabled.

CloudDisk

EncryptionKey

string

No

The Key ID.

Note

This parameter is required if EncryptionType is CloudDisk. The key must be in the same region as the instance.

0d2470df-da7b-4786-b981-88888888****

VectorConfigurationStatus

string

No

Indicates whether to enable vector engine optimization. Valid values:

  • enabled: enables vector engine optimization.

  • disabled: disables vector engine optimization. This is the default value.

Note
  • Set this to disabled for mainstream analytics, data warehousing, and real-time data warehousing scenarios.

  • Set this to enabled for AI-generated content (AIGC) and vector retrieval scenarios that use the vector analysis engine.

enabled

MasterCU

integer

No

The coordinator node resources. Valid values:

  • 2 CU

  • 4 CU

  • 8 CU

  • 16 CU

  • 32 CU

Note

Charges apply for coordinator node resources of 8 CUs or more.

8 CU

SrcDbInstanceName

string

No

The ID of the source instance for cloning.

Note

You can call the DescribeDBInstances operation to find the IDs of all AnalyticDB for PostgreSQL instances in a region.

gp-bp***************

BackupId

string

No

The Backup Set ID.

Note

Call the DescribeDataBackups operation to find the Backup Set IDs for an instance.

1111111111

EnableSSL

boolean

No

Indicates whether SSL encryption is enabled. Valid values:

  • true: enables SSL encryption.

  • false: disables SSL encryption. This is the default value.

false

ProdType

string

No

The product type. Valid values:

  • standard: Standard Edition.

  • cost-effective: Cost-effective Edition.

Note

The default value is standard.

standard

DeployMode

string

No

The deployment mode. Valid values:

  • multiple: multi-zone deployment.

  • single: single-zone deployment.

Note
  • The default value is single.

  • Currently, only single-zone deployment is supported.

single

StandbyZoneId

string

No

The standby zone ID.

Note
  • This parameter is required only for a multi-zone deployment.

  • You can call the DescribeRegions operation to query the available zone IDs.

  • The standby zone ID must be different from the primary zone ID (ZoneId).

cn-hangzhou-j

StandbyVSwitchId

string

No

The standby vSwitch ID.

Note
  • This parameter is required only for a multi-zone deployment.

  • The vSwitch must be in the zone specified by StandbyZoneId.

vsw-bp1cpq8mr64paltkb****

MasterAISpec

string

No

The specifications of the MasterAI node. If you specify this parameter, the coordinator node is converted to a MasterAI node.

Note
  • You cannot specify MasterAISpec and MasterCU at the same time.

  • This feature is supported only in specific regions and zones.

  • Only AnalyticDB for PostgreSQL V7.0 instances in Basic Edition support MasterAI nodes.

  • For a list of valid values, see the instance configuration page in the console.

ADB.AIMedium.2

AINodeSpecInfos

array<object>

No

object

No

AINodeNum

string

No

AINodeSpec

string

No

CacheStorageSize

string

No

DBInstanceClass parameter

AnalyticDB for PostgreSQL supports the following two instance types:

  • High-Performance: The specification names for this instance type start with gpdb.group.segsdx. This instance type provides enhanced I/O capabilities, delivering higher performance.

  • High-Capacity: The specification names for this instance type start with gpdb.group.seghdx. This instance type provides larger, more cost-effective storage.

When you select an instance type, consider your requirements for Storage Space and Compute Capacity.

AnalyticDB for PostgreSQL also supports External Table Extensions for Object Storage Service (OSS). You can use gzip to compress data in External Storage. You can further reduce Storage Costs by moving data that does not require real-time computation to External Storage.

The following table lists the specifications for High-Performance instances.


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



The following table lists the specifications for High-Capacity instances.


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 elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

5414A4E5-4C36-4461-95FC-************

DBInstanceId

string

The instance ID.

gp-bp12ga6v69h86****

Port

string

This parameter is deprecated and no longer returned.

You can call the DescribeDBInstanceAttribute operation to query the port number of the instance.

3432

ConnectionString

string

This parameter is deprecated and no longer 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.