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:
|
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: |
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:
|
MasterAISpec | String | No | No | The specifications for upgrading a coordinator node to a MasterAI node. | Note You cannot specify this parameter and the 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: |
DBInstanceGroupCount | Integer | No | No | The number of compute groups. | Example: |
VPCId | String | No | No | The Virtual Private Cloud (VPC) ID. | Example: |
SecurityIPList | String | No | Yes | The IP address whitelist for the instance. | Default value: |
DBInstanceDescription | String | No | Yes | The description of the instance. | Example: The description can be up to 256 characters in length. |
PayType | String | No | Yes | The billing method of the instance. | Valid values:
|
Period | Integer | No | Yes | The subscription duration. | This parameter is required only if you set
|
PeriodUnit | String | No | Yes | The unit of the subscription duration. | This parameter is required only if you set
|
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:
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:
|
SegDiskPerformanceLevel | String | No | No | The performance level (PL) of the enhanced SSD (ESSD). | Valid values:
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:
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:
|
ServerlessMode | String | No | No | The mode of the Serverless instance. | Valid values:
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:
Note This parameter is required for instances in elastic storage mode or Serverless mode. |
InstanceSpec | String | No | No | The specifications of compute nodes. |
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:
|
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:
Note
|
ZoneId | String | Yes | No | The availability zone ID. | Example: 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 |
Value | String | No | No | The value of the tag. | The value can be 0 to 128 characters in length. The value cannot start with |
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"] }
}
}
}