ApplicationListenerAttributes Struct
Properties to reference an existing listener.
| Source | aws-elasticloadbalancingv2/lib/alb/application-listener.ts |
|---|---|
| Type last changed |
Example
ts
// 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_elasticloadbalancingv2 as elbv2 } from 'aws-cdk-lib';
declare const securityGroup: ec2.SecurityGroup;
const applicationListenerAttributes: elbv2.ApplicationListenerAttributes = {
listenerArn: 'listenerArn',
securityGroup: securityGroup,
// the properties below are optional
defaultPort: 123,
};
python
# 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_elasticloadbalancingv2 as elbv2
# security_group: ec2.SecurityGroup
application_listener_attributes = elbv2.ApplicationListenerAttributes(
listener_arn="listenerArn",
security_group=security_group,
# the properties below are optional
default_port=123
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;
import software.amazon.awscdk.services.elasticloadbalancingv2.*;
SecurityGroup securityGroup;
ApplicationListenerAttributes applicationListenerAttributes = ApplicationListenerAttributes.builder()
.listenerArn("listenerArn")
.securityGroup(securityGroup)
// the properties below are optional
.defaultPort(123)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// 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.ElasticLoadBalancingV2;
SecurityGroup securityGroup;
var applicationListenerAttributes = new ApplicationListenerAttributes {
ListenerArn = "listenerArn",
SecurityGroup = securityGroup,
// the properties below are optional
DefaultPort = 123
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
var securityGroup SecurityGroup
applicationListenerAttributes := &ApplicationListenerAttributes{
ListenerArn: jsii.String("listenerArn"),
SecurityGroup: securityGroup,
// the properties below are optional
DefaultPort: jsii.Number(123),
}
Properties
defaultPortoptionalnumberdefault_portoptionalint | floatdefaultPortoptionalNumberDefaultPortoptionaldoubleDefaultPortoptional*float64 #The default port on which this listener is listening.
ARN of the listener.
securityGroupISecurityGroupsecurity_groupISecurityGroupsecurityGroupISecurityGroupSecurityGroupISecurityGroupSecurityGroupISecurityGroup required #Security group of the load balancer this listener is associated with.