全部产品
Search
文档中心

资源编排:ALIYUN::EDAS::ClusterMember

更新时间:Sep 15, 2023

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