ALIYUN::ECS::JoinSecurityGroup

Updated at:

The ALIYUN::ECS::JoinSecurityGroup resource adds one or more ECS instances to a specified security group.

Syntax

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

Properties

Property nameTypeRequiredUpdate allowedDescriptionConstraints
SecurityGroupId String Yes No The ID of the security group. None.
InstanceId String No No The ID of the ECS instance to add to the security group. None.
InstanceIdList List No Yes The IDs of the ECS instances to add to the security group. None.
NetworkInterfaceList List No Yes The IDs of the elastic network interfaces (ENIs). None.

Return value

Fn::GetAtt

None.

Examples

  • YAML format

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

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