Show / Hide Table of Contents

Interface IBaseApplicationListenerProps

Basic properties for an ApplicationListener.

Namespace: Amazon.CDK.AWS.ElasticLoadBalancingV2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IBaseApplicationListenerProps
Syntax (vb)
Public Interface IBaseApplicationListenerProps
Remarks

ExampleMetadata: infused

Examples
Cluster cluster;
            TaskDefinition taskDefinition;
            Vpc vpc;

            var service = new FargateService(this, "Service", new FargateServiceProps { Cluster = cluster, TaskDefinition = taskDefinition, MinHealthyPercent = 100 });

            var lb = new ApplicationLoadBalancer(this, "LB", new ApplicationLoadBalancerProps { Vpc = vpc, InternetFacing = true });
            var listener = lb.AddListener("Listener", new BaseApplicationListenerProps { Port = 80 });
            service.RegisterLoadBalancerTargets(new EcsTarget {
                ContainerName = "web",
                ContainerPort = 80,
                NewTargetGroupId = "ECS",
                Listener = ListenerConfig.ApplicationListener(listener, new AddApplicationTargetsProps {
                    Protocol = ApplicationProtocol.HTTPS
                })
            });

Synopsis

Properties

Certificates

Certificate list of ACM cert ARNs.

DefaultAction

Default action to take for requests to this listener.

DefaultTargetGroups

Default target groups to load balance to.

MutualAuthentication

The mutual authentication configuration information.

Open

Allow anyone to connect to the load balancer on the listener port.

Port

The port on which the listener listens for requests.

Protocol

The protocol to use.

SslPolicy

The security policy that defines which ciphers and protocols are supported.

Properties

Certificates

Certificate list of ACM cert ARNs.

IListenerCertificate[]? Certificates { get; }
Property Value

IListenerCertificate[]

Remarks

You must provide exactly one certificate if the listener protocol is HTTPS or TLS.

Default: - No certificates.

DefaultAction

Default action to take for requests to this listener.

ListenerAction? DefaultAction { get; }
Property Value

ListenerAction

Remarks

This allows full control of the default action of the load balancer, including Action chaining, fixed responses and redirect responses.

See the ListenerAction class for all options.

Cannot be specified together with defaultTargetGroups.

Default: - None.

DefaultTargetGroups

Default target groups to load balance to.

IApplicationTargetGroup[]? DefaultTargetGroups { get; }
Property Value

IApplicationTargetGroup[]

Remarks

All target groups will be load balanced to with equal weight and without stickiness. For a more complex configuration than that, use either defaultAction or addAction().

Cannot be specified together with defaultAction.

Default: - None.

MutualAuthentication

The mutual authentication configuration information.

IMutualAuthentication? MutualAuthentication { get; }
Property Value

IMutualAuthentication

Remarks

Default: - No mutual authentication configuration

See: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/mutual-authentication.html

Open

Allow anyone to connect to the load balancer on the listener port.

bool? Open { get; }
Property Value

bool?

Remarks

If this is specified, the load balancer will be opened up to anyone who can reach it. For internal load balancers this is anyone in the same VPC. For public load balancers, this is anyone on the internet.

If you want to be more selective about who can access this load balancer, set this to false and use the listener's connections object to selectively grant access to the load balancer on the listener port.

Default: true

Port

The port on which the listener listens for requests.

double? Port { get; }
Property Value

double?

Remarks

Default: - Determined from protocol if known.

Protocol

The protocol to use.

ApplicationProtocol? Protocol { get; }
Property Value

ApplicationProtocol?

Remarks

Default: - Determined from port if known.

SslPolicy

The security policy that defines which ciphers and protocols are supported.

SslPolicy? SslPolicy { get; }
Property Value

SslPolicy?

Remarks

Default: - The current predefined security policy.

Back to top Generated by DocFX