ListenerPort

class aws_cdk.aws_elasticloadbalancing.ListenerPort(security_group, default_port)

Bases: object

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 aws_cdk.aws_ec2 as ec2
import aws_cdk.aws_elasticloadbalancing as elb

# port is of type Port
# security_group is of type SecurityGroup

listener_port = elb.ListenerPort(security_group, port)
Parameters

Attributes

connections

The network connections associated with this resource.

Return type

Connections