ALIYUN::POLARDB::DBNodes类型用于增加POLARDB集群节点。
语法
{
"Type": "ALIYUN::POLARDB::DBNodes",
"Properties": {
"DBClusterId": String,
"Amount": Integer
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
DBClusterId | String | 是 | 否 | 集群ID。 | 无。 |
Amount | Integer | 是 | 是 | 添加到集群的节点数。 | 无。 |
返回值
Fn::GetAtt
- DBNodeIds:添加到集群的节点ID。
- OrderIds:订单ID。
示例
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Resources": {
"DBNodes": {
"Type": "ALIYUN::POLARDB::DBNodes",
"Properties": {
"DBClusterId": {
"Ref": "DBClusterId"
},
"Amount": {
"Ref": "Amount"
}
}
}
},
"Parameters": {
"DBClusterId": {
"Type": "String",
"Description": "The ID of the ApsaraDB for POLARDB cluster to be added nodes to."
},
"Amount": {
"Type": "Number",
"Description": "Number of nodes to be added to cluster.",
"MaxValue": 16,
"MinValue": 1
}
},
"Outputs": {
"DBNodeIds": {
"Description": "The ID list of added cluster nodes.",
"Value": {
"Fn::GetAtt": [
"DBNodes",
"DBNodeIds"
]
}
},
"OrderIds": {
"Description": "The order ID list of added cluster nodes.",
"Value": {
"Fn::GetAtt": [
"DBNodes",
"OrderIds"
]
}
}
}
}
YAML
格式
ROSTemplateFormatVersion: '2015-09-01'
Resources:
DBNodes:
Type: ALIYUN::POLARDB::DBNodes
Properties:
DBClusterId:
Ref: DBClusterId
Amount:
Ref: Amount
Parameters:
DBClusterId:
Type: String
Description: The ID of the ApsaraDB for POLARDB cluster to be added nodes to.
Amount:
Type: Number
Description: Number of nodes to be added to cluster.
MaxValue: 16
MinValue: 1
Outputs:
DBNodeIds:
Description: The ID list of added cluster nodes.
Value:
Fn::GetAtt:
- DBNodes
- DBNodeIds
OrderIds:
Description: The order ID list of added cluster nodes.
Value:
Fn::GetAtt:
- DBNodes
- OrderIds