Class CfnSecurityGroupPropsMixin.EgressProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.ec2.CfnSecurityGroupPropsMixin.EgressProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnSecurityGroupPropsMixin.EgressProperty>
- Enclosing interface:
CfnSecurityGroupPropsMixin.EgressProperty
@Stability(Stable)
public static final class CfnSecurityGroupPropsMixin.EgressProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnSecurityGroupPropsMixin.EgressProperty>
A builder for
CfnSecurityGroupPropsMixin.EgressProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnSecurityGroupPropsMixin.EgressProperty.getCidrIp()Sets the value ofCfnSecurityGroupPropsMixin.EgressProperty.getCidrIpv6()description(String description) Sets the value ofCfnSecurityGroupPropsMixin.EgressProperty.getDescription()destinationPrefixListId(String destinationPrefixListId) Sets the value ofCfnSecurityGroupPropsMixin.EgressProperty.getDestinationPrefixListId()destinationSecurityGroupId(String destinationSecurityGroupId) destinationSecurityGroupId(ISecurityGroupRef destinationSecurityGroupId) Sets the value ofCfnSecurityGroupPropsMixin.EgressProperty.getFromPort()ipProtocol(String ipProtocol) Sets the value ofCfnSecurityGroupPropsMixin.EgressProperty.getIpProtocol()Sets the value ofCfnSecurityGroupPropsMixin.EgressProperty.getToPort()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
cidrIp
Sets the value ofCfnSecurityGroupPropsMixin.EgressProperty.getCidrIp()- Parameters:
cidrIp- The IPv4 address range, in CIDR format. You must specify exactly one of the following:CidrIp,CidrIpv6,DestinationPrefixListId, orDestinationSecurityGroupId.For examples of rules that you can add to security groups for specific access scenarios, see Security group rules for different use cases in the Amazon EC2 User Guide .
- Returns:
this
-
cidrIpv6
@Stability(Stable) public CfnSecurityGroupPropsMixin.EgressProperty.Builder cidrIpv6(String cidrIpv6) Sets the value ofCfnSecurityGroupPropsMixin.EgressProperty.getCidrIpv6()- Parameters:
cidrIpv6- The IPv6 address range, in CIDR format. You must specify exactly one of the following:CidrIp,CidrIpv6,DestinationPrefixListId, orDestinationSecurityGroupId.For examples of rules that you can add to security groups for specific access scenarios, see Security group rules for different use cases in the Amazon EC2 User Guide .
- Returns:
this
-
description
@Stability(Stable) public CfnSecurityGroupPropsMixin.EgressProperty.Builder description(String description) Sets the value ofCfnSecurityGroupPropsMixin.EgressProperty.getDescription()- Parameters:
description- A description for the security group rule. Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*- Returns:
this
-
destinationPrefixListId
@Stability(Stable) public CfnSecurityGroupPropsMixin.EgressProperty.Builder destinationPrefixListId(String destinationPrefixListId) Sets the value ofCfnSecurityGroupPropsMixin.EgressProperty.getDestinationPrefixListId()- Parameters:
destinationPrefixListId- The prefix list IDs for the destination AWS service. This is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.You must specify exactly one of the following:
CidrIp,CidrIpv6,DestinationPrefixListId, orDestinationSecurityGroupId.- Returns:
this
-
destinationSecurityGroupId
@Stability(Stable) public CfnSecurityGroupPropsMixin.EgressProperty.Builder destinationSecurityGroupId(String destinationSecurityGroupId) - Parameters:
destinationSecurityGroupId- The ID of the destination VPC security group. You must specify exactly one of the following:CidrIp,CidrIpv6,DestinationPrefixListId, orDestinationSecurityGroupId.- Returns:
this
-
destinationSecurityGroupId
@Stability(Stable) public CfnSecurityGroupPropsMixin.EgressProperty.Builder destinationSecurityGroupId(ISecurityGroupRef destinationSecurityGroupId) - Parameters:
destinationSecurityGroupId- The ID of the destination VPC security group. You must specify exactly one of the following:CidrIp,CidrIpv6,DestinationPrefixListId, orDestinationSecurityGroupId.- Returns:
this
-
fromPort
@Stability(Stable) public CfnSecurityGroupPropsMixin.EgressProperty.Builder fromPort(Number fromPort) Sets the value ofCfnSecurityGroupPropsMixin.EgressProperty.getFromPort()- Parameters:
fromPort- If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP type or -1 (all ICMP types).- Returns:
this
-
ipProtocol
@Stability(Stable) public CfnSecurityGroupPropsMixin.EgressProperty.Builder ipProtocol(String ipProtocol) Sets the value ofCfnSecurityGroupPropsMixin.EgressProperty.getIpProtocol()- Parameters:
ipProtocol- The IP protocol name (tcp,udp,icmp,icmpv6) or number (see Protocol Numbers ). Use-1to specify all protocols. When authorizing security group rules, specifying-1or a protocol number other thantcp,udp,icmp, oricmpv6allows traffic on all ports, regardless of any port range you specify. Fortcp,udp, andicmp, you must specify a port range. Foricmpv6, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.- Returns:
this
-
toPort
Sets the value ofCfnSecurityGroupPropsMixin.EgressProperty.getToPort()- Parameters:
toPort- If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP code or -1 (all ICMP codes). If the start port is -1 (all ICMP types), then the end port must be -1 (all ICMP codes).- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnSecurityGroupPropsMixin.EgressProperty>- Returns:
- a new instance of
CfnSecurityGroupPropsMixin.EgressProperty - Throws:
NullPointerException- if any required attribute was not provided
-