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
@Stability(Stable) public static CfnLoadBalancer.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.- 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
- See Also:
-
loadBalancerName
The name of the load balancer.- Parameters:
loadBalancerName
- The name of the load balancer. This parameter is required.- Returns:
this
- See Also:
-
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
- See Also:
-
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
- See Also:
-
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
- See Also:
-
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
- See Also:
-
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
- See Also:
-
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
- See Also:
-
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
- See Also:
-
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
- See Also:
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnLoadBalancer>
- Returns:
- a newly built instance of
CfnLoadBalancer
.
-