CfnLoadBalancerProps
- class aws_cdk.aws_lightsail.CfnLoadBalancerProps(*, instance_port, load_balancer_name, attached_instances=None, health_check_path=None, ip_address_type=None, session_stickiness_enabled=None, session_stickiness_lb_cookie_duration_seconds=None, tags=None, tls_policy_name=None)
Bases:
object
Properties for defining a
CfnLoadBalancer
.- Parameters:
instance_port (
Union
[int
,float
]) – The port that the load balancer uses to direct traffic to your Lightsail instances. For HTTP traffic, specify port80
. For HTTPS traffic, specify port443
.load_balancer_name (
str
) – The name of the load balancer.attached_instances (
Optional
[Sequence
[str
]]) – The Lightsail instances to attach to the load balancer.health_check_path (
Optional
[str
]) – 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
).ip_address_type (
Optional
[str
]) – The IP address type of the load balancer. The possible values areipv4
for IPv4 only, anddualstack
for both IPv4 and IPv6.session_stickiness_enabled (
Union
[bool
,IResolvable
,None
]) – 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.session_stickiness_lb_cookie_duration_seconds (
Optional
[str
]) – 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.tags (
Optional
[Sequence
[Union
[CfnTag
,Dict
[str
,Any
]]]]) – An array of key-value pairs to apply to this resource. For more information, see Tag in the AWS CloudFormation User Guide . .. epigraph:: TheValue
ofTags
is optional for Lightsail resources.tls_policy_name (
Optional
[str
]) – The name of the TLS security policy for the load balancer.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_lightsail as lightsail cfn_load_balancer_props = lightsail.CfnLoadBalancerProps( instance_port=123, load_balancer_name="loadBalancerName", # the properties below are optional attached_instances=["attachedInstances"], health_check_path="healthCheckPath", ip_address_type="ipAddressType", session_stickiness_enabled=False, session_stickiness_lb_cookie_duration_seconds="sessionStickinessLbCookieDurationSeconds", tags=[CfnTag( key="key", value="value" )], tls_policy_name="tlsPolicyName" )
Attributes
- attached_instances
The Lightsail instances to attach to the load balancer.
- health_check_path
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
).
- instance_port
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
.
- ip_address_type
The IP address type of the load balancer.
The possible values are
ipv4
for IPv4 only, anddualstack
for both IPv4 and IPv6.
- load_balancer_name
The name of the load balancer.
- session_stickiness_enabled
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.
- session_stickiness_lb_cookie_duration_seconds
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.
- tags
An array of key-value pairs to apply to this resource.
For more information, see Tag in the AWS CloudFormation User Guide . .. epigraph:
The ``Value`` of ``Tags`` is optional for Lightsail resources.
- tls_policy_name
The name of the TLS security policy for the load balancer.