All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::GPDB::DBInstance

Last Updated:Mar 28, 2026

Use the ALIYUN::GPDB::DBInstance resource to create an AnalyticDB for PostgreSQL instance in reserved storage mode.

Syntax

{
  "Type": "ALIYUN::GPDB::DBInstance",
  "Properties": {
    "EngineVersion": String,
    "ZoneId": String,
    "VSwitchId": String,   
    "DBInstanceClass": String,
    "DBInstanceGroupCount": Integer,
    "VPCId": String,
    "SecurityIPList": String,   
    "DBInstanceDescription": String,
    "PayType": String,
    "Period": Integer,
    "PeriodUnit": String,
    "Tags": List,
    "VectorConfigurationStatus": String,
    "StorageSize": Integer,
    "EncryptionType": String,
    "MasterNodeNum": Integer,
    "DBInstanceMode": String,
    "SegDiskPerformanceLevel": String,
    "DBInstanceCategory": String,
    "SegStorageType": String,
    "CacheStorageSize": String,
    "BackupId": String,
    "MasterAISpec": String,
    "EnableSSL": Boolean,
    "SrcDbInstanceName": String,
    "EncryptionKey": String,
    "CreateSampleData": Boolean,
    "ServerlessMode": String,
    "ServerlessResource": Integer,
    "PrivateIpAddress": String,
    "SegNodeNum": Integer,
    "InstanceSpec": String,
    "IdleTime": Integer,
    "ProdType": String,
    "MasterCU": Integer,
    "StandbyZoneId": String,
    "StandbyVSwitchId": String,
    "DeployMode": String,
    "AINodeSpecInfos": List,
    "ResourceGroupId": String
  }
}

Properties

Parameter

Type

Required

Update allowed

Description

Constraints

EngineVersion

String

Yes

No

The engine version.

Valid values:

  • 6.0: Standard Edition.

  • 6.0x: Vector-enhanced Edition.

AINodeSpecInfos

List

No

No

Details of the AI nodes.

For more information, see the AINodeSpecInfos properties section.

VSwitchId

String

Yes

No

The ID of the VSwitch.

Example: vsw-bp183p93qs667muql****.

BackupId

String

No

No

The ID of a historical backup set.

None.

CacheStorageSize

String

No

No

The cache disk size.

Unit: GB.

EnableSSL

Boolean

No

No

Specifies whether to enable SSL encryption.

Valid values:

  • true: Enables SSL encryption.

  • false (default): Disables SSL encryption.

MasterAISpec

String

No

No

The specifications for upgrading a coordinator node to a MasterAI node.

Note

You cannot specify this parameter and the MasterCU parameter at the same time.

This upgrade is supported only in specific regions and availability zones.

Only Basic Edition instances of AnalyticDB for PostgreSQL 7.0 support MasterAI nodes.

You can find the valid values for this parameter on the instance upgrade page.

SrcDbInstanceName

String

No

No

The ID of the source instance to be cloned.

None.

DBInstanceClass

String

No

No

The instance type.

Example: gpdb.group.segsdx2.

DBInstanceGroupCount

Integer

No

No

The number of compute groups.

Example: 2.

VPCId

String

No

No

The Virtual Private Cloud (VPC) ID.

Example: vpc-bp1m6fww66xbntjyc****.

SecurityIPList

String

No

Yes

The IP address whitelist for the instance.

Default value: 127.0.0.1.

DBInstanceDescription

String

No

Yes

The description of the instance.

Example: AnalyticDB for PostgreSQL DB Instance.

The description can be up to 256 characters in length.

PayType

String

No

Yes

The billing method of the instance.

Valid values:

  • Postpaid (default): The pay-as-you-go billing method.

  • Prepaid: The subscription billing method.

Period

Integer

No

Yes

The subscription duration.

This parameter is required only if you set PayType to Prepaid. Valid values:

  • If you set PeriodUnit to Month, the valid values are 1 to 11.

  • If you set PeriodUnit to Year, the valid values are 1, 2, and 3.

PeriodUnit

String

No

Yes

The unit of the subscription duration.

This parameter is required only if you set PayType to Prepaid. Valid values:

  • Month (default)

  • Year

Tags

List

No

