Interface CfnLoadBalancerProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnLoadBalancerProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:59.768Z") @Stability(Stable) public interface CfnLoadBalancerProps extends software.amazon.jsii.JsiiSerializable
Properties for defining a 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();
 
  • Method Details

    • getInstancePort

      @Stability(Stable) @NotNull Number 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 port 443 .

    • getLoadBalancerName

      @Stability(Stable) @NotNull String getLoadBalancerName()
      The name of the load balancer.
    • getAttachedInstances

      @Stability(Stable) @Nullable default List<String> getAttachedInstances()
      The Lightsail instances to attach to the load balancer.
    • getHealthCheckPath

      @Stability(Stable) @Nullable default String 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 ).

    • getIpAddressType

      @Stability(Stable) @Nullable default String getIpAddressType()
      The IP address type of the load balancer.

      The possible values are ipv4 for IPv4 only, and dualstack for both IPv4 and IPv6.

    • getSessionStickinessEnabled

      @Stability(Stable) @Nullable default Object 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.

    • getSessionStickinessLbCookieDurationSeconds

      @Stability(Stable) @Nullable default String 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.

    • getTags

      @Stability(Stable) @Nullable default List<CfnTag> 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 of Tags is optional for Lightsail resources.

    • getTlsPolicyName

      @Stability(Stable) @Nullable default String getTlsPolicyName()
      The name of the TLS security policy for the load balancer.
    • builder

      @Stability(Stable) static CfnLoadBalancerProps.Builder builder()
      Returns:
      a CfnLoadBalancerProps.Builder of CfnLoadBalancerProps