ALIYUN::GPDB::DBInstance is used to create an AnalyticDB for PostgreSQL instance in reserved 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
  }
}

Properties

Property Type Required Editable Description Constraint
EngineVersion String Yes No The version of the engine. Sample values:
  • 6.0: 6.0 Standard Edition
  • 6.0x: 6.0 Vector Enhanced Edition
ZoneId String Yes No The ID of the zone. Sample value: cn-hangzhou-h.

For more information about zone IDs, see DescribeRegions.

VSwitchId String Yes No The ID of the vSwitch. Sample value: vsw-bp183p93qs667muql****.
DBInstanceClass String Yes No The instance type. Sample value: gpdb.group.segsdx2.

For more information about instance types, see Instance types.

DBInstanceGroupCount Integer Yes No The number of compute nodes in the AnalyticDB for PostgreSQL instance. Sample value: 2.
VPCId String No No The ID of the virtual private cloud (VPC). Sample value: 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. Sample value: AnalyticDB PostgreSQL DB Instance.

The description can be up to 256 characters in length.

PayType String No No The billing method of the instance. Default value: Postpaid. Valid values:
  • Postpaid: pay-as-you-go
  • Prepaid: subscription
Period Integer No No The subscription period of the instance.
  • Valid values when PeriodUnit is set to Month: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, and 11.
  • Valid values when PeriodUnit is set to Year: 1, 2, and 3.
PeriodUnit String No No The unit of the subscription period. Default value: Month. Valid values:
  • Month
  • Year

Response parameters

Fn::GetAtt

  • DBInstanceId: the ID of the instance.
  • Port: the port 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::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"] }
    }
  }
}

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::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