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 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

      @Stability(Stable) public NetworkAclEntry.Builder cidr(AclCidr cidr)
      The CIDR range to allow or deny.

      Parameters:
      cidr - The CIDR range to allow or deny. This parameter is required.
      Returns:
      this
    • ruleNumber

      @Stability(Stable) public NetworkAclEntry.Builder ruleNumber(Number 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

      @Stability(Stable) public NetworkAclEntry.Builder traffic(AclTraffic 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

      @Stability(Stable) public NetworkAclEntry.Builder direction(TrafficDirection 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

      @Stability(Stable) public NetworkAclEntry.Builder networkAclEntryName(String 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

      @Stability(Stable) public NetworkAclEntry.Builder ruleAction(Action 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

      @Stability(Stable) public NetworkAclEntry.Builder networkAcl(INetworkAcl networkAcl)
      The network ACL this entry applies to.

      Parameters:
      networkAcl - The network ACL this entry applies to. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public NetworkAclEntry build()
      Specified by:
      build in interface software.amazon.jsii.Builder<NetworkAclEntry>
      Returns:
      a newly built instance of NetworkAclEntry.