ALIYUN::VPC::EIPAssociation用于为云产品实例绑定弹性公网IP(EIP)。

语法

{
  "Type": "ALIYUN::VPC::EIPAssociation",
  "Properties": {
    "AllocationId": String,
    "InstanceId": String,
    "PrivateIpAddress": String,
    "Mode": String
  }
}         

属性

属性名称 类型 必须 允许更新 描述 约束
AllocationId String 弹性公网IP的ID。
InstanceId String 云产品实例的ID。 支持以下云产品实例类型:
  • VPC类型的ECS实例。
  • VPC类型的SLB实例。
  • NAT网关。
  • 高可用虚拟IP(HaVip)。
  • 弹性网卡。
PrivateIpAddress String 交换机网段内的一个私网IP地址。 如果不指定该参数,系统将根据VPC ID和交换机ID自动分配一个私网IP地址。
Mode String 绑定模式。 取值:
  • NAT(默认值):NAT模式(普通模式)。
  • MULTI_BINDED:多EIP网卡可见模式。
  • BINDED:EIP网卡可见模式。

返回值

Fn::GetAtt

  • EipAddress:弹性公网IP的地址。
  • AllocationId:弹性公网IP的ID。

示例

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": {
    "en": "Create a VPC type ECS and bind EIP (existing VPC).",
    "zh-cn": "创建VPC类型ECS,并绑定EIP(已有VPC)。"
  },
  "Parameters": {
    "VPC": {
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
      "Type": "String",
      "Description": {
        "en": "Please search the ID starting with (vpc-xxx) from console-Virtual Private Cloud.",
        "zh-cn": "现有专有网络的实例ID,在专有网络控制台选择专有网络进行查询。"
      },
      "Label": {
        "en": "VPC ID",
        "zh-cn": "专有网络VPC实例ID"
      }
    },
    "VSwitch": {
      "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
      "AssociationPropertyMetadata": {
        "VpcId": "VPC"
      },
      "Type": "String",
      "Description": {
        "en": "Existing VSwitch ID, query under console-VPC-VSwitch, <font color='red'>VSwitch must be under VPC. ECS will be created under this VSwitch.</font>",
        "zh-cn": "现有交换机ID,在专有网络控制台选择交换机进行查询,<font color='red'>交换机必须在VPC下。ECS将创建在此交换机下。</font>"
      },
      "Label": {
        "en": "VSwitch ID",
        "zh-cn": "交换机实例ID"
      }
    },
    "SecurityGroup": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
      "Description": {
        "en": "Please search the business security group ID starting with (sg-xxx) from console-ECS-Network & Security.",
        "zh-cn": "现有业务安全组的实例ID,在ECS控制台选择安全组进行查询。<br><font color='red'>安全组必须归属在VPC下。</font>"
      },
      "Label": {
        "en": "Business Security Group ID",
        "zh-cn": "业务安全组ID"
      },
      "AssociationPropertyMetadata": {
        "VpcId": "VPC"
      }
    },
    "ECSPassword": {
      "NoEcho": true,
      "Type": "String",
      "Description": {
        "en": "Server login password, Length 8-30, must contain three (Capital letters, lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in).",
        "zh-cn": "服务器登录密码,长度为8~30个字符,必须包含三项(大写英文字母、小写英文字母、数字和 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ 中的特殊字符)。"
      },
      "AllowedPattern": "[0-9A-Za-z\\_\\-\\&:;'<>,=%`~!@#\\(\\)\\$\\^\\*\\+\\|\\{\\}\\[\\]\\.\\?\\/]+$",
      "Label": {
        "en": "Instance Password",
        "zh-cn": "实例密码"
      },
      "MinLength": 8,
      "ConstraintDescription": {
        "en": "Length 8-30, must contain three(Capital letters, lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in).",
        "zh-cn": "长度为8~30个字符,必须包含三项(大写英文字母、小写英文字母、数字和 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ 中的特殊字符)。"
      },
      "MaxLength": 30,
      "Default": null
    },
    "EIPInternetChargeType": {
      "Type": "String",
      "AllowedValues": [
        "PayByBandwidth",
        "PayByTraffic"
      ],
      "Description": {
        "en": "The charge type of EIP, PayByBandwidth;PayByTraffic.",
        "zh-cn": "弹性公网IP的收费类型。PayByBandwidth:按带宽付费;PayByTraffic:按流量付费。"
      },
      "Label": {
        "en": "EIP Charge Type",
        "zh-cn": "弹性公网IP的收费类型"
      },
      "Default": "PayByTraffic"
    },
    "ECSImageId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::Instance::ImageId",
      "Description": {
        "en": "Image ID,Please use Centos7.",
        "zh-cn": "镜像ID,请使用Centos7。"
      },
      "Label": {
        "en": "Image",
        "zh-cn": "镜像"
      },
      "Default": "ubuntu_14"
    },
    "ECSZoneId": {
      "AssociationProperty": "ALIYUN::ECS::Instance:ZoneId",
      "Type": "String",
      "Description": {
        "en": "Availability zone ID.<br><b>Note: <font color='blue'>Before selecting, please confirm whether the availability zone supports the specification of creating ECS resources. It is recommended to be different from other switch availability zones</font></b ><br><font color='red'>The switch availability zone and the selected switch instance ID must be in the same availability zone.</font>",
        "zh-cn": "可用区ID。<br><b>注: <font color='blue'>选择前请确认该可用区是否支持创建ECS资源的规格,建议与其他交换机可用区不同</font></b><br><font color='red'>交换机可用区和已选择的交换机实例ID必须在同一个可用区。</font>"
      },
      "Label": {
        "en": "VSwitch Availability Zone",
        "zh-cn": "交换机可用区"
      }
    },
    "EIPBandwidth": {
      "Type": "Number",
      "Description": {
        "en": "EIP Bandwidth, Value range: [1,200], unit: Mbps.",
        "zh-cn": "弹性公网IP带宽。取值范围:1~200,单位:Mbps。"
      },
      "MinValue": 1,
      "Label": {
        "en": "EIP Bandwidth",
        "zh-cn": "弹性公网IP带宽"
      },
      "MaxValue": 200,
      "Default": 1
    },
    "ECSInstanceType": {
      "AssociationPropertyMetadata": {
        "ZoneId": "ECSZoneId",
        "InstanceChargeType": "InstanceChargeType"
      },
      "AssociationProperty": "ALIYUN::ECS::Instance::InstanceType",
      "Type": "String",
      "Description": {
        "en": "<font color='blue'><b>1.Before selecting the model please confirm that the current available zone under the model is in stock, some models need to be reported in advance</b></font><br><font color='blue'><b>2.List of optional models</font><br></b></font>[ecs.c5.large <font color='green'>2vCPU 4GiB Intranet bandwidth1Gbps In-grid sending and receiving packages30MillionPPS</font>]<br></b>[ecs.c5.xlarge <font color='green'>4vCPU 8GiB Intranet bandwidth1.5Gbps In-grid sending and receiving packages50MillionPPS</font>]<br></b>[ecs.c5.2xlarge <font color='green'>8vCPU 16GiB Intranet bandwidth2.5Gbps In-grid sending and receiving packages80MillionPPS</font>]",
        "zh-cn": "<font color='blue'><b>1、选择机型前请先确认当前可用区下该机型是否有货,部分机型需要提前报备。</b></font><br><font color='blue'><b>2、取值:</font><br></b></font>[ecs.c5.large:<font color='green'>2vCPU 4 GiB,内网带宽1Gbps、内网收发包30万PPS。</font>]<br></b>[ecs.c5.xlarge:<font color='green'>4vCPU 8GiB,内网带宽1.5Gbps、内网收发包50万PPS。</font>]<br></b>[ecs.c5.2xlarge: <font color='green'>8vCPU 16 GiB,内网带宽2.5 Gbps、内网收发包80万PPS。</font>]"
      },
      "Label": {
        "en": "Instance Type",
        "zh-cn": "实例规格"
      }
    },
    "ECSDiskCategory": {
      "Type": "String",
      "Description": {
        "en": "<font color='blue'><b>Optional values:</b></font><br>[cloud_efficiency: <font color='green'>Efficient Cloud Disk</font>]<br>[cloud_ssd: <font color='green'>SSD Cloud Disk</font>]<br>[cloud_essd: <font color='green'>ESSD Cloud Disk</font>]<br>[cloud: <font color='green'>Cloud Disk</font>]<br>[ephemeral_ssd: <font color='green'>Local SSD Cloud Disk</font>]",
        "zh-cn": "<font color='blue'><b>取值:</b></font><br>[cloud_efficiency: <font color='green'>高效云盘</font>]<br>[cloud_ssd: <font color='green'>SSD云盘</font>]<br>[cloud_essd: <font color='green'>ESSD云盘</font>]<br>[cloud: <font color='green'>普通云盘</font>]<br>[ephemeral_ssd: <font color='green'>本地SSD盘</font>]"
      },
      "AssociationProperty": "ALIYUN::ECS::Disk::SystemDiskCategory",
      "AssociationPropertyMetadata": {
        "ZoneId": "ECSZoneId",
        "InstanceType": "ECSInstanceType"
      },
      "Label": {
        "en": "System Disk Type",
        "zh-cn": "系统盘类型"
      }
    },
    "ECSSysDiskSize": {
      "Type": "Number",
      "Description": {
        "en": "System disk size, range of values: 40-500, units: GB.",
        "zh-cn": "系统盘大小,取值范围:40~500,单位:GB。"
      },
      "MinValue": 40,
      "Label": {
        "en": "System Disk Space",
        "zh-cn": "系统盘空间"
      },
      "MaxValue": 500,
      "Default": 40
    },
    "InstanceChargeType": {
      "Type": "String",
      "Label": {
        "en": "Instance Charge Type",
        "zh-cn": "实例的付费方式"
      },
      "Description": {
        "en": "<font color='blue'><b>Optional values:</b></font><br>[PostPaid: <font color='green'>Pay as you go.</font>]<br> [PrePaid: <font color='green'>Prepaid, monthly subscription.</font>]",
        "zh-cn": "<font color='blue'><b>取值:</b></font><br>[PostPaid: <font color='green'>按量付费。</font>]<br>[PrePaid: <font color='green'>预付费,包年包月。</font>]"
      },
      "AllowedValues": [
        "PostPaid",
        "PrePaid"
      ],
      "Default": "PostPaid"
    },
    "KeyPairName": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::KeyPair::KeyPairName",
      "Label": {
        "en": "Key Pair Name",
        "zh-cn": "密钥对名称"
      },
      "Description": {
        "en": "If it is a Windows ECS instance, ignore this parameter. The default is blank.<br>If you have filled in <font color='green'>key pair name</font>, <font color='green'>instance password< The content of /font> will still be set in the instance, but the password login method in the Linux system will be forbidden.<br><font color='red'>Please enter the name of the existing key pair. If you use the instance password Login, the key pair name does not need to be filled in.</font>",
        "zh-cn": "如果是Windows ECS实例,则忽略该参数。默认为空。<br>如果已填写<font color='green'>密钥对名称</font>,<font color='green'>实例密码</font>的内容仍会被设置到实例中,但是Linux系统中的密码登录方式会被禁止。<br><font color='red'>请输入已有密钥对的名称。如使用实例密码登录,密钥对名称不需要填写。</font>"
      },
      "Default": null
    }
  },
  "Metadata": {
    "ALIYUN::ROS::Interface": {
      "ParameterGroups": [
        {
          "Parameters": [
            "VPC",
            "VSwitch",
            "SecurityGroup"
          ],
          "Label": {
            "default": "VPC "
          }
        },
        {
          "Parameters": [
            "EIPBandwidth",
            "EIPInternetChargeType"
          ],
          "Label": {
            "default": "EIP"
          }
        },
        {
          "Parameters": [
            "ECSZoneId",
            "ECSImageId",
            "ECSInstanceType",
            "ECSDiskCategory",
            "ECSSysDiskSize",
            "InstanceChargeType",
            "ECSPassword",
            "KeyPairName"
          ],
          "Label": {
            "default": "ECS"
          }
        }
      ],
      "TemplateTags": [
        "Specify the image Id and snapshot to create ECS instance."
      ]
    }
  },
  "Resources": {
    "ECSInstanceGroup": {
      "Type": "ALIYUN::ECS::InstanceGroup",
      "Properties": {
        "IoOptimized": "optimized",
        "InstanceChargeType": {
          "Ref": "InstanceChargeType"
        },
        "ZoneId": {
          "Ref": "ECSZoneId"
        },
        "SystemDisk_Category": {
          "Ref": "ECSDiskCategory"
        },
        "SecurityGroupId": {
          "Ref": "SecurityGroup"
        },
        "VSwitchId": {
          "Ref": "VSwitch"
        },
        "MaxAmount": 1,
        "SystemDisk_Size": {
          "Ref": "ECSSysDiskSize"
        },
        "VpcId": {
          "Ref": "VPC"
        },
        "ImageId": {
          "Ref": "ECSImageId"
        },
        "InstanceType": {
          "Ref": "ECSInstanceType"
        },
        "AllocatePublicIP": "false",
        "Password": {
          "Ref": "ECSPassword"
        },
        "KeyPairName": {
          "Ref": "KeyPairName"
        }
      }
    },
    "ElasticIp": {
      "Type": "ALIYUN::VPC::EIP",
      "Properties": {
        "Bandwidth": {
          "Ref": "EIPBandwidth"
        },
        "InternetChargeType": {
          "Ref": "EIPInternetChargeType"
        }
      }
    },
    "ElasticIpAssociation": {
      "Type": "ALIYUN::VPC::EIPAssociation",
      "Properties": {
        "InstanceId": {
          "Fn::Select": [
            0,
            {
              "Fn::GetAtt": [
                "ECSInstanceGroup",
                "InstanceIds"
              ]
            }
          ]
        },
        "AllocationId": {
          "Ref": "ElasticIp"
        }
      }
    }
  },
  "Outputs": {
    "VpcId": {
      "Description": "VPC Id",
      "Value": {
        "Ref": "VPC"
      }
    },
    "SecurityGroupId": {
      "Description": "Security Group Id",
      "Value": {
        "Ref": "SecurityGroup"
      }
    },
    "VSwitchId": {
      "Description": "VSwitch Id",
      "Value": {
        "Ref": "VSwitch"
      }
    },
    "EipAddress": {
      "Description": "IP address of created EIP.",
      "Value": {
        "Fn::GetAtt": [
          "ElasticIp",
          "EipAddress"
        ]
      }
    }
  }
}

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Description:
  en: Create a VPC type ECS and bind EIP (existing VPC).
  zh-cn: 创建VPC类型ECS,并绑定EIP(已有VPC)。
Parameters:
  VPC:
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
    Type: String
    Description:
      en: Please search the ID starting with (vpc-xxx) from console-Virtual Private Cloud.
      zh-cn: 现有专有网络的实例ID,在专有网络控制台选择专有网络进行查询。
    Label:
      en: VPC ID
      zh-cn: 专有网络VPC实例ID
  VSwitch:
    AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
    AssociationPropertyMetadata:
      VpcId: VPC
    Type: String
    Description:
      en: Existing VSwitch ID, query under console-VPC-VSwitch, <font color='red'>VSwitch must be under VPC. ECS will be created under this VSwitch.</font>
      zh-cn: 现有交换机ID,在专有网络控制台选择交换机进行查询,<font color='red'>交换机必须在VPC下。ECS将创建在此交换机下。</font>
    Label:
      en: VSwitch ID
      zh-cn: 交换机实例ID
  SecurityGroup:
    Type: String
    AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
    Description:
      en: Please search the business security group ID starting with (sg-xxx) from console-ECS-Network & Security.
      zh-cn: 现有业务安全组的实例ID,在ECS控制台选择安全组进行查询。<br><font color='red'>安全组必须归属在VPC下。</font>
    Label:
      en: Business Security Group ID
      zh-cn: 业务安全组ID
    AssociationPropertyMetadata:
      VpcId: VPC
  ECSPassword:
    NoEcho: true
    Type: String
    Description:
      en: Server login password, Length 8-30, must contain three (Capital letters, lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in).
      zh-cn: 服务器登录密码,长度为8~30个字符,必须包含三项(大写英文字母、小写英文字母、数字和 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ 中的特殊字符)。
    AllowedPattern: '[0-9A-Za-z\_\-\&:;''<>,=%`~!@#\(\)\$\^\*\+\|\{\}\[\]\.\?\/]+$'
    Label:
      en: Instance Password
      zh-cn: 实例密码
    MinLength: 8
    ConstraintDescription:
      en: Length 8-30, must contain three (Capital letters, lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in).
      zh-cn: 长度为8~30个字符,必须包含三项(大写英文字母、小写英文字母、数字和 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ 中的特殊字符)。
    MaxLength: 30
    Default: Null
  EIPInternetChargeType:
    Type: String
    AllowedValues:
      - PayByBandwidth
      - PayByTraffic
    Description:
      en: The charge type of EIP, PayByBandwidth;PayByTraffic.
      zh-cn: 弹性公网IP的收费类型。PayByBandwidth:按带宽付费;PayByTraffic:按流量付费。
    Label:
      en: EIP Charge Type
      zh-cn: 弹性公网IP的收费类型
    Default: PayByTraffic
  ECSImageId:
    Type: String
    AssociationProperty: ALIYUN::ECS::Instance::ImageId
    Description:
      en: Image ID,Please use Centos7.
      zh-cn: 镜像ID,请使用Centos7。
    Label:
      en: Image
      zh-cn: 镜像
    Default: ubuntu_14
  ECSZoneId:
    AssociationProperty: ALIYUN::ECS::Instance:ZoneId
    Type: String
    Description:
      en: 'Availability zone ID.<br><b>Note: <font color=''blue''>Before selecting, please confirm whether the availability zone supports the specification of creating ECS resources. It is recommended to be different from other switch availability zones</font></b ><br><font color=''red''>The switch availability zone and the selected switch instance ID must be in the same availability zone.</font>'
      zh-cn: 可用区ID。<br><b>注: <font color='blue'>选择前请确认该可用区是否支持创建ECS资源的规格,建议与其他交换机可用区不同</font></b><br><font color='red'>交换机可用区和已选择的交换机实例ID必须在同一个可用区。</font>
    Label:
      en: VSwitch Availability Zone
      zh-cn: 交换机可用区
  EIPBandwidth:
    Type: Number
    Description:
      en: 'EIP Bandwidth, Value range: [1,200], unit: Mbps.'
      zh-cn: 弹性公网IP带宽。取值范围:1~200,单位:Mbps。
    MinValue: 1
    Label:
      en: EIP Bandwidth
      zh-cn: 弹性公网IP带宽
    MaxValue: 200
    Default: 1
  ECSInstanceType:
    AssociationPropertyMetadata:
      ZoneId: ECSZoneId
      InstanceChargeType: InstanceChargeType
    AssociationProperty: ALIYUN::ECS::Instance::InstanceType
    Type: String
    Description:
      en: <font color='blue'><b>1.Before selecting the model please confirm that the current available zone under the model is in stock, some models need to be reported in advance</b></font><br><font color='blue'><b>2.List of optional models</font><br></b></font>[ecs.c5.large <font color='green'>2vCPU 4GiB Intranet bandwidth1Gbps In-grid sending and receiving packages30MillionPPS</font>]<br></b>[ecs.c5.xlarge <font color='green'>4vCPU 8GiB Intranet bandwidth1.5Gbps In-grid sending and receiving packages50MillionPPS</font>]<br></b>[ecs.c5.2xlarge <font color='green'>8vCPU 16GiB Intranet bandwidth2.5Gbps In-grid sending and receiving packages80MillionPPS</font>]
      zh-cn: <font color='blue'><b>1、选择机型前请先确认当前可用区下该机型是否有货,部分机型需要提前报备。</b></font><br><font color='blue'><b>2、取值:</font><br></b></font>[ecs.c5.large:<font color='green'>2vCPU 4 GiB,内网带宽1Gbps、内网收发包30万PPS。</font>]<br></b>[ecs.c5.xlarge:<font color='green'>4vCPU 8GiB,内网带宽1.5Gbps、内网收发包50万PPS。</font>]<br></b>[ecs.c5.2xlarge: <font color='green'>8vCPU 16 GiB,内网带宽2.5 Gbps、内网收发包80万PPS。</font>]
    Label:
      en: Instance Type
      zh-cn: 实例规格
  ECSDiskCategory:
    Type: String
    Description:
      en: '<font color=''blue''><b>Optional values:</b></font><br>[cloud_efficiency: <font color=''green''>Efficient Cloud Disk</font>]<br>[cloud_ssd: <font color=''green''>SSD Cloud Disk</font>]<br>[cloud_essd: <font color=''green''>ESSD Cloud Disk</font>]<br>[cloud: <font color=''green''>Cloud Disk</font>]<br>[ephemeral_ssd: <font color=''green''>Local SSD Cloud Disk</font>]'
      zh-cn: '<font color=''blue''><b>取值:</b></font><br>[cloud_efficiency: <font color=''green''>高效云盘</font>]<br>[cloud_ssd: <font color=''green''>SSD云盘</font>]<br>[cloud_essd: <font color=''green''>ESSD云盘</font>]<br>[cloud: <font color=''green''>普通云盘</font>]<br>[ephemeral_ssd: <font color=''green''>本地SSD盘</font>]'
    AssociationProperty: ALIYUN::ECS::Disk::SystemDiskCategory
    AssociationPropertyMetadata:
      ZoneId: ECSZoneId
      InstanceType: ECSInstanceType
    Label:
      en: System Disk Type
      zh-cn: 系统盘类型
  ECSSysDiskSize:
    Type: Number
    Description:
      en: 'System disk size, range of values: 40-500, units: GB.'
      zh-cn: 系统盘大小,取值范围:40~500,单位:GB。
    MinValue: 40
    Label:
      en: System Disk Space
      zh-cn: 系统盘空间
    MaxValue: 500
    Default: 40
  InstanceChargeType:
    Type: String
    Label:
      en: Instance Charge Type
      zh-cn: 实例的付费方式
    Description:
      en: '<font color=''blue''><b>Optional values:</b></font><br>[PostPaid: <font color=''green''>Pay as you go.</font>]<br> [PrePaid: <font color=''green''>Prepaid, monthly subscription.</font>]'
      zh-cn: '<font color=''blue''><b>取值:</b></font><br>[PostPaid: <font color=''green''>按量付费。</font>]<br>[PrePaid: <font color=''green''>预付费,包年包月。</font>]'
    AllowedValues:
      - PostPaid
      - PrePaid
    Default: PostPaid
  KeyPairName:
    Type: String
    AssociationProperty: ALIYUN::ECS::KeyPair::KeyPairName
    Label:
      en: Key Pair Name
      zh-cn: 密钥对名称
    Description:
      en: If it is a Windows ECS instance, ignore this parameter. The default is blank.<br>If you have filled in <font color='green'>key pair name</font>, <font color='green'>instance password< The content of /font> will still be set in the instance, but the password login method in the Linux system will be forbidden.<br><font color='red'>Please enter the name of the existing key pair. If you use the instance password Login, the key pair name does not need to be filled in.</font>
      zh-cn: 如果是Windows ECS实例,则忽略该参数。默认为空。<br>如果已填写<font color='green'>密钥对名称</font>,<font color='green'>实例密码</font>的内容仍会被设置到实例中,但是Linux系统中的密码登录方式会被禁止。<br><font color='red'>请输入已有密钥对的名称。如使用实例密码登录,密钥对名称不需要填写。</font>
    Default: Null
Metadata:
  ALIYUN::ROS::Interface:
    ParameterGroups:
      - Parameters:
          - VPC
          - VSwitch
          - SecurityGroup
        Label:
          default: 'VPC '
      - Parameters:
          - EIPBandwidth
          - EIPInternetChargeType
        Label:
          default: EIP
      - Parameters:
          - ECSZoneId
          - ECSImageId
          - ECSInstanceType
          - ECSDiskCategory
          - ECSSysDiskSize
          - InstanceChargeType
          - ECSPassword
          - KeyPairName
        Label:
          default: ECS
    TemplateTags:
      - Specify the image Id and snapshot to create ECS instance.
Resources:
  ECSInstanceGroup:
    Type: ALIYUN::ECS::InstanceGroup
    Properties:
      IoOptimized: optimized
      InstanceChargeType:
        Ref: InstanceChargeType
      ZoneId:
        Ref: ECSZoneId
      SystemDisk_Category:
        Ref: ECSDiskCategory
      SecurityGroupId:
        Ref: SecurityGroup
      VSwitchId:
        Ref: VSwitch
      MaxAmount: 1
      SystemDisk_Size:
        Ref: ECSSysDiskSize
      VpcId:
        Ref: VPC
      ImageId:
        Ref: ECSImageId
      InstanceType:
        Ref: ECSInstanceType
      AllocatePublicIP: 'false'
      Password:
        Ref: ECSPassword
      KeyPairName:
        Ref: KeyPairName
  ElasticIp:
    Type: ALIYUN::VPC::EIP
    Properties:
      Bandwidth:
        Ref: EIPBandwidth
      InternetChargeType:
        Ref: EIPInternetChargeType
  ElasticIpAssociation:
    Type: ALIYUN::VPC::EIPAssociation
    Properties:
      InstanceId:
        Fn::Select:
          - 0
          - Fn::GetAtt:
              - ECSInstanceGroup
              - InstanceIds
      AllocationId:
        Ref: ElasticIp
Outputs:
  VpcId:
    Description: VPC Id
    Value:
      Ref: VPC
  SecurityGroupId:
    Description: Security Group Id
    Value:
      Ref: SecurityGroup
  VSwitchId:
    Description: VSwitch Id
    Value:
      Ref: VSwitch
  EipAddress:
    Description: IP address of created EIP.
    Value:      
       Fn::GetAtt:
        - ElasticIp
        - EipAddress