Class NetworkAclEntryProps.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.NetworkAclEntryProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<NetworkAclEntryProps>
- Enclosing interface:
NetworkAclEntryProps
@Stability(Stable)
public static final class NetworkAclEntryProps.Builder
extends Object
implements software.amazon.jsii.Builder<NetworkAclEntryProps>
A builder for
NetworkAclEntryProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCommonNetworkAclEntryOptions.getCidr()
direction
(TrafficDirection direction) Sets the value ofCommonNetworkAclEntryOptions.getDirection()
networkAcl
(INetworkAcl networkAcl) Sets the value ofNetworkAclEntryProps.getNetworkAcl()
networkAclEntryName
(String networkAclEntryName) Sets the value ofCommonNetworkAclEntryOptions.getNetworkAclEntryName()
ruleAction
(Action ruleAction) Sets the value ofCommonNetworkAclEntryOptions.getRuleAction()
ruleNumber
(Number ruleNumber) Sets the value ofCommonNetworkAclEntryOptions.getRuleNumber()
traffic
(AclTraffic traffic) Sets the value ofCommonNetworkAclEntryOptions.getTraffic()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
networkAcl
Sets the value ofNetworkAclEntryProps.getNetworkAcl()
- Parameters:
networkAcl
- The network ACL this entry applies to. This parameter is required.- Returns:
this
-
cidr
Sets the value ofCommonNetworkAclEntryOptions.getCidr()
- Parameters:
cidr
- The CIDR range to allow or deny. This parameter is required.- Returns:
this
-
ruleNumber
Sets the value ofCommonNetworkAclEntryOptions.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
-
traffic
Sets the value ofCommonNetworkAclEntryOptions.getTraffic()
- Parameters:
traffic
- What kind of traffic this ACL rule applies to. This parameter is required.- Returns:
this
-
direction
Sets the value ofCommonNetworkAclEntryOptions.getDirection()
- Parameters:
direction
- Traffic direction, with respect to the subnet, this rule applies to.- Returns:
this
-
networkAclEntryName
@Stability(Stable) public NetworkAclEntryProps.Builder networkAclEntryName(String networkAclEntryName) Sets the value ofCommonNetworkAclEntryOptions.getNetworkAclEntryName()
- Parameters:
networkAclEntryName
- The name of the NetworkAclEntry. It is not recommended to use an explicit group name.- Returns:
this
-
ruleAction
Sets the value ofCommonNetworkAclEntryOptions.getRuleAction()
- Parameters:
ruleAction
- Whether to allow or deny traffic that matches the rule; valid values are "allow" or "deny". Any traffic that is not explicitly allowed is automatically denied in a custom ACL, all traffic is automatically allowed in a default ACL.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<NetworkAclEntryProps>
- Returns:
- a new instance of
NetworkAclEntryProps
- Throws:
NullPointerException
- if any required attribute was not provided
-