Class BaseApplicationListenerProps
Basic properties for an ApplicationListener.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.ElasticLoadBalancingV2
Assembly: Amazon.CDK.AWS.ElasticLoadBalancingV2.dll
Syntax (csharp)
public class BaseApplicationListenerProps : Object, IBaseApplicationListenerProps
Syntax (vb)
Public Class BaseApplicationListenerProps
Inherits Object
Implements IBaseApplicationListenerProps
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.APIGatewayv2.Integrations;
ApplicationLoadBalancer lb;
var listener = lb.AddListener("listener", new BaseApplicationListenerProps { Port = 80 });
listener.AddTargets("target", new AddApplicationTargetsProps {
Port = 80
});
var httpEndpoint = new HttpApi(this, "HttpProxyPrivateApi", new HttpApiProps {
DefaultIntegration = new HttpAlbIntegration("DefaultIntegration", listener, new HttpAlbIntegrationProps {
ParameterMapping = new ParameterMapping().AppendHeader("header2", MappingValue.RequestHeader("header1")).RemoveHeader("header1")
})
});
Synopsis
Constructors
BaseApplicationListenerProps() |
Properties
CertificateArns | (deprecated) The certificates to use on this listener. |
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. |
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. |
Constructors
BaseApplicationListenerProps()
public BaseApplicationListenerProps()
Properties
CertificateArns
(deprecated) The certificates to use on this listener.
public string[] CertificateArns { get; set; }
Property Value
System.String[]
Remarks
Default: - No certificates.
Stability: Deprecated
Certificates
Certificate list of ACM cert ARNs.
public IListenerCertificate[] Certificates { get; set; }
Property Value
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.
public ListenerAction DefaultAction { get; set; }
Property Value
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.
public IApplicationTargetGroup[] DefaultTargetGroups { get; set; }
Property Value
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.
Open
Allow anyone to connect to the load balancer on the listener port.
public Nullable<bool> Open { get; set; }
Property Value
System.Nullable<System.Boolean>
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.
public Nullable<double> Port { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Default: - Determined from protocol if known.
Protocol
The protocol to use.
public Nullable<ApplicationProtocol> Protocol { get; set; }
Property Value
System.Nullable<ApplicationProtocol>
Remarks
Default: - Determined from port if known.
SslPolicy
The security policy that defines which ciphers and protocols are supported.
public Nullable<SslPolicy> SslPolicy { get; set; }
Property Value
System.Nullable<SslPolicy>
Remarks
Default: - The current predefined security policy.