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,
"NetworkInterfaceList": List
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
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 the ECS instances to be added to the security group. | None |
NetworkInterfaceList | List | No | Yes | The IDs of the elastic network interfaces (ENIs). | None |
Response parameters
Fn::GetAtt
None
Examples
JSON
format{ "ROSTemplateFormatVersion": "2015-09-01", "Resources": { "SG": { "Type": "ALIYUN::ECS::JoinSecurityGroup", "Properties": { "SecurityGroupId": "sg-m5eagh7rzys2z8sa****", "InstanceIdList": [ "i-m5e505h9bgsio0wy****", "i-m5e505hio0wyjc6r****" ] } } } }