Class AclPortRange.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • from

      @Stability(Stable) public AclPortRange.Builder from(Number from)
      Sets the value of AclPortRange.getFrom()
      Parameters:
      from - The first port in the range. Required if you specify 6 (TCP) or 17 (UDP) for the protocol parameter.
      Returns:
      this
    • to

      @Stability(Stable) public AclPortRange.Builder to(Number to)
      Sets the value of AclPortRange.getTo()
      Parameters:
      to - The last port in the range. Required if you specify 6 (TCP) or 17 (UDP) for the protocol parameter.
      Returns:
      this
    • build

      @Stability(Stable) public AclPortRange build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<AclPortRange>
      Returns:
      a new instance of AclPortRange
      Throws:
      NullPointerException - if any required attribute was not provided