Class CfnLoadBalancer.ListenersProperty.Builder
java.lang.Object
software.amazon.awscdk.services.elasticloadbalancing.CfnLoadBalancer.ListenersProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLoadBalancer.ListenersProperty>
- Enclosing interface:
CfnLoadBalancer.ListenersProperty
@Stability(Stable)
public static final class CfnLoadBalancer.ListenersProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLoadBalancer.ListenersProperty>
A builder for
CfnLoadBalancer.ListenersProperty
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.instancePort
(String instancePort) Sets the value ofCfnLoadBalancer.ListenersProperty.getInstancePort()
instanceProtocol
(String instanceProtocol) Sets the value ofCfnLoadBalancer.ListenersProperty.getInstanceProtocol()
loadBalancerPort
(String loadBalancerPort) Sets the value ofCfnLoadBalancer.ListenersProperty.getLoadBalancerPort()
policyNames
(List<String> policyNames) Sets the value ofCfnLoadBalancer.ListenersProperty.getPolicyNames()
Sets the value ofCfnLoadBalancer.ListenersProperty.getProtocol()
sslCertificateId
(String sslCertificateId) Sets the value ofCfnLoadBalancer.ListenersProperty.getSslCertificateId()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
instancePort
@Stability(Stable) public CfnLoadBalancer.ListenersProperty.Builder instancePort(String instancePort) Sets the value ofCfnLoadBalancer.ListenersProperty.getInstancePort()
- Parameters:
instancePort
- The port on which the instance is listening. This parameter is required.- Returns:
this
-
loadBalancerPort
@Stability(Stable) public CfnLoadBalancer.ListenersProperty.Builder loadBalancerPort(String loadBalancerPort) Sets the value ofCfnLoadBalancer.ListenersProperty.getLoadBalancerPort()
- Parameters:
loadBalancerPort
- The port on which the load balancer is listening. This parameter is required. On EC2-VPC, you can specify any port from the range 1-65535. On EC2-Classic, you can specify any port from the following list: 25, 80, 443, 465, 587, 1024-65535.- Returns:
this
-
protocol
Sets the value ofCfnLoadBalancer.ListenersProperty.getProtocol()
- Parameters:
protocol
- The load balancer transport protocol to use for routing: HTTP, HTTPS, TCP, or SSL. This parameter is required.- Returns:
this
-
instanceProtocol
@Stability(Stable) public CfnLoadBalancer.ListenersProperty.Builder instanceProtocol(String instanceProtocol) Sets the value ofCfnLoadBalancer.ListenersProperty.getInstanceProtocol()
- Parameters:
instanceProtocol
- The protocol to use for routing traffic to instances: HTTP, HTTPS, TCP, or SSL. If the front-end protocol is TCP or SSL, the back-end protocol must be TCP or SSL. If the front-end protocol is HTTP or HTTPS, the back-end protocol must be HTTP or HTTPS.If there is another listener with the same
InstancePort
whoseInstanceProtocol
is secure, (HTTPS or SSL), the listener'sInstanceProtocol
must also be secure.If there is another listener with the same
InstancePort
whoseInstanceProtocol
is HTTP or TCP, the listener'sInstanceProtocol
must be HTTP or TCP.- Returns:
this
-
policyNames
@Stability(Stable) public CfnLoadBalancer.ListenersProperty.Builder policyNames(List<String> policyNames) Sets the value ofCfnLoadBalancer.ListenersProperty.getPolicyNames()
- Parameters:
policyNames
- The names of the policies to associate with the listener.- Returns:
this
-
sslCertificateId
@Stability(Stable) public CfnLoadBalancer.ListenersProperty.Builder sslCertificateId(String sslCertificateId) Sets the value ofCfnLoadBalancer.ListenersProperty.getSslCertificateId()
- Parameters:
sslCertificateId
- The Amazon Resource Name (ARN) of the server certificate.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnLoadBalancer.ListenersProperty>
- Returns:
- a new instance of
CfnLoadBalancer.ListenersProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-