CfnLoadBalancerProps Struct
Properties for defining a CfnLoadBalancer.
| Source | |
|---|---|
| Type last changed |
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',
};
from aws_cdk import CfnTag
# 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"
)
// 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();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lightsail;
var cfnLoadBalancerProps = new CfnLoadBalancerProps {
InstancePort = 123,
LoadBalancerName = "loadBalancerName",
// the properties below are optional
AttachedInstances = new [] { "attachedInstances" },
HealthCheckPath = "healthCheckPath",
IpAddressType = "ipAddressType",
SessionStickinessEnabled = false,
SessionStickinessLbCookieDurationSeconds = "sessionStickinessLbCookieDurationSeconds",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
TlsPolicyName = "tlsPolicyName"
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnLoadBalancerProps := &CfnLoadBalancerProps{
InstancePort: jsii.Number(123),
LoadBalancerName: jsii.String("loadBalancerName"),
// the properties below are optional
AttachedInstances: []*string{
jsii.String("attachedInstances"),
},
HealthCheckPath: jsii.String("healthCheckPath"),
IpAddressType: jsii.String("ipAddressType"),
SessionStickinessEnabled: jsii.Boolean(false),
SessionStickinessLbCookieDurationSeconds: jsii.String("sessionStickinessLbCookieDurationSeconds"),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
TlsPolicyName: jsii.String("tlsPolicyName"),
}
Properties
attachedInstancesoptionalstring[]attached_instancesoptionaltyping.List[str]attachedInstancesoptionalList<String>AttachedInstancesoptionalstring[]AttachedInstancesoptional*[]*string #healthCheckPathoptionalstringhealth_check_pathoptionalstrhealthCheckPathoptionalStringHealthCheckPathoptionalstringHealthCheckPathoptional*string #If no path is specified, the load balancer tries to make a request to the default (root) page ( /index.html ).
instancePortnumberinstance_portint | floatinstancePortNumberInstancePortdoubleInstancePort*float64 required #For HTTP traffic, specify port 80 . For HTTPS traffic, specify port 443 .
ipAddressTypeoptionalstringip_address_typeoptionalstripAddressTypeoptionalStringIpAddressTypeoptionalstringIpAddressTypeoptional*string #The possible values are ipv4 for IPv4 only, and dualstack for both IPv4 and IPv6.
loadBalancerNamestringload_balancer_namestrloadBalancerNameStringLoadBalancerNamestringLoadBalancerName*string required #sessionStickinessEnabledoptionalboolean | IResolvablesession_stickiness_enabledoptionaltyping.Union[bool, IResolvable]sessionStickinessEnabledoptionalBooleanSessionStickinessEnabledoptionalboolSessionStickinessEnabledoptionalinterface{} #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.
sessionStickinessLbCookieDurationSecondsoptionalstringsession_stickiness_lb_cookie_duration_secondsoptionalstrsessionStickinessLbCookieDurationSecondsoptionalStringSessionStickinessLbCookieDurationSecondsoptionalstringSessionStickinessLbCookieDurationSecondsoptional*string #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.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #For more information, see Tag in the AWS CloudFormation User Guide .
The
ValueofTagsis optional for Lightsail resources.
tlsPolicyNameoptionalstringtls_policy_nameoptionalstrtlsPolicyNameoptionalStringTlsPolicyNameoptionalstringTlsPolicyNameoptional*string #