Interface PortProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
PortProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-05T20:26:30.347Z") @Stability(Stable) public interface PortProps extends software.amazon.jsii.JsiiSerializable
Properties to create a port range.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.ec2.*;
 PortProps portProps = PortProps.builder()
         .protocol(Protocol.ALL)
         .stringRepresentation("stringRepresentation")
         // the properties below are optional
         .fromPort(123)
         .toPort(123)
         .build();
 
  • Method Details

    • getProtocol

      @Stability(Stable) @NotNull Protocol getProtocol()
      The protocol for the range.
    • getStringRepresentation

      @Stability(Stable) @NotNull String getStringRepresentation()
      String representation for this object.
    • getFromPort

      @Stability(Stable) @Nullable default Number getFromPort()
      The starting port for the range.

      Default: - Not included in the rule

    • getToPort

      @Stability(Stable) @Nullable default Number getToPort()
      The ending port for the range.

      Default: - Not included in the rule

    • builder

      @Stability(Stable) static PortProps.Builder builder()
      Returns:
      a PortProps.Builder of PortProps