Class ListenerPort
- Namespace
- Amazon.CDK.AWS.ElasticLoadBalancing
- Assembly
- Amazon.CDK.AWS.ElasticLoadBalancing.dll
Reference to a listener's port just created.
public class ListenerPort : DeputyBase, IConnectable
- Inheritance
-
ListenerPort
- Implements
-
IConnectable
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
using Amazon.CDK.AWS.ElasticLoadBalancing;
Port port;
SecurityGroup securityGroup;
var listenerPort = new ListenerPort(securityGroup, port);
Remarks
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
Constructors
ListenerPort(ISecurityGroup, Port)
public ListenerPort(ISecurityGroup securityGroup, Port defaultPort)
Parameters
securityGroup
ISecurityGroupdefaultPort
Port
Properties
Connections
The network connections associated with this resource.
public virtual Connections_ Connections { get; }
Property Value
- Connections_