ALIYUN::PolarDBX::DBInstance類型用於建立PolarDB-X 2.0執行個體。
文法
{
"Type": "ALIYUN::PolarDBX::DBInstance",
"Properties": {
"TopologyType": String,
"EngineVersion": String,
"ResourceGroupId": String,
"VPCId": String,
"AutoRenew": Boolean,
"VSwitchId": String,
"Period": String,
"PayType": String,
"DBNodeClass": String,
"SecondaryZone": String,
"TertiaryZone": String,
"DBNodeCount": Integer,
"PrimaryZone": String,
"UsedTime": Integer,
"DBInstanceDescription": String,
"SecurityIpConfig": Map
}
}
屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
TopologyType | String | 是 | 否 | 拓撲類型。 | 取值:
|
EngineVersion | String | 是 | 否 | 資料庫引擎版本。 |
|
ResourceGroupId | String | 否 | 否 | 資源群組ID。 | 無 |
VPCId | String | 是 | 否 | 專用網路ID。 | 無 |
AutoRenew | Boolean | 否 | 否 | 是否自動續約。 | 取值:
|
VSwitchId | String | 是 | 否 | 虛擬交換器ID。 | 無 |
Period | String | 否 | 否 | 收費周期。 |
|
PayType | String | 否 | 否 | 執行個體付費類型。 | 取值:
|
DBNodeClass | String | 是 | 否 | 節點規格。 | 取值:
|
SecondaryZone | String | 否 | 否 | 次可用性區域。 | 無 |
TertiaryZone | String | 否 | 否 | 第三可用性區域。 | 無 |
DBNodeCount | Integer | 是 | 否 | 執行個體節點數量。 | 最小值為2。 |
PrimaryZone | String | 是 | 否 | 主可用性區域。 | 無 |
UsedTime | Integer | 否 | 否 | 預付費時間長度。 | 說明 當Period取值為Year時,該參數支援的取值為1、2、3。 |
DBInstanceDescription | String | 否 | 是 | 執行個體備忘描述。 | 無 |
SecurityIpConfig | Map | 否 | 否 | 執行個體白名單配置。 | 更多資訊,請參見SecurityIpConfig屬性。 |
SecurityIpConfig文法
"SecurityIpConfig": {
"SecurityIPList": String,
"ModifyMode": String,
"GroupName": String
}
SecurityIpConfig屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
SecurityIPList | String | 否 | 否 | 白名單組中的IP列表。 | 多個IP白名單間以“,”分隔。 |
ModifyMode | String | 否 | 否 | 白名單修改方式, | 取值:
|
GroupName | String | 否 | 否 | 執行個體的白名單組名。 | 無 |
傳回值
Fn::GetAtt
OrderId:訂單號。
DBInstanceName:建立的執行個體名稱。
Port:內網串連連接埠。
ConnectionString:內網串連串。
樣本
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
TopologyType:
Type: String
Description: 'The topology type of the instance. Valid values: 3azones: The instance is deployed in three zones. 1azone: The instance is deployed in only one zone.'
AllowedValues:
- 1azone
- 3azones
EngineVersion:
Type: String
Description: The version of the database engine.
VPCId:
Type: String
Description: The ID of the VPC to which the instance belongs.
VSwitchId:
Type: String
Description: The ID of the vSwitch.
DBNodeClass:
Type: String
Description: The specification of the nodes in the instance you want to create.
DBNodeCount:
Type: Number
Description: The number of nodes in the instance you want to create.
MinValue: 2
PrimaryZone:
Type: String
Description: The primary zone.
Resources:
DBInstance:
Type: ALIYUN::PolarDBX::DBInstance
Properties:
TopologyType:
Ref: TopologyType
EngineVersion:
Ref: EngineVersion
VPCId:
Ref: VPCId
VSwitchId:
Ref: VSwitchId
DBNodeClass:
Ref: DBNodeClass
DBNodeCount:
Ref: DBNodeCount
PrimaryZone:
Ref: PrimaryZone
Outputs:
OrderId:
Description: The ID of the order.
Value:
Fn::GetAtt:
- DBInstance
- OrderId
DBInstanceName:
Description: The name of the instance that you create.
Value:
Fn::GetAtt:
- DBInstance
- DBInstanceName
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"TopologyType": {
"Type": "String",
"Description": "The topology type of the instance. Valid values: 3azones: The instance is deployed in three zones. 1azone: The instance is deployed in only one zone.",
"AllowedValues": [
"1azone",
"3azones"
]
},
"EngineVersion": {
"Type": "String",
"Description": "The version of the database engine."
},
"VPCId": {
"Type": "String",
"Description": "The ID of the VPC to which the instance belongs."
},
"VSwitchId": {
"Type": "String",
"Description": "The ID of the vSwitch."
},
"DBNodeClass": {
"Type": "String",
"Description": "The specification of the nodes in the instance you want to create."
},
"DBNodeCount": {
"Type": "Number",
"Description": "The number of nodes in the instance you want to create.",
"MinValue": 2
},
"PrimaryZone": {
"Type": "String",
"Description": "The primary zone."
}
},
"Resources": {
"DBInstance": {
"Type": "ALIYUN::PolarDBX::DBInstance",
"Properties": {
"TopologyType": {
"Ref": "TopologyType"
},
"EngineVersion": {
"Ref": "EngineVersion"
},
"VPCId": {
"Ref": "VPCId"
},
"VSwitchId": {
"Ref": "VSwitchId"
},
"DBNodeClass": {
"Ref": "DBNodeClass"
},
"DBNodeCount": {
"Ref": "DBNodeCount"
},
"PrimaryZone": {
"Ref": "PrimaryZone"
}
}
}
},
"Outputs": {
"OrderId": {
"Description": "The ID of the order.",
"Value": {
"Fn::GetAtt": [
"DBInstance",
"OrderId"
]
}
},
"DBInstanceName": {
"Description": "The name of the instance that you create.",
"Value": {
"Fn::GetAtt": [
"DBInstance",
"DBInstanceName"
]
}
}
}
}