Class LoadBalancerListener.Builder
java.lang.Object
software.amazon.awscdk.services.elasticloadbalancing.LoadBalancerListener.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<LoadBalancerListener>
- Enclosing interface:
LoadBalancerListener
@Stability(Stable)
public static final class LoadBalancerListener.Builder
extends Object
implements software.amazon.jsii.Builder<LoadBalancerListener>
A builder for
LoadBalancerListener
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowConnectionsFrom
(List<? extends IConnectable> allowConnectionsFrom) Sets the value ofLoadBalancerListener.getAllowConnectionsFrom()
build()
Builds the configured instance.externalPort
(Number externalPort) Sets the value ofLoadBalancerListener.getExternalPort()
externalProtocol
(LoadBalancingProtocol externalProtocol) Sets the value ofLoadBalancerListener.getExternalProtocol()
internalPort
(Number internalPort) Sets the value ofLoadBalancerListener.getInternalPort()
internalProtocol
(LoadBalancingProtocol internalProtocol) Sets the value ofLoadBalancerListener.getInternalProtocol()
policyNames
(List<String> policyNames) Sets the value ofLoadBalancerListener.getPolicyNames()
sslCertificateArn
(String sslCertificateArn) Sets the value ofLoadBalancerListener.getSslCertificateArn()
sslCertificateId
(String sslCertificateId) Deprecated.- use sslCertificateArn instead
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
externalPort
Sets the value ofLoadBalancerListener.getExternalPort()
- Parameters:
externalPort
- External listening port. This parameter is required.- Returns:
this
-
allowConnectionsFrom
@Stability(Stable) public LoadBalancerListener.Builder allowConnectionsFrom(List<? extends IConnectable> allowConnectionsFrom) Sets the value ofLoadBalancerListener.getAllowConnectionsFrom()
- Parameters:
allowConnectionsFrom
- Allow connections to the load balancer from the given set of connection peers. 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).- Returns:
this
-
externalProtocol
@Stability(Stable) public LoadBalancerListener.Builder externalProtocol(LoadBalancingProtocol externalProtocol) Sets the value ofLoadBalancerListener.getExternalProtocol()
- Parameters:
externalProtocol
- What public protocol to use for load balancing. Either 'tcp', 'ssl', 'http' or 'https'.May be omitted if the external port is either 80 or 443.
- Returns:
this
-
internalPort
Sets the value ofLoadBalancerListener.getInternalPort()
- Parameters:
internalPort
- Instance listening port. Same as the externalPort if not specified.- Returns:
this
-
internalProtocol
@Stability(Stable) public LoadBalancerListener.Builder internalProtocol(LoadBalancingProtocol internalProtocol) Sets the value ofLoadBalancerListener.getInternalProtocol()
- Parameters:
internalProtocol
- What public protocol to use for load balancing. 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'.
- Returns:
this
-
policyNames
Sets the value ofLoadBalancerListener.getPolicyNames()
- Parameters:
policyNames
- SSL policy names.- Returns:
this
-
sslCertificateArn
Sets the value ofLoadBalancerListener.getSslCertificateArn()
- Parameters:
sslCertificateArn
- the ARN of the SSL certificate.- Returns:
this
-
sslCertificateId
@Stability(Deprecated) @Deprecated public LoadBalancerListener.Builder sslCertificateId(String sslCertificateId) Deprecated.- use sslCertificateArn insteadSets the value ofLoadBalancerListener.getSslCertificateId()
- Parameters:
sslCertificateId
- the ARN of the SSL certificate.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<LoadBalancerListener>
- Returns:
- a new instance of
LoadBalancerListener
- Throws:
NullPointerException
- if any required attribute was not provided
-