Class PortRange.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • fromPort

      @Stability(Stable) public PortRange.Builder fromPort(Number fromPort)
      Sets the value of PortRange.getFromPort()
      Parameters:
      fromPort - The first port in the range of ports, inclusive. This parameter is required.
      Returns:
      this
    • toPort

      @Stability(Stable) public PortRange.Builder toPort(Number toPort)
      Sets the value of PortRange.getToPort()
      Parameters:
      toPort - The last port in the range of ports, inclusive.
      Returns:
      this
    • build

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