Interface CfnLoadBalancerProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnLoadBalancerProps.Jsii$Proxy
CfnLoadBalancer
.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.lightsail.*; CfnLoadBalancerProps cfnLoadBalancerProps = CfnLoadBalancerProps.builder() .instancePort(123) .loadBalancerName("loadBalancerName") // the properties below are optional .attachedInstances(List.of("attachedInstances")) .healthCheckPath("healthCheckPath") .ipAddressType("ipAddressType") .sessionStickinessEnabled(false) .sessionStickinessLbCookieDurationSeconds("sessionStickinessLbCookieDurationSeconds") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .tlsPolicyName("tlsPolicyName") .build();
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forCfnLoadBalancerProps
static final class
An implementation forCfnLoadBalancerProps
-
Method Summary
Modifier and TypeMethodDescriptionstatic CfnLoadBalancerProps.Builder
builder()
The Lightsail instances to attach to the load balancer.default String
The path on the attached instance where the health check will be performed.The port that the load balancer uses to direct traffic to your Lightsail instances.default String
The IP address type of the load balancer.The name of the load balancer.default Object
A Boolean value indicating whether session stickiness is enabled.default String
The time period, in seconds, after which the load balancer session stickiness cookie should be considered stale.getTags()
An array of key-value pairs to apply to this resource.default String
The name of the TLS security policy for the load balancer.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getInstancePort
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
.- See Also:
-
getLoadBalancerName
The name of the load balancer.- See Also:
-
getAttachedInstances
The Lightsail instances to attach to the load balancer.- See Also:
-
getHealthCheckPath
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
).- See Also:
-
getIpAddressType
The IP address type of the load balancer.The possible values are
ipv4
for IPv4 only, anddualstack
for both IPv4 and IPv6.- See Also:
-
getSessionStickinessEnabled
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.
- See Also:
-
getSessionStickinessLbCookieDurationSeconds
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.
- See Also:
-
getTags
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.- See Also:
-
getTlsPolicyName
The name of the TLS security policy for the load balancer.- See Also:
-
builder
- Returns:
- a
CfnLoadBalancerProps.Builder
ofCfnLoadBalancerProps
-