No

The tags of the instance.

For more information, see the Tags properties section.

EncryptionType

String

No

No

The encryption type.

Valid values:

  • NULL (default): Disables cloud disk encryption.

  • CloudDisk: Enables cloud disk encryption. If you select this value, you must specify the EncryptionKey parameter.

Note

Cloud disk encryption cannot be disabled after it is enabled.

MasterNodeNum

Integer

No

No

The number of coordinator nodes.

Valid values: 1 and 2.

Note

If you do not specify this parameter, the default value is 1.

DBInstanceMode

String

No

No

The storage mode of the instance.

Valid values:

  • StorageElastic: elastic storage mode.

  • Serverless: Serverless mode.

  • Classic: reserved storage mode.

SegDiskPerformanceLevel

String

No

No

The performance level (PL) of the enhanced SSD (ESSD).

Valid values:

  • pl0: PL0.

  • pl1: PL1.

  • pl2: PL2.

Note

This parameter applies only when the disk storage type is ESSD.

If you do not specify this parameter, the default value is pl1.

DBInstanceCategory

String

No

No

The instance edition.

Valid values:

  • HighAvailability: High-availability Edition.

  • Basic: Basic Edition.

Note

This parameter is required for instances in elastic storage mode.

SegStorageType

String

No

No

The disk storage type.

Currently, only enhanced SSDs (ESSDs) are supported. Set the value to cloud_essd.

Note

This parameter is required for instances in elastic storage mode.

StorageSize

Integer

No

No

The storage capacity.

Unit: GB. Valid values: 50 to 8000.

EncryptionKey

String

No

No

The ID of the key.

This parameter is required only when EncryptionType is set to CloudDisk. You must specify the ID of a key that is in the same region as the instance. Otherwise, leave this parameter empty.

CreateSampleData

Boolean

No

No

Specifies whether to load a sample dataset after the instance is created.

Valid values:

  • true: Loads a sample dataset.

  • false (default): Does not load a sample dataset.

ServerlessMode

String

No

No

The mode of the Serverless instance.

Valid values:

  • Manual (default): manual scheduling.

  • Auto: automatic scheduling.

Note

This parameter is required for Serverless mode instances.

ServerlessResource

Integer

No

No

The computing resource threshold.

The value must be between 8 and 32, in 8-ACU increments. Default value: 32.

Note

This parameter is required for Serverless mode instances that use automatic scheduling.

PrivateIpAddress

String

No

No

The private IP address.

None.

SegNodeNum

Integer

No

No

The number of compute nodes.

Valid values:

  • For a High-availability Edition instance in elastic storage mode: 4 to 512. The value must be a multiple of 4.

  • For a Basic Edition instance in elastic storage mode: 2 to 512. The value must be a multiple of 2.

  • For a Serverless mode instance: 2 to 512. The value must be a multiple of 2.

Note

This parameter is required for instances in elastic storage mode or Serverless mode.

InstanceSpec

String

No

No

The specifications of compute nodes.

  • Values for the High-availability Edition in elastic storage mode:

    • 2C16G

    • 4C32G

    • 16C128G

  • Values for the Basic Edition in elastic storage mode:

    • 2C8G

    • 4C16G

    • 8C32G

    • 16C64G

  • Values for Serverless mode:

    • 4C16G

    • 8C32G

Note

This parameter is required for instances in elastic storage mode or Serverless mode.

IdleTime

Integer

No

No

The idle duration in seconds before the instance is automatically suspended.

The instance becomes idle after this period of inactivity. Minimum value: 60. Default value: 600.

Note

This parameter is required for Serverless mode instances that use automatic scheduling.

ProdType

String

No

No

The product type.

Valid values:

  • standard (default): Standard Edition.

  • cost-effective: Cost-efficient Edition.

MasterCU

Integer

No

No

The resources of the coordinator node.

None.

StandbyZoneId

String

No

No

The ID of the secondary availability zone.

None.

StandbyVSwitchId

String

No

No

The ID of the secondary VSwitch.

None.

DeployMode

String

No

No

The deployment mode.

None.

ResourceGroupId

String

No

Yes

The ID of the resource group.

None.

VectorConfigurationStatus

String

No

No

Specifies whether to enable vector engine optimization.

Valid values:

  • enabled: Enables vector engine optimization.

  • disabled (default): Disables vector engine optimization.

Note
  • We recommend that you disable this feature for mainstream analytics, data warehousing, and real-time data warehousing scenarios.

  • We recommend that you enable this feature for scenarios that require a vector analysis engine, such as AI-generated content (AIGC) and vector retrieval.

ZoneId

String

Yes

No

The availability zone ID.

Example: cn-hangzhou-h.

For more information about availability zones, see View available regions and zones.

AINodeSpecInfos syntax

"AINodeSpecInfos": [
  {
    "AINodeSpec": String,
    "AINodeNum": Integer
  }
]

AINodeSpecInfos properties

Parameter

Type

Required

Update allowed

Description

Constraints

AINodeSpec

String

Yes

No

The specifications of an AI node.

None.

AINodeNum

Integer

Yes

No

The number of AI nodes.

None.

Tags syntax

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]

Tags properties

Parameter

Type

Required

Update allowed

Description

Constraints

Key

String

Yes

No

The key of the tag.

The key must be 1 to 128 characters in length. The key cannot start with aliyun or acs: and cannot contain http:// or https://.

Value

String

No

No

The value of the tag.

The value can be 0 to 128 characters in length. The value cannot start with aliyun or acs: and cannot contain http:// or https://.

Return values

Fn::GetAtt

  • DBInstanceId: The ID of the instance.

  • Port: The port number of the instance.

  • OrderId: The ID of the order.

  • ConnectionString: The endpoint of the instance.

  • Arn: The Alibaba Cloud Resource Name (ARN) of the instance.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ZoneId:
    Type: String
  VpcId:
    Type: String
    AssociationProperty: 'ALIYUN::ECS::VPC::VPCId'
  VSwitchId:
    Type: String
    AssociationProperty: 'ALIYUN::ECS::VSwitch::VSwitchId'
    AssociationPropertyMetadata:
      ZoneId: ZoneId
      VpcId: VpcId
Resources:
  DBInstance:
    Type: 'ALIYUN::GPDB::DBInstance'
    Properties:
      ZoneId:
        Ref: ZoneId
      VPCId:
        Ref: VpcId
      VSwitchId:
        Ref: VSwitchId
      DBInstanceGroupCount: 2
      EngineVersion: '6.0'
      DBInstanceClass: gpdb.group.segsdx2
      DBInstanceDescription: AnalyticDB PostgreSQL DB Instance
Outputs:
  OrderId:
    Value:
      'Fn::GetAtt':
        - DBInstance
        - OrderId
  ConnectionString:
    Value:
      'Fn::GetAtt':
        - DBInstance
        - ConnectionString
  DBInstanceId:
    Value:
      'Fn::GetAtt':
        - DBInstance
        - DBInstanceId
  Port:
    Value:
      'Fn::GetAtt':
        - DBInstance
        - Port
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ZoneId": {
      "Type": "String"
    },
    "VpcId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
    },
    "VSwitchId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
      "AssociationPropertyMetadata": {
        "ZoneId": "ZoneId",
        "VpcId": "VpcId"
      }
    }
  },
  "Resources": {
    "DBInstance": {
      "Type": "ALIYUN::GPDB::DBInstance",
      "Properties": {
        "ZoneId": {
          "Ref": "ZoneId"
        },
        "VPCId": {
          "Ref": "VpcId"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "DBInstanceGroupCount": 2,
        "EngineVersion": "6.0",
        "DBInstanceClass": "gpdb.group.segsdx2",
        "DBInstanceDescription": "AnalyticDB PostgreSQL DB Instance"
      }
    }
  },
  "Outputs": {
    "OrderId": {
      "Value": { "Fn::GetAtt": ["DBInstance", "OrderId"] }
    },
    "ConnectionString": {
      "Value": { "Fn::GetAtt": ["DBInstance", "ConnectionString"] }
    },
    "DBInstanceId": {
      "Value": { "Fn::GetAtt": ["DBInstance", "DBInstanceId"] }
    },
    "Port": {
      "Value": { "Fn::GetAtt": ["DBInstance", "Port"] }
    }
  }
}