class ListenerPort
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.ElasticLoadBalancing.ListenerPort |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awselasticloadbalancing#ListenerPort |
![]() | software.amazon.awscdk.services.elasticloadbalancing.ListenerPort |
![]() | aws_cdk.aws_elasticloadbalancing.ListenerPort |
![]() | aws-cdk-lib » 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 { aws_ec2 as ec2 } from 'aws-cdk-lib';
import { aws_elasticloadbalancing as elb } from 'aws-cdk-lib';
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.