ALIYUN::EDAS::ClusterMember類型用於向叢集中添加ECS執行個體。
文法
{
"Type": "ALIYUN::EDAS::ClusterMember",
"Properties": {
"Password": String,
"ClusterId": String,
"InstanceIds": List
}
}
屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
Password | String | 是 | 否 | ECS密碼。 | 無 |
ClusterId | String | 是 | 否 | 叢集ID。 | 無 |
InstanceIds | List | 是 | 否 | ECS執行個體ID,多個ECS執行個體用英文逗號隔開。 | 無 |
傳回值
Fn::GetAtt
ClusterMemberIds:叢集機器ID。
ClusterId:叢集ID。
InstanceIds:ECS執行個體ID。
EcuIds:ECS執行個體的ECU ID。
樣本
YAML
格式
ROSTemplateFormatVersion: '2015-09-01'
Description: SpringCloud應用託管到ACK服務
Parameters:
ClusterId:
Type: String
Description: 'Cluster ID to import ECS instance '
InstanceId:
Label: ECS Instance Id
Type: String
AssociationProperty: ALIYUN::ECS::Instance::InstanceId
AssociationPropertyMetadata:
RegionId: regionId
Password:
NoEcho: true
Type: String
Description: Server login password, Length 8-30, must contain three(Capital letters, lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in).
AllowedPattern: '[0-9A-Za-z\_\-\&:;''<>,=%`~!@#\(\)\$\^\*\+\|\{\}\[\]\.\?\/]+$'
Label:
en: Instance Password
zh-cn: 執行個體密碼
ConstraintDescription: Length 8-30, must contain three(Capital letters, lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in).
MinLength: 8
MaxLength: 30
Resources:
ClusterMember:
Type: ALIYUN::EDAS::ClusterMember
Properties:
ClusterId:
Ref: ClusterId
InstanceIds:
- Ref: InstanceId
Password:
Ref: Password
Outputs:
EDASClusterInstanceIds:
Description: ECS instance IDs in EDAS cluster
Value:
Fn::GetAtt:
- ClusterMember
- InstanceIds
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": "SpringCloud應用託管到ACK服務",
"Parameters": {
"ClusterId": {
"Type": "String",
"Description": "Cluster ID to import ECS instance "
},
"InstanceId": {
"Label": "ECS Instance Id",
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::Instance::InstanceId",
"AssociationPropertyMetadata": {
"RegionId": "regionId"
}
},
"Password": {
"NoEcho": true,
"Type": "String",
"Description": "Server login password, Length 8-30, must contain three(Capital letters, lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in).",
"AllowedPattern": "[0-9A-Za-z\\_\\-\\&:;'<>,=%`~!@#\\(\\)\\$\\^\\*\\+\\|\\{\\}\\[\\]\\.\\?\\/]+$",
"Label": {
"en": "Instance Password",
"zh-cn": "執行個體密碼"
},
"ConstraintDescription": "Length 8-30, must contain three(Capital letters, lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in).",
"MinLength": 8,
"MaxLength": 30
}
},
"Resources": {
"ClusterMember": {
"Type": "ALIYUN::EDAS::ClusterMember",
"Properties": {
"ClusterId": {
"Ref": "ClusterId"
},
"InstanceIds": [
{
"Ref": "InstanceId"
}
],
"Password": {
"Ref": "Password"
}
}
}
},
"Outputs": {
"EDASClusterInstanceIds": {
"Description": "ECS instance IDs in EDAS cluster",
"Value": {
"Fn::GetAtt": [
"ClusterMember",
"InstanceIds"
]
}
}
}
}