Class CfnLoadBalancerProps.Builder
java.lang.Object
software.amazon.awscdk.services.lightsail.CfnLoadBalancerProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLoadBalancerProps>
- Enclosing interface:
CfnLoadBalancerProps
@Stability(Stable)
public static final class CfnLoadBalancerProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLoadBalancerProps>
A builder for
CfnLoadBalancerProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionattachedInstances
(List<String> attachedInstances) Sets the value ofCfnLoadBalancerProps.getAttachedInstances()
build()
Builds the configured instance.healthCheckPath
(String healthCheckPath) Sets the value ofCfnLoadBalancerProps.getHealthCheckPath()
instancePort
(Number instancePort) Sets the value ofCfnLoadBalancerProps.getInstancePort()
ipAddressType
(String ipAddressType) Sets the value ofCfnLoadBalancerProps.getIpAddressType()
loadBalancerName
(String loadBalancerName) Sets the value ofCfnLoadBalancerProps.getLoadBalancerName()
sessionStickinessEnabled
(Boolean sessionStickinessEnabled) Sets the value ofCfnLoadBalancerProps.getSessionStickinessEnabled()
sessionStickinessEnabled
(IResolvable sessionStickinessEnabled) Sets the value ofCfnLoadBalancerProps.getSessionStickinessEnabled()
sessionStickinessLbCookieDurationSeconds
(String sessionStickinessLbCookieDurationSeconds) Sets the value ofCfnLoadBalancerProps.getSessionStickinessLbCookieDurationSeconds()
Sets the value ofCfnLoadBalancerProps.getTags()
tlsPolicyName
(String tlsPolicyName) Sets the value ofCfnLoadBalancerProps.getTlsPolicyName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
instancePort
Sets the value ofCfnLoadBalancerProps.getInstancePort()
- Parameters:
instancePort
- The port that the load balancer uses to direct traffic to your Lightsail instances. This parameter is required. For HTTP traffic, specify port80
. For HTTPS traffic, specify port443
.- Returns:
this
-
loadBalancerName
Sets the value ofCfnLoadBalancerProps.getLoadBalancerName()
- Parameters:
loadBalancerName
- The name of the load balancer. This parameter is required.- Returns:
this
-
attachedInstances
@Stability(Stable) public CfnLoadBalancerProps.Builder attachedInstances(List<String> attachedInstances) Sets the value ofCfnLoadBalancerProps.getAttachedInstances()
- Parameters:
attachedInstances
- The Lightsail instances to attach to the load balancer.- Returns:
this
-
healthCheckPath
Sets the value ofCfnLoadBalancerProps.getHealthCheckPath()
- Parameters:
healthCheckPath
- The path on the attached instance where the health check will be performed. If no path is specified, the load balancer tries to make a request to the default (root) page (/index.html
).- Returns:
this
-
ipAddressType
Sets the value ofCfnLoadBalancerProps.getIpAddressType()
- Parameters:
ipAddressType
- The IP address type of the load balancer. The possible values areipv4
for IPv4 only, anddualstack
for both IPv4 and IPv6.- Returns:
this
-
sessionStickinessEnabled
@Stability(Stable) public CfnLoadBalancerProps.Builder sessionStickinessEnabled(Boolean sessionStickinessEnabled) Sets the value ofCfnLoadBalancerProps.getSessionStickinessEnabled()
- Parameters:
sessionStickinessEnabled
- A Boolean value indicating whether session stickiness is enabled. Enable session stickiness (also known as session affinity ) to bind a user's session to a specific instance. This ensures that all requests from the user during the session are sent to the same instance.- Returns:
this
-
sessionStickinessEnabled
@Stability(Stable) public CfnLoadBalancerProps.Builder sessionStickinessEnabled(IResolvable sessionStickinessEnabled) Sets the value ofCfnLoadBalancerProps.getSessionStickinessEnabled()
- Parameters:
sessionStickinessEnabled
- A Boolean value indicating whether session stickiness is enabled. Enable session stickiness (also known as session affinity ) to bind a user's session to a specific instance. This ensures that all requests from the user during the session are sent to the same instance.- Returns:
this
-
sessionStickinessLbCookieDurationSeconds
@Stability(Stable) public CfnLoadBalancerProps.Builder sessionStickinessLbCookieDurationSeconds(String sessionStickinessLbCookieDurationSeconds) Sets the value ofCfnLoadBalancerProps.getSessionStickinessLbCookieDurationSeconds()
- Parameters:
sessionStickinessLbCookieDurationSeconds
- The time period, in seconds, after which the load balancer session stickiness cookie should be considered stale. If you do not specify this parameter, the default value is 0, which indicates that the sticky session should last for the duration of the browser session.- Returns:
this
-
tags
Sets the value ofCfnLoadBalancerProps.getTags()
- Parameters:
tags
- An array of key-value pairs to apply to this resource. For more information, see Tag in the AWS CloudFormation User Guide .The
Value
ofTags
is optional for Lightsail resources.- Returns:
this
-
tlsPolicyName
Sets the value ofCfnLoadBalancerProps.getTlsPolicyName()
- Parameters:
tlsPolicyName
- The name of the TLS security policy for the load balancer.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnLoadBalancerProps>
- Returns:
- a new instance of
CfnLoadBalancerProps
- Throws:
NullPointerException
- if any required attribute was not provided
-