interface CfnLoadBalancerProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Lightsail.CfnLoadBalancerProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awslightsail#CfnLoadBalancerProps |
![]() | software.amazon.awscdk.services.lightsail.CfnLoadBalancerProps |
![]() | aws_cdk.aws_lightsail.CfnLoadBalancerProps |
![]() | aws-cdk-lib » aws_lightsail » CfnLoadBalancerProps |
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 { aws_lightsail as lightsail } from 'aws-cdk-lib';
const cfnLoadBalancerProps: lightsail.CfnLoadBalancerProps = {
instancePort: 123,
loadBalancerName: 'loadBalancerName',
// the properties below are optional
attachedInstances: ['attachedInstances'],
healthCheckPath: 'healthCheckPath',
ipAddressType: 'ipAddressType',
sessionStickinessEnabled: false,
sessionStickinessLbCookieDurationSeconds: 'sessionStickinessLbCookieDurationSeconds',
tags: [{
key: 'key',
value: 'value',
}],
tlsPolicyName: 'tlsPolicyName',
};
Properties
Name | Type | Description |
---|---|---|
instance | number | The port that the load balancer uses to direct traffic to your Lightsail instances. |
load | string | The name of the load balancer. |
attached | string[] | The Lightsail instances to attach to the load balancer. |
health | string | The path on the attached instance where the health check will be performed. |
ip | string | The IP address type of the load balancer. |
session | boolean | IResolvable | A Boolean value indicating whether session stickiness is enabled. |
session | string | The time period, in seconds, after which the load balancer session stickiness cookie should be considered stale. |
tags? | Cfn [] | An array of key-value pairs to apply to this resource. |
tls | string | The name of the TLS security policy for the load balancer. |
instancePort
Type:
number
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
.
loadBalancerName
Type:
string
The name of the load balancer.
attachedInstances?
Type:
string[]
(optional)
The Lightsail instances to attach to the load balancer.
healthCheckPath?
Type:
string
(optional)
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
).
ipAddressType?
Type:
string
(optional)
The IP address type of the load balancer.
The possible values are ipv4
for IPv4 only, and dualstack
for both IPv4 and IPv6.
sessionStickinessEnabled?
Type:
boolean |
IResolvable
(optional)
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.
sessionStickinessLbCookieDurationSeconds?
Type:
string
(optional)
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?
Type:
Cfn
[]
(optional)
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.
tlsPolicyName?
Type:
string
(optional)
The name of the TLS security policy for the load balancer.