Class NetworkAclEntry.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.NetworkAclEntry.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<NetworkAclEntry>
- Enclosing class:
NetworkAclEntry
@Stability(Stable)
public static final class NetworkAclEntry.Builder
extends Object
implements software.amazon.jsii.Builder<NetworkAclEntry>
A fluent builder for
NetworkAclEntry
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
The CIDR range to allow or deny.static NetworkAclEntry.Builder
direction
(TrafficDirection direction) Traffic direction, with respect to the subnet, this rule applies to.networkAcl
(INetworkAcl networkAcl) The network ACL this entry applies to.networkAclEntryName
(String networkAclEntryName) The name of the NetworkAclEntry.ruleAction
(Action ruleAction) Whether to allow or deny traffic that matches the rule; valid values are "allow" or "deny".ruleNumber
(Number ruleNumber) Rule number to assign to the entry, such as 100.traffic
(AclTraffic traffic) What kind of traffic this ACL rule applies to.
-
Method Details
-
create
@Stability(Stable) public static NetworkAclEntry.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
NetworkAclEntry.Builder
.
-
cidr
The CIDR range to allow or deny.- Parameters:
cidr
- The CIDR range to allow or deny. This parameter is required.- Returns:
this
-
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.
- Parameters:
ruleNumber
- Rule number to assign to the entry, such as 100. This parameter is required.- Returns:
this
-
traffic
What kind of traffic this ACL rule applies to.- Parameters:
traffic
- What kind of traffic this ACL rule applies to. This parameter is required.- Returns:
this
-
direction
Traffic direction, with respect to the subnet, this rule applies to.Default: TrafficDirection.INGRESS
- Parameters:
direction
- Traffic direction, with respect to the subnet, this rule applies to. This parameter is required.- Returns:
this
-
networkAclEntryName
The name of the NetworkAclEntry.It is not recommended to use an explicit group name.
Default: If you don't specify a NetworkAclName, AWS CloudFormation generates a unique physical ID and uses that ID for the group name.
- Parameters:
networkAclEntryName
- The name of the NetworkAclEntry. This parameter is required.- Returns:
this
-
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.
Default: ALLOW
- Parameters:
ruleAction
- Whether to allow or deny traffic that matches the rule; valid values are "allow" or "deny". This parameter is required.- Returns:
this
-
networkAcl
The network ACL this entry applies to.- Parameters:
networkAcl
- The network ACL this entry applies to. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<NetworkAclEntry>
- Returns:
- a newly built instance of
NetworkAclEntry
.
-