ALIYUN::GPDB::DBInstance is used 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
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
EngineVersion | String | Yes | No | The engine version of the instance. | Valid values:
|
ZoneId | String | Yes | No | The ID of the zone. | Example: cn-hangzhou-h.
For more information about zone IDs, see DescribeRegions. |
VSwitchId | String | Yes | No | The ID of the vSwitch. | Example: vsw-bp183p93qs667muql****. |
DBInstanceClass | String | Yes | No | The family of the instance. | Example: gpdb.group.segsdx2.
For more information about instance families, see Instance types. |
DBInstanceGroupCount | Integer | Yes | No | The number of compute nodes in the AnalyticDB for PostgreSQL instance. | Example: 2. |
VPCId | String | No | No | The ID of the virtual private cloud (VPC). | Example: vpc-bp1m6fww66xbntjyc****. |
SecurityIPList | String | No | Yes | The IP address whitelist. | Default value: 127.0.0.1. |
DBInstanceDescription | String | No | Yes | The description of the instance. | Example: 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:
|
Period | Integer | No | No | The subscription duration of the instance that you purchase. | Valid values:
|
PeriodUnit | String | No | No | The unit of the subscription duration. | Default value: Month. Valid values:
|
Tags | List | No | Yes | The tags that you add to the instance. | For more information, see Tags properties. |
Tags syntax
"Tags": [
{
"Value": String,
"Key": String
}
]
Tags properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Key | String | Yes | No | The key of the tag. | The tag key must be 1 to 128 characters in length, and cannot contain http:// or https:// . The tag key cannot start with acs: or aliyun .
|
Value | String | No | No | The value of the tag. | The tag value must be 0 to 128 characters in length, and cannot contain http:// or https:// . The tag value cannot start with acs: or aliyun .
|
Return values
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::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