Class CfnLoadBalancer.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLoadBalancer>
- Enclosing class:
CfnLoadBalancer
CfnLoadBalancer
.-
Method Summary
Modifier and TypeMethodDescriptionattachedInstances
(List<String> attachedInstances) The Lightsail instances to attach to the load balancer.build()
static CfnLoadBalancer.Builder
healthCheckPath
(String healthCheckPath) The path on the attached instance where the health check will be performed.instancePort
(Number instancePort) The port that the load balancer uses to direct traffic to your Lightsail instances.ipAddressType
(String ipAddressType) The IP address type of the load balancer.loadBalancerName
(String loadBalancerName) The name of the load balancer.sessionStickinessEnabled
(Boolean sessionStickinessEnabled) A Boolean value indicating whether session stickiness is enabled.sessionStickinessEnabled
(IResolvable sessionStickinessEnabled) A Boolean value indicating whether session stickiness is enabled.sessionStickinessLbCookieDurationSeconds
(String sessionStickinessLbCookieDurationSeconds) The time period, in seconds, after which the load balancer session stickiness cookie should be considered stale.An array of key-value pairs to apply to this resource.tlsPolicyName
(String tlsPolicyName) The name of the TLS security policy for the load balancer.
-
Method Details
-
create
- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
- Returns:
- a new instance of
CfnLoadBalancer.Builder
.
-
instancePort
The port that the load balancer uses to direct traffic to your Lightsail instances.For HTTP traffic, specify port
80
. For HTTPS traffic, specify port443
.- Parameters:
instancePort
- The port that the load balancer uses to direct traffic to your Lightsail instances. This parameter is required.- Returns:
this
-
loadBalancerName
The name of the load balancer.- Parameters:
loadBalancerName
- The name of the load balancer. This parameter is required.- Returns:
this
-
attachedInstances
The Lightsail instances to attach to the load balancer.- Parameters:
attachedInstances
- The Lightsail instances to attach to the load balancer. This parameter is required.- Returns:
this
-
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
).- Parameters:
healthCheckPath
- The path on the attached instance where the health check will be performed. This parameter is required.- Returns:
this
-
ipAddressType
The IP address type of the load balancer.The possible values are
ipv4
for IPv4 only, anddualstack
for both IPv4 and IPv6.- Parameters:
ipAddressType
- The IP address type of the load balancer. This parameter is required.- Returns:
this
-
sessionStickinessEnabled
@Stability(Stable) public CfnLoadBalancer.Builder sessionStickinessEnabled(Boolean 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.
- Parameters:
sessionStickinessEnabled
- A Boolean value indicating whether session stickiness is enabled. This parameter is required.- Returns:
this
-
sessionStickinessEnabled
@Stability(Stable) public CfnLoadBalancer.Builder sessionStickinessEnabled(IResolvable 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.
- Parameters:
sessionStickinessEnabled
- A Boolean value indicating whether session stickiness is enabled. This parameter is required.- Returns:
this
-
sessionStickinessLbCookieDurationSeconds
@Stability(Stable) public CfnLoadBalancer.Builder sessionStickinessLbCookieDurationSeconds(String 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.
- Parameters:
sessionStickinessLbCookieDurationSeconds
- The time period, in seconds, after which the load balancer session stickiness cookie should be considered stale. This parameter is required.- Returns:
this
-
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.- Parameters:
tags
- An array of key-value pairs to apply to this resource. This parameter is required.- Returns:
this
-
tlsPolicyName
The name of the TLS security policy for the load balancer.- Parameters:
tlsPolicyName
- The name of the TLS security policy for the load balancer. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnLoadBalancer>
- Returns:
- a newly built instance of
CfnLoadBalancer
.
-