ALIYUN::GPDB::ElasticDBInstance is used to create 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
  }
}

Properties

Property Type Required Editable Description Constraint
EngineVersion String Yes No The version of the engine that the instance runs. The possible values include:
  • 6.0: 6.0 Standard Edition
  • 6.0x: 6.0 Vector Enhanced Edition
InstanceSpec String Yes No The specifications of the instance. The possible values include:
  • 2C16G
  • 4C32G
  • 16C128G
ZoneId String Yes No The zone ID of the instance. The possible values include: cn-hangzhou-h.

For more information about zone IDs, see DescribeRegions.

VSwitchId String Yes No The ID of the vSwitch. The possible values include: vsw-bp183p93qs667muql****.
SegNodeNum Integer Yes No The number of nodes in the instance. Valid values: 4 to 512.
SegStorageType String Yes No The disk type of the node. The possible values include:
  • cloud_efficiency: ultra disk
  • cloud_ssd: standard SSD
StorageSize Integer Yes No The storage capacity of the node. Valid values: 50 to 4000.

Unit: GB.

Note You can adjust the value in increments of 50 GB.
MasterNodeNum Integer No No The number of coordinator nodes. Valid values: 1 and 2.
EncryptionType String No No The encryption type of the disk. Default value: NULL. Valid values:
  • NULL: does not enable disk encryption.
  • CloudDisk: enables disk encryption. After you enable disk encryption, you must configure the EncryptionKey parameter to specify the customer master key.
Note You cannot disable disk encryption after you enable it.
EncryptionKey String No No The ID of the key. When EncryptionType is set to CloudDisk, you must set the EncryptionKey parameter to the ID of the key that belongs to the same region as the instance. Otherwise, the EncryptionKey parameter is left empty.
VPCId String No No The ID of the virtual private cloud (VPC). The possible values include: vpc-bp1m6fww66xbntjyc****.
SecurityIPList String No Yes The whitelist of IP addresses. Default value: 127.0.0.1.
DBInstanceDescription String No Yes The description of the instance. The possible values include: An AnalyticDB for PostgreSQL instance.

The description can be up to 256 characters in length.

Response parameters

Fn::GetAtt

  • DBInstanceId: the ID of the instance.
  • Port: the port that is used to connect to the instance.
  • OrderId: the ID of the order.
  • ConnectionString: the connection string of the instance.

Examples

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"] }
    }
  }
}

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