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"
]
}
}
}
}