Class CfnNetworkAclEntryProps.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnNetworkAclEntryProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnNetworkAclEntryProps>
- Enclosing interface:
CfnNetworkAclEntryProps
@Stability(Stable)
public static final class CfnNetworkAclEntryProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnNetworkAclEntryProps>
A builder for
CfnNetworkAclEntryProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnNetworkAclEntryProps.getCidrBlock()
Sets the value ofCfnNetworkAclEntryProps.getEgress()
egress
(IResolvable egress) Sets the value ofCfnNetworkAclEntryProps.getEgress()
icmp
(IResolvable icmp) Sets the value ofCfnNetworkAclEntryProps.getIcmp()
Sets the value ofCfnNetworkAclEntryProps.getIcmp()
ipv6CidrBlock
(String ipv6CidrBlock) Sets the value ofCfnNetworkAclEntryProps.getIpv6CidrBlock()
networkAclId
(String networkAclId) Sets the value ofCfnNetworkAclEntryProps.getNetworkAclId()
portRange
(IResolvable portRange) Sets the value ofCfnNetworkAclEntryProps.getPortRange()
portRange
(CfnNetworkAclEntry.PortRangeProperty portRange) Sets the value ofCfnNetworkAclEntryProps.getPortRange()
Sets the value ofCfnNetworkAclEntryProps.getProtocol()
ruleAction
(String ruleAction) Sets the value ofCfnNetworkAclEntryProps.getRuleAction()
ruleNumber
(Number ruleNumber) Sets the value ofCfnNetworkAclEntryProps.getRuleNumber()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
networkAclId
Sets the value ofCfnNetworkAclEntryProps.getNetworkAclId()
- Parameters:
networkAclId
- The ID of the ACL for the entry. This parameter is required.- Returns:
this
-
protocol
Sets the value ofCfnNetworkAclEntryProps.getProtocol()
- Parameters:
protocol
- The IP protocol that the rule applies to. This parameter is required. 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
PortRange
property is ignored.- Returns:
this
-
ruleAction
Sets the value ofCfnNetworkAclEntryProps.getRuleAction()
- Parameters:
ruleAction
- Whether to allow or deny traffic that matches the rule;. This parameter is required. valid values are "allow" or "deny".- Returns:
this
-
ruleNumber
Sets the value ofCfnNetworkAclEntryProps.getRuleNumber()
- Parameters:
ruleNumber
- Rule number to assign to the entry, such as 100. This parameter is required. 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
-
cidrBlock
Sets the value ofCfnNetworkAclEntryProps.getCidrBlock()
- Parameters:
cidrBlock
- The IPv4 CIDR range to allow or deny, in CIDR notation (for example, 172.16.0.0/24). Requirement is conditional: You must specify theCidrBlock
orIpv6CidrBlock
property.- Returns:
this
-
egress
Sets the value ofCfnNetworkAclEntryProps.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 ofCfnNetworkAclEntryProps.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 ofCfnNetworkAclEntryProps.getIcmp()
- Parameters:
icmp
- The Internet Control Message Protocol (ICMP) code and type. Requirement is conditional: Required if specifying 1 (ICMP) for the protocol parameter.- Returns:
this
-
icmp
@Stability(Stable) public CfnNetworkAclEntryProps.Builder icmp(CfnNetworkAclEntry.IcmpProperty icmp) Sets the value ofCfnNetworkAclEntryProps.getIcmp()
- Parameters:
icmp
- The Internet Control Message Protocol (ICMP) code and type. Requirement is conditional: Required if specifying 1 (ICMP) for the protocol parameter.- Returns:
this
-
ipv6CidrBlock
Sets the value ofCfnNetworkAclEntryProps.getIpv6CidrBlock()
- Parameters:
ipv6CidrBlock
- The IPv6 network range to allow or deny, in CIDR notation. Requirement is conditional: You must specify theCidrBlock
orIpv6CidrBlock
property.- Returns:
this
-
portRange
Sets the value ofCfnNetworkAclEntryProps.getPortRange()
- Parameters:
portRange
- The range of port numbers for the UDP/TCP protocol. Conditional required if specifying 6 (TCP) or 17 (UDP) for the protocol parameter.- Returns:
this
-
portRange
@Stability(Stable) public CfnNetworkAclEntryProps.Builder portRange(CfnNetworkAclEntry.PortRangeProperty portRange) Sets the value ofCfnNetworkAclEntryProps.getPortRange()
- Parameters:
portRange
- The range of port numbers for the UDP/TCP protocol. Conditional required if specifying 6 (TCP) or 17 (UDP) for the protocol parameter.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnNetworkAclEntryProps>
- Returns:
- a new instance of
CfnNetworkAclEntryProps
- Throws:
NullPointerException
- if any required attribute was not provided
-