class ListenerPort
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.ElasticLoadBalancing.ListenerPort |
![]() | software.amazon.awscdk.services.elasticloadbalancing.ListenerPort |
![]() | aws_cdk.aws_elasticloadbalancing.ListenerPort |
![]() | @aws-cdk/aws-elasticloadbalancing » ListenerPort |
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 * as ec2 from '@aws-cdk/aws-ec2';
import * as elb from '@aws-cdk/aws-elasticloadbalancing';
declare const port: ec2.Port;
declare const securityGroup: ec2.SecurityGroup;
const listenerPort = new elb.ListenerPort(securityGroup, port);
Initializer
new ListenerPort(securityGroup: ISecurityGroup, defaultPort: Port)
Parameters
- securityGroup
ISecurity
Group - defaultPort
Port
Properties
Name | Type | Description |
---|---|---|
connections | Connections | The network connections associated with this resource. |
connections
Type:
Connections
The network connections associated with this resource.