ALIYUN::ECS::JoinSecurityGroup is used to add one or more ECS instances to a specified security group.

Syntax

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

Properties

Name Type Required Editable Description Validity
SecurityGroupId String Yes No The ID of the security group. None
InstanceId String No No The ID of the ECS instance to be added to the security group. None
InstanceIdList List No Yes The IDs of ECS instances to be added to the security group. None

Response parameters

Fn::GetAtt

None

Examples

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