Class CommonNetworkAclEntryOptions.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CommonNetworkAclEntryOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CommonNetworkAclEntryOptions>
- Enclosing interface:
CommonNetworkAclEntryOptions
@Stability(Stable)
public static final class CommonNetworkAclEntryOptions.Builder
extends Object
implements software.amazon.jsii.Builder<CommonNetworkAclEntryOptions>
A builder for
CommonNetworkAclEntryOptions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCommonNetworkAclEntryOptions.getCidr()
direction
(TrafficDirection direction) Sets the value ofCommonNetworkAclEntryOptions.getDirection()
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
-
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
@Stability(Stable) public CommonNetworkAclEntryOptions.Builder direction(TrafficDirection 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 CommonNetworkAclEntryOptions.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<CommonNetworkAclEntryOptions>
- Returns:
- a new instance of
CommonNetworkAclEntryOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-