全部產品
Search
文件中心

Resource Orchestration Service:ALIYUN::ECS::JoinSecurityGroup

更新時間:Apr 10, 2025

ALIYUN::ECS::JoinSecurityGroup類型用於將一個或多個ECS執行個體加入指定的安全性群組。

文法

{
  "Type": "ALIYUN::ECS::JoinSecurityGroup",
  "Properties": {
    "InstanceId": String,
    "InstanceIdList": List,
    "SecurityGroupId": String,
    "NetworkInterfaceList": List
  }
}

屬性

屬性名稱類型必須允許更新描述約束
SecurityGroupId String 安全性群組ID。 無。
InstanceId String 需要加入安全性群組的ECS執行個體ID。 無。
InstanceIdList List 需要加入安全性群組的多個ECS執行個體ID。 無。
NetworkInterfaceList List 彈性網卡ID。 無。

傳回值

Fn::GetAtt

無。

樣本

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Resources:
      SG:
        Type: ALIYUN::ECS::JoinSecurityGroup
        Properties:
          SecurityGroupId: sg-m5eagh7rzys2z8sa****
          InstanceIdList:
          - i-m5e505h9bgsio0wy****
          - i-m5e505hio0wyjc6r****
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Resources": {
        "SG": {
          "Type": "ALIYUN::ECS::JoinSecurityGroup",
          "Properties": {
            "SecurityGroupId": "sg-m5eagh7rzys2z8sa****",
            "InstanceIdList": [
              "i-m5e505h9bgsio0wy****",
              "i-m5e505hio0wyjc6r****"
            ]
          }
        }
      }
    }