Interface CfnSecurityGroup.EgressProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnSecurityGroup.EgressProperty.Jsii$Proxy
Enclosing class:
CfnSecurityGroup

@Stability(Stable) public static interface CfnSecurityGroup.EgressProperty extends software.amazon.jsii.JsiiSerializable
Adds the specified outbound (egress) rule to a security group.

An outbound rule permits instances to send traffic to the specified IPv4 or IPv6 address range, the IP address ranges that are specified by a prefix list, or the instances that are associated with a destination security group. For more information, see Security group rules .

You must specify exactly one of the following destinations: an IPv4 address range, an IPv6 address range, a prefix list, or a security group.

You must specify a protocol for each rule (for example, TCP). If the protocol is TCP or UDP, you must also specify a port or port range. If the protocol is ICMP or ICMPv6, you must also specify the ICMP/ICMPv6 type and code.

Rule changes are propagated to instances associated with the security group as quickly as possible. However, a small delay might occur.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.ec2.*;
 EgressProperty egressProperty = EgressProperty.builder()
         .ipProtocol("ipProtocol")
         // the properties below are optional
         .cidrIp("cidrIp")
         .cidrIpv6("cidrIpv6")
         .description("description")
         .destinationPrefixListId("destinationPrefixListId")
         .destinationSecurityGroupId("destinationSecurityGroupId")
         .fromPort(123)
         .toPort(123)
         .build();
 

See Also: