Show / Hide Table of Contents

Interface IBaseNetworkListenerProps

Basic properties for a Network Listener.

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

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.APIGatewayv2.Integrations;


var vpc = new Vpc(this, "VPC");
var lb = new NetworkLoadBalancer(this, "lb", new NetworkLoadBalancerProps { Vpc = vpc });
var listener = lb.AddListener("listener", new BaseNetworkListenerProps { Port = 80 });
listener.AddTargets("target", new AddNetworkTargetsProps {
    Port = 80
});

var httpEndpoint = new HttpApi(this, "HttpProxyPrivateApi", new HttpApiProps {
    DefaultIntegration = new HttpNlbIntegration("DefaultIntegration", listener)
});

Synopsis

Properties

AlpnPolicy

Application-Layer Protocol Negotiation (ALPN) is a TLS extension that is sent on the initial TLS handshake hello messages.

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.

Port

The port on which the listener listens for requests.

Protocol

Protocol for listener, expects TCP, TLS, UDP, or TCP_UDP.

SslPolicy

SSL Policy.

Properties

AlpnPolicy

Application-Layer Protocol Negotiation (ALPN) is a TLS extension that is sent on the initial TLS handshake hello messages.

virtual Nullable<AlpnPolicy> AlpnPolicy { get; }
Property Value

System.Nullable<AlpnPolicy>

Remarks

ALPN enables the application layer to negotiate which protocols should be used over a secure connection, such as HTTP/1 and HTTP/2.

Can only be specified together with Protocol TLS.

Default: - None

Certificates

Certificate list of ACM cert ARNs.

virtual 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.

virtual NetworkListenerAction DefaultAction { get; }
Property Value

NetworkListenerAction

Remarks

This allows full control of the default Action of the load balancer, including weighted forwarding. See the NetworkListenerAction class for all options.

Cannot be specified together with defaultTargetGroups.

Default: - None.

DefaultTargetGroups

Default target groups to load balance to.

virtual INetworkTargetGroup[] DefaultTargetGroups { get; }
Property Value

INetworkTargetGroup[]

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.

Port

The port on which the listener listens for requests.

double Port { get; }
Property Value

System.Double

Protocol

Protocol for listener, expects TCP, TLS, UDP, or TCP_UDP.

virtual Nullable<Protocol> Protocol { get; }
Property Value

System.Nullable<Protocol>

Remarks

Default: - TLS if certificates are provided. TCP otherwise.

SslPolicy

SSL Policy.

virtual Nullable<SslPolicy> SslPolicy { get; }
Property Value

System.Nullable<SslPolicy>

Remarks

Default: - Current predefined security policy.

Back to top Generated by DocFX