Class ListenerPort
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.125.0 (build fdbe357)",
date="2026-01-23T11:19:46.873Z")
@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.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.ec2.IConnectable
IConnectable.Jsii$Default, IConnectable.Jsii$Proxy -
Constructor Summary
ConstructorsModifierConstructorDescriptionListenerPort(ISecurityGroup securityGroup, Port defaultPort) protectedListenerPort(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedListenerPort(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionThe 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, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
The network connections associated with this resource.- Specified by:
getConnectionsin interfaceIConnectable
-