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);
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_ec2 as ec2 from aws_cdk import aws_elasticloadbalancing as elb # port: ec2.Port # security_group: ec2.SecurityGroup listener_port = elb.ListenerPort(security_group, port)
- Parameters:
security_group (
ISecurityGroup
) –default_port (
Port
) –
Attributes
- connections
The network connections associated with this resource.