Class CfnNetworkAclEntryMixinProps.Builder
java.lang.Object
software.amazon.awscdk.mixins.preview.services.ec2.mixins.CfnNetworkAclEntryMixinProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnNetworkAclEntryMixinProps>
- Enclosing interface:
CfnNetworkAclEntryMixinProps
@Stability(Stable)
public static final class CfnNetworkAclEntryMixinProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnNetworkAclEntryMixinProps>
A builder for
CfnNetworkAclEntryMixinProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnNetworkAclEntryMixinProps.getCidrBlock()Sets the value ofCfnNetworkAclEntryMixinProps.getEgress()egress(IResolvable egress) Sets the value ofCfnNetworkAclEntryMixinProps.getEgress()icmp(IResolvable icmp) Sets the value ofCfnNetworkAclEntryMixinProps.getIcmp()Sets the value ofCfnNetworkAclEntryMixinProps.getIcmp()ipv6CidrBlock(String ipv6CidrBlock) Sets the value ofCfnNetworkAclEntryMixinProps.getIpv6CidrBlock()networkAclId(String networkAclId) Sets the value ofCfnNetworkAclEntryMixinProps.getNetworkAclId()portRange(IResolvable portRange) Sets the value ofCfnNetworkAclEntryMixinProps.getPortRange()Sets the value ofCfnNetworkAclEntryMixinProps.getPortRange()Sets the value ofCfnNetworkAclEntryMixinProps.getProtocol()ruleAction(String ruleAction) Sets the value ofCfnNetworkAclEntryMixinProps.getRuleAction()ruleNumber(Number ruleNumber) Sets the value ofCfnNetworkAclEntryMixinProps.getRuleNumber()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
cidrBlock
Sets the value ofCfnNetworkAclEntryMixinProps.getCidrBlock()- Parameters:
cidrBlock- The IPv4 CIDR range to allow or deny, in CIDR notation (for example, 172.16.0.0/24). You must specify an IPv4 CIDR block or an IPv6 CIDR block.- Returns:
this
-
egress
Sets the value ofCfnNetworkAclEntryMixinProps.getEgress()- Parameters:
egress- Whether this rule applies to egress traffic from the subnet (true) or ingress traffic to the subnet (false). By default, AWS CloudFormation specifiesfalse.- Returns:
this
-
egress
Sets the value ofCfnNetworkAclEntryMixinProps.getEgress()- Parameters:
egress- Whether this rule applies to egress traffic from the subnet (true) or ingress traffic to the subnet (false). By default, AWS CloudFormation specifiesfalse.- Returns:
this
-
icmp
Sets the value ofCfnNetworkAclEntryMixinProps.getIcmp()- Parameters:
icmp- The Internet Control Message Protocol (ICMP) code and type. Required if specifying 1 (ICMP) for the protocol parameter.- Returns:
this
-
icmp
@Stability(Stable) public CfnNetworkAclEntryMixinProps.Builder icmp(CfnNetworkAclEntryPropsMixin.IcmpProperty icmp) Sets the value ofCfnNetworkAclEntryMixinProps.getIcmp()- Parameters:
icmp- The Internet Control Message Protocol (ICMP) code and type. Required if specifying 1 (ICMP) for the protocol parameter.- Returns:
this
-
ipv6CidrBlock
Sets the value ofCfnNetworkAclEntryMixinProps.getIpv6CidrBlock()- Parameters:
ipv6CidrBlock- The IPv6 network range to allow or deny, in CIDR notation. You must specify an IPv4 CIDR block or an IPv6 CIDR block.- Returns:
this
-
networkAclId
Sets the value ofCfnNetworkAclEntryMixinProps.getNetworkAclId()- Parameters:
networkAclId- The ID of the ACL for the entry.- Returns:
this
-
portRange
Sets the value ofCfnNetworkAclEntryMixinProps.getPortRange()- Parameters:
portRange- The range of port numbers for the UDP/TCP protocol. Required if specifying 6 (TCP) or 17 (UDP) for the protocol parameter.- Returns:
this
-
portRange
@Stability(Stable) public CfnNetworkAclEntryMixinProps.Builder portRange(CfnNetworkAclEntryPropsMixin.PortRangeProperty portRange) Sets the value ofCfnNetworkAclEntryMixinProps.getPortRange()- Parameters:
portRange- The range of port numbers for the UDP/TCP protocol. Required if specifying 6 (TCP) or 17 (UDP) for the protocol parameter.- Returns:
this
-
protocol
Sets the value ofCfnNetworkAclEntryMixinProps.getProtocol()- Parameters:
protocol- The IP protocol that the rule applies to. You must specify -1 or a protocol number. You can specify -1 for all protocols.If you specify -1, all ports are opened and the
PortRangeproperty is ignored.- Returns:
this
-
ruleAction
Sets the value ofCfnNetworkAclEntryMixinProps.getRuleAction()- Parameters:
ruleAction- Whether to allow or deny traffic that matches the rule;. valid values are "allow" or "deny".- Returns:
this
-
ruleNumber
Sets the value ofCfnNetworkAclEntryMixinProps.getRuleNumber()- Parameters:
ruleNumber- Rule number to assign to the entry, such as 100. ACL entries are processed in ascending order by rule number. Entries can't use the same rule number unless one is an egress rule and the other is an ingress rule.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnNetworkAclEntryMixinProps>- Returns:
- a new instance of
CfnNetworkAclEntryMixinProps - Throws:
NullPointerException- if any required attribute was not provided
-