java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.elasticloadbalancing.ListenerPort
All Implemented Interfaces:
IConnectable, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-27T16:50:57.511Z") @Stability(Stable) public class ListenerPort extends software.amazon.jsii.JsiiObject implements IConnectable
Reference to a listener's port just created.

This implements IConnectable with a default port (the port that an ELB listener was just created on) for a given security group so that it can be conveniently used just like any Connectable. E.g:

const listener = elb.addListener(...);

listener.connections.allowDefaultPortFromAnyIPv4(); // or instance.connections.allowToDefaultPort(listener);

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.*;
 import software.amazon.awscdk.services.elasticloadbalancing.*;
 Port port;
 SecurityGroup securityGroup;
 ListenerPort listenerPort = new ListenerPort(securityGroup, port);
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.amazon.awscdk.services.ec2.IConnectable

    IConnectable.Jsii$Default, IConnectable.Jsii$Proxy
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    ListenerPort(ISecurityGroup securityGroup, Port defaultPort)
     
    protected
    ListenerPort(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    ListenerPort(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    The network connections associated with this resource.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • ListenerPort

      protected ListenerPort(software.amazon.jsii.JsiiObjectRef objRef)
    • ListenerPort

      protected ListenerPort(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • ListenerPort

      @Stability(Stable) public ListenerPort(@NotNull ISecurityGroup securityGroup, @NotNull Port defaultPort)
      Parameters:
      securityGroup - This parameter is required.
      defaultPort - This parameter is required.
  • Method Details

    • getConnections

      @Stability(Stable) @NotNull public Connections getConnections()
      The network connections associated with this resource.
      Specified by:
      getConnections in interface IConnectable