Class CfnLoadBalancerProps
Properties for defining a CfnLoadBalancer
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.Lightsail
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnLoadBalancerProps : Object, ICfnLoadBalancerProps
Syntax (vb)
Public Class CfnLoadBalancerProps
Inherits Object
Implements ICfnLoadBalancerProps
Remarks
ExampleMetadata: fixture=_generated
Examples
// 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"
};
Synopsis
Constructors
CfnLoadBalancerProps() |
Properties
AttachedInstances | The Lightsail instances to attach to the load balancer. |
HealthCheckPath | The path on the attached instance where the health check will be performed. |
InstancePort | The port that the load balancer uses to direct traffic to your Lightsail instances. |
IpAddressType | The IP address type of the load balancer. |
LoadBalancerName | The name of the load balancer. |
SessionStickinessEnabled | A Boolean value indicating whether session stickiness is enabled. |
SessionStickinessLbCookieDurationSeconds | The time period, in seconds, after which the load balancer session stickiness cookie should be considered stale. |
Tags | An array of key-value pairs to apply to this resource. |
TlsPolicyName | The name of the TLS security policy for the load balancer. |
Constructors
CfnLoadBalancerProps()
public CfnLoadBalancerProps()
Properties
AttachedInstances
The Lightsail instances to attach to the load balancer.
public string[] AttachedInstances { get; set; }
Property Value
System.String[]
Remarks
HealthCheckPath
The path on the attached instance where the health check will be performed.
public string HealthCheckPath { get; set; }
Property Value
System.String
Remarks
If no path is specified, the load balancer tries to make a request to the default (root) page ( /index.html
).
InstancePort
The port that the load balancer uses to direct traffic to your Lightsail instances.
public double InstancePort { get; set; }
Property Value
System.Double
Remarks
For HTTP traffic, specify port 80
. For HTTPS traffic, specify port 443
.
IpAddressType
The IP address type of the load balancer.
public string IpAddressType { get; set; }
Property Value
System.String
Remarks
The possible values are ipv4
for IPv4 only, and dualstack
for both IPv4 and IPv6.
LoadBalancerName
The name of the load balancer.
public string LoadBalancerName { get; set; }
Property Value
System.String
Remarks
SessionStickinessEnabled
A Boolean value indicating whether session stickiness is enabled.
public object SessionStickinessEnabled { get; set; }
Property Value
System.Object
Remarks
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
The time period, in seconds, after which the load balancer session stickiness cookie should be considered stale.
public string SessionStickinessLbCookieDurationSeconds { get; set; }
Property Value
System.String
Remarks
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.
public ICfnTag[] Tags { get; set; }
Property Value
ICfnTag[]
Remarks
For more information, see Tag in the AWS CloudFormation User Guide .
The Value
of Tags
is optional for Lightsail resources.
TlsPolicyName
The name of the TLS security policy for the load balancer.
public string TlsPolicyName { get; set; }
Property Value
System.String