Class CfnNetworkAclEntry.Builder

java.lang.Object
software.amazon.awscdk.services.ec2.CfnNetworkAclEntry.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnNetworkAclEntry>
Enclosing class:
CfnNetworkAclEntry

@Stability(Stable) public static final class CfnNetworkAclEntry.Builder extends Object implements software.amazon.jsii.Builder<CfnNetworkAclEntry>
A fluent builder for CfnNetworkAclEntry.
  • Method Details

    • create

      @Stability(Stable) public static CfnNetworkAclEntry.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnNetworkAclEntry.Builder.
    • networkAclId

      @Stability(Stable) public CfnNetworkAclEntry.Builder networkAclId(String networkAclId)
      The ID of the ACL for the entry.

      Parameters:
      networkAclId - The ID of the ACL for the entry. This parameter is required.
      Returns:
      this
    • protocol

      @Stability(Stable) public CfnNetworkAclEntry.Builder protocol(Number protocol)
      The IP protocol that the rule applies to.

      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.

      Parameters:
      protocol - The IP protocol that the rule applies to. This parameter is required.
      Returns:
      this
    • ruleAction

      @Stability(Stable) public CfnNetworkAclEntry.Builder ruleAction(String ruleAction)
      Whether to allow or deny traffic that matches the rule;

      valid values are "allow" or "deny".

      Parameters:
      ruleAction - Whether to allow or deny traffic that matches the rule;. This parameter is required.
      Returns:
      this
    • ruleNumber

      @Stability(Stable) public CfnNetworkAclEntry.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
    • cidrBlock

      @Stability(Stable) public CfnNetworkAclEntry.Builder cidrBlock(String 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 the CidrBlock or Ipv6CidrBlock property.

      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 the CidrBlock or Ipv6CidrBlock property. This parameter is required.
      Returns:
      this
    • egress

      @Stability(Stable) public CfnNetworkAclEntry.Builder egress(Boolean egress)
      Whether this rule applies to egress traffic from the subnet ( true ) or ingress traffic to the subnet ( false ).

      By default, AWS CloudFormation specifies false .

      Parameters:
      egress - Whether this rule applies to egress traffic from the subnet ( true ) or ingress traffic to the subnet ( false ). This parameter is required.
      Returns:
      this
    • egress

      @Stability(Stable) public CfnNetworkAclEntry.Builder egress(IResolvable egress)
      Whether this rule applies to egress traffic from the subnet ( true ) or ingress traffic to the subnet ( false ).

      By default, AWS CloudFormation specifies false .

      Parameters:
      egress - Whether this rule applies to egress traffic from the subnet ( true ) or ingress traffic to the subnet ( false ). This parameter is required.
      Returns:
      this
    • icmp

      @Stability(Stable) public CfnNetworkAclEntry.Builder icmp(IResolvable icmp)
      The Internet Control Message Protocol (ICMP) code and type.

      Requirement is conditional: Required if specifying 1 (ICMP) for the protocol parameter.

      Parameters:
      icmp - The Internet Control Message Protocol (ICMP) code and type. This parameter is required.
      Returns:
      this
    • icmp

      @Stability(Stable) public CfnNetworkAclEntry.Builder icmp(CfnNetworkAclEntry.IcmpProperty icmp)
      The Internet Control Message Protocol (ICMP) code and type.

      Requirement is conditional: Required if specifying 1 (ICMP) for the protocol parameter.

      Parameters:
      icmp - The Internet Control Message Protocol (ICMP) code and type. This parameter is required.
      Returns:
      this
    • ipv6CidrBlock

      @Stability(Stable) public CfnNetworkAclEntry.Builder ipv6CidrBlock(String ipv6CidrBlock)
      The IPv6 network range to allow or deny, in CIDR notation.

      Requirement is conditional: You must specify the CidrBlock or Ipv6CidrBlock property.

      Parameters:
      ipv6CidrBlock - The IPv6 network range to allow or deny, in CIDR notation. This parameter is required.
      Returns:
      this
    • portRange

      @Stability(Stable) public CfnNetworkAclEntry.Builder portRange(IResolvable portRange)
      The range of port numbers for the UDP/TCP protocol.

      Conditional required if specifying 6 (TCP) or 17 (UDP) for the protocol parameter.

      Parameters:
      portRange - The range of port numbers for the UDP/TCP protocol. This parameter is required.
      Returns:
      this
    • portRange

      @Stability(Stable) public CfnNetworkAclEntry.Builder portRange(CfnNetworkAclEntry.PortRangeProperty portRange)
      The range of port numbers for the UDP/TCP protocol.

      Conditional required if specifying 6 (TCP) or 17 (UDP) for the protocol parameter.

      Parameters:
      portRange - The range of port numbers for the UDP/TCP protocol. This parameter is required.
      Returns:
      this
    • build

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