Class CfnLoadBalancer
A CloudFormation AWS::Lightsail::LoadBalancer
.
Inherited Members
Namespace: Amazon.CDK.AWS.Lightsail
Assembly: Amazon.CDK.AWS.Lightsail.dll
Syntax (csharp)
public class CfnLoadBalancer : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnLoadBalancer
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
The AWS::Lightsail::LoadBalancer
resource specifies a load balancer that can be used with Lightsail instances.
You cannot attach a TLS certificate to a load balancer using the AWS::Lightsail::LoadBalancer
resource type. Instead, use the AWS::Lightsail::LoadBalancerTlsCertificate
resource type to create a certificate and attach it to a load balancer.
CloudformationResource: AWS::Lightsail::LoadBalancer
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 cfnLoadBalancer = new CfnLoadBalancer(this, "MyCfnLoadBalancer", 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
CfnLoadBalancer(Construct, String, ICfnLoadBalancerProps) | Create a new |
CfnLoadBalancer(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnLoadBalancer(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AttachedInstances | The Lightsail instances to attach to the load balancer. |
AttrLoadBalancerArn | The Amazon Resource Name (ARN) of the load balancer. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
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. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnLoadBalancer(Construct, String, ICfnLoadBalancerProps)
Create a new AWS::Lightsail::LoadBalancer
.
public CfnLoadBalancer(Construct scope, string id, ICfnLoadBalancerProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnLoadBalancerProps
- resource properties.
CfnLoadBalancer(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnLoadBalancer(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnLoadBalancer(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnLoadBalancer(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AttachedInstances
The Lightsail instances to attach to the load balancer.
public virtual string[] AttachedInstances { get; set; }
Property Value
System.String[]
Remarks
AttrLoadBalancerArn
The Amazon Resource Name (ARN) of the load balancer.
public virtual string AttrLoadBalancerArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: LoadBalancerArn
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
HealthCheckPath
The path on the attached instance where the health check will be performed.
public virtual 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 virtual 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 virtual 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 virtual string LoadBalancerName { get; set; }
Property Value
System.String
Remarks
SessionStickinessEnabled
A Boolean value indicating whether session stickiness is enabled.
public virtual 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 virtual 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 virtual TagManager Tags { get; }
Property Value
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 virtual string TlsPolicyName { get; set; }
Property Value
System.String
Remarks
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>