All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::GPDB::ElasticDBInstance

Last Updated:Jun 16, 2026

Creates an AnalyticDB for PostgreSQL instance in elastic storage mode.

Syntax

   {
  "Type": "ALIYUN::GPDB::ElasticDBInstance",
  "Properties": {    
    "EngineVersion": String,   
    "InstanceSpec": String,
    "ZoneId": String,
    "VSwitchId": String,
    "SegNodeNum": Integer,
    "SegStorageType": String,
    "StorageSize": Integer,
    "MasterNodeNum": Integer,
    "EncryptionType": String,
    "EncryptionKey": String,
    "VPCId": String,
    "SecurityIPList": String,
    "DBInstanceDescription": String,
    "PrivateIpAddress": String,
    "ZoneId": String,
    "Period": Integer, 
    "PayType": String,
    "DBInstanceCategory": String,
    "DBInstanceMode": String,
    "PeriodUnit": String,
    "Tags": List  
  }
}

Properties

Property name

Type

Required

Update allowed

Description

Constraints

EngineVersion

String

Yes

No

Database engine version.

Example values:

  • 6.0: Standard Edition 6.0.

  • 6.0x: Vector-enhanced Edition 6.0.

InstanceSpec

String

Yes

No

Instance type.

Valid values:

  • 2C16G.

  • 4C32G.

  • 16C128G.

ZoneId

String

Yes

No

Zone ID.

Example value: cn-hangzhou-h.

For more information about zone IDs, see DescribeRegions - View available regions and zones.

VSwitchId

String

Yes

No

vSwitch ID.

Example value: vsw-bp183p93qs667muql****.

SegNodeNum

Integer

Yes

No

Number of segment nodes.

Valid values: 4 to 512.

SegStorageType

String

Yes

No

Disk type of segment nodes.

Valid value: cloud_essd.

StorageSize

Integer

Yes

No

Storage capacity per node.

Valid values: 50 to 4000.

Unit: GB.

Note

The value must be in 50 GB increments.

MasterNodeNum

Integer

No

No

Number of master nodes.

Valid values: 1 to 2.

EncryptionType

String

No

No

Encryption type.

Valid values:

  • NULL (default): No encryption.

  • CloudDisk: Disk encryption. When enabled, specify the key in the EncryptionKey parameter.

Note

Disk encryption cannot be disabled after it is enabled.

EncryptionKey

String

No

No

ID of the encryption key.

If EncryptionType is set to CloudDisk, specify an encryption key ID in the same region. Otherwise, leave this parameter empty.

VPCId

String

No

No

VPC ID.

Example value: vpc-bp1m6fww66xbntjyc****.

SecurityIPList

String

No

Yes

IP address whitelist.

Default value: 127.0.0.1.

DBInstanceDescription

String

No

Yes

Instance description.

Example value: AnalyticDB for PostgreSQL instance.

The description can be up to 256 characters in length.

PrivateIpAddress

String

No

No

Private IP address.

None

ZoneId

String

No

No

Zone ID.

None

InstanceChargeType

String

No

No

Billing method.

Valid values:

  • Postpaid: Pay-as-you-go.

  • Prepaid: Subscription.

Period

Integer

No

No

Subscription duration.

Valid only when InstanceChargeType is set to Prepaid.

Values:

  • If PeriodUnit is set to Month, valid values are 1 to 9, 12, 24, 36, 48, and 60. Default value: 1. 

  • If PeriodUnit is set to Year, valid values are 1 to 3. Default value: 1. 

DBInstanceCategory

String

No

No

Instance edition.

Valid values:

  • HighAvailability: High-availability Edition.

  • Basic: Basic Edition.

Note

This parameter is required when you create an instance in elastic storage mode.

DBInstanceMode

String

No

No

Resource type of the instance.

Valid values:

  • StorageElastic: Elastic storage mode.

  • Serverless: Serverless mode.

  • Classic: Reserved storage mode.

PeriodUnit

String

No

No

Unit of the subscription period.

Valid values:

  • Month (default): Month.

  • Year: Year.

Tags

List

No

Yes

Tags.

You can add up to 20 tags. Each tag consists of a Key and a Value. For more information, see the Tags properties section.

Tags syntax

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

Tags properties

Property Name

Type

Required

Update allowed

Description

Constraints

Key

String

Yes

No

Tag key.

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

Value

String

No

No

Tag value.

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

Return values

Fn::GetAtt

  • DBInstanceId: The instance ID.

  • Port: The port number.

  • OrderId: The order ID.

  • ConnectionString: The connection address.

Examples

YAML format

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::ElasticDBInstance'
    Properties:
      ZoneId:
        Ref: ZoneId
      VPCId:
        Ref: VpcId
      VSwitchId:
        Ref: VSwitchId
      EngineVersion: '6.0'
      InstanceSpec: 2C16G
      SegNodeNum: 8
      SegStorageType: cloud_essd
      StorageSize: 100
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

JSON format

{
  "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::ElasticDBInstance",
      "Properties": {
        "ZoneId": {
          "Ref": "ZoneId"
        },
        "VPCId": {
          "Ref": "VpcId"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "EngineVersion": "6.0",
        "InstanceSpec": "2C16G",
        "SegNodeNum": 8,
        "SegStorageType": "cloud_essd",
        "StorageSize": 100
      }
    }
  },
  "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"] }
    }
  }
}