ALIYUN::ECS::SecurityGroupEgress
Updated at:
The ALIYUN::ECS::SecurityGroupEgress resource creates an outbound access rule for a security group.
Syntax
{
"Type": "ALIYUN::ECS::SecurityGroupEgress",
"Properties": {
"SecurityGroupId": String,
"IpProtocol": String,
"PortRange": String,
"DestGroupId": String,
"DestCidrIp": String,
"Policy": String,
"Priority": String,
"NicType": String,
"DestPrefixListId": String,
"Description": String,
"DestGroupOwnerId": String,
"Ipv6DestCidrIp": String
}
}
Properties
| Property Name | Type | Required | Update allowed | Description | Constraints |
| IpProtocol | String | Yes | No | The transport-layer protocol. | Valid values:
|
| PortRange | String | Yes | No | The range of destination ports that are open for the transport-layer protocol. | Valid values:
For more information about common port scenarios, see Commonly used ports. |
| SecurityGroupId | String | No | No | The ID of the source security group. | None |
| DestPrefixListId | String | No | No | The ID of the destination prefix list for which you want to set outbound access permissions. | You can call DescribePrefixLists to query the IDs of available prefix lists. You cannot set a prefix list for a security group in the classic network. For more information, see Limits on security groups. This parameter is ignored if you specify DestCidrIp, Ipv6DestCidrIp, or DestGroupId. |
| NicType | String | No | No | The network interface controller (NIC) type. | Valid values:
|
| Priority | Integer | No | No | The priority of the security group rule. | Valid values: 1 to 100. Default value: 1. |
| DestGroupId | String | No | No | The ID of the destination security group for which you want to set access permissions. | Specify either DestGroupId or DestCidrIp. If you specify DestGroupId but not DestCidrIp, NicType is set to intranet. If you specify both DestGroupId and DestCidrIp, the value of DestCidrIp takes precedence. |
| DestCidrIp | String | No | No | The destination IP address range. | Supports IPv4 address ranges. |
| Policy | String | No | No | You can set access permissions. | Valid values:
|
| Description | String | No | Yes | The description of the security group rule. | The description must be 1 to 512 characters long. |
| DestGroupOwnerId | String | No | No | When you set a security group rule across accounts, this is the Alibaba Cloud account ID of the destination security group. | If you do not set DestGroupOwnerId, the rule is considered a rule for another security group within your account. If you have already set DestCidrIp, the DestGroupOwnerId setting is invalid. |
| Ipv6DestCidrIp | String | No | No | The destination IPv6 CIDR block. | Supports CIDR blocks and IPv6 address ranges. Only IP addresses in VPCs are supported. |
Return value
Fn::GetAtt
None.
Examples
-
JSONformat{ "ROSTemplateFormatVersion": "2015-09-01", "Description": "Test ECS SecurityGroupEgress", "Parameters": { "SecurityGroupId": { "Type": "String", "AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId", "Label": { "zh-cn": "Security Group ID", "en": "Security Group ID" } } }, "Resources": { "SgEgress": { "Type": "ALIYUN::ECS::SecurityGroupEgress", "Properties": { "IpProtocol": "all", "PortRange": "-1/-1", "NicType": "intranet", "SecurityGroupId": { "Ref": "SecurityGroupId" } } } } }
Is this page helpful?