Interface ILoadBalancerListener
Add a backend to the load balancer.
Namespace: Amazon.CDK.AWS.ElasticLoadBalancing
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ILoadBalancerListener
Syntax (vb)
Public Interface ILoadBalancerListener
Remarks
ExampleMetadata: infused
Examples
IVpc vpc;
AutoScalingGroup myAutoScalingGroup;
var lb = new LoadBalancer(this, "LB", new LoadBalancerProps {
Vpc = vpc,
InternetFacing = true,
HealthCheck = new HealthCheck {
Port = 80
}
});
lb.AddTarget(myAutoScalingGroup);
lb.AddListener(new LoadBalancerListener {
ExternalPort = 80
});
Synopsis
Properties
AllowConnectionsFrom | Allow connections to the load balancer from the given set of connection peers. |
ExternalPort | External listening port. |
ExternalProtocol | What public protocol to use for load balancing. |
InternalPort | Instance listening port. |
InternalProtocol | What public protocol to use for load balancing. |
PolicyNames | SSL policy names. |
SslCertificateArn | the ARN of the SSL certificate. |
Properties
AllowConnectionsFrom
Allow connections to the load balancer from the given set of connection peers.
virtual IConnectable[] AllowConnectionsFrom { get; }
Property Value
Remarks
By default, connections will be allowed from anywhere. Set this to an empty list to deny connections, or supply a custom list of peers to allow connections from (IP ranges or security groups).
Default: Anywhere
ExternalPort
External listening port.
double ExternalPort { get; }
Property Value
System.Double
ExternalProtocol
What public protocol to use for load balancing.
virtual Nullable<LoadBalancingProtocol> ExternalProtocol { get; }
Property Value
System.Nullable<LoadBalancingProtocol>
Remarks
Either 'tcp', 'ssl', 'http' or 'https'.
May be omitted if the external port is either 80 or 443.
InternalPort
Instance listening port.
virtual Nullable<double> InternalPort { get; }
Property Value
System.Nullable<System.Double>
Remarks
Same as the externalPort if not specified.
Default: externalPort
InternalProtocol
What public protocol to use for load balancing.
virtual Nullable<LoadBalancingProtocol> InternalProtocol { get; }
Property Value
System.Nullable<LoadBalancingProtocol>
Remarks
Either 'tcp', 'ssl', 'http' or 'https'.
May be omitted if the internal port is either 80 or 443.
The instance protocol is 'tcp' if the front-end protocol is 'tcp' or 'ssl', the instance protocol is 'http' if the front-end protocol is 'https'.
PolicyNames
SSL policy names.
virtual string[] PolicyNames { get; }
Property Value
System.String[]
SslCertificateArn
the ARN of the SSL certificate.
virtual string SslCertificateArn { get; }
Property Value
System.String
Remarks
Default: - none