Class CfnLoadBalancer
The AWS::Lightsail::LoadBalancer resource specifies a load balancer that can be used with Lightsail instances.
Inherited Members
Namespace: Amazon.CDK.AWS.Lightsail
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnLoadBalancer : CfnResource, IInspectable, ILoadBalancerRef, IConstruct, IDependable, IEnvironmentAware, ITaggable
Syntax (vb)
Public Class CfnLoadBalancer Inherits CfnResource Implements IInspectable, ILoadBalancerRef, IConstruct, IDependable, IEnvironmentAware, ITaggable
Remarks
You cannot attach a TLS certificate to a load balancer using the <code>AWS::Lightsail::LoadBalancer</code> resource type. Instead, use the <code>AWS::Lightsail::LoadBalancerTlsCertificate</code> 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 |
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 | The |
| 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. |
| LoadBalancerRef | A reference to a LoadBalancer resource. |
| 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 | Tag Manager which manages the tags for this resource. |
| TagsRaw | An array of key-value pairs to apply to this resource. |
| TlsPolicyName | The name of the TLS security policy for the load balancer. |
Methods
| ArnForLoadBalancer(ILoadBalancerRef) | The |
| Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
| IsCfnLoadBalancer(object) | Checks whether the given object is a CfnLoadBalancer. |
| RenderProperties(IDictionary<string, object>) | The |
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 string
Construct identifier for this resource (unique in its scope).
- props ICfnLoadBalancerProps
Resource properties.
Remarks
You cannot attach a TLS certificate to a load balancer using the <code>AWS::Lightsail::LoadBalancer</code> resource type. Instead, use the <code>AWS::Lightsail::LoadBalancerTlsCertificate</code> resource type to create a certificate and attach it to a load balancer.
CloudformationResource: AWS::Lightsail::LoadBalancer
ExampleMetadata: fixture=_generated
Properties
AttachedInstances
The Lightsail instances to attach to the load balancer.
public virtual string[]? AttachedInstances { get; set; }
Property Value
string[]
Remarks
You cannot attach a TLS certificate to a load balancer using the <code>AWS::Lightsail::LoadBalancer</code> resource type. Instead, use the <code>AWS::Lightsail::LoadBalancerTlsCertificate</code> resource type to create a certificate and attach it to a load balancer.
CloudformationResource: AWS::Lightsail::LoadBalancer
ExampleMetadata: fixture=_generated
AttrLoadBalancerArn
The Amazon Resource Name (ARN) of the load balancer.
public virtual string AttrLoadBalancerArn { get; }
Property Value
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
Remarks
You cannot attach a TLS certificate to a load balancer using the <code>AWS::Lightsail::LoadBalancer</code> resource type. Instead, use the <code>AWS::Lightsail::LoadBalancerTlsCertificate</code> resource type to create a certificate and attach it to a load balancer.
CloudformationResource: AWS::Lightsail::LoadBalancer
ExampleMetadata: fixture=_generated
CfnProperties
The AWS::Lightsail::LoadBalancer resource specifies a load balancer that can be used with Lightsail instances.
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
Overrides
Remarks
You cannot attach a TLS certificate to a load balancer using the <code>AWS::Lightsail::LoadBalancer</code> resource type. Instead, use the <code>AWS::Lightsail::LoadBalancerTlsCertificate</code> resource type to create a certificate and attach it to a load balancer.
CloudformationResource: AWS::Lightsail::LoadBalancer
ExampleMetadata: fixture=_generated
HealthCheckPath
The path on the attached instance where the health check will be performed.
public virtual string? HealthCheckPath { get; set; }
Property Value
Remarks
You cannot attach a TLS certificate to a load balancer using the <code>AWS::Lightsail::LoadBalancer</code> resource type. Instead, use the <code>AWS::Lightsail::LoadBalancerTlsCertificate</code> resource type to create a certificate and attach it to a load balancer.
CloudformationResource: AWS::Lightsail::LoadBalancer
ExampleMetadata: fixture=_generated
InstancePort
The port that the load balancer uses to direct traffic to your Lightsail instances.
public virtual double InstancePort { get; set; }
Property Value
Remarks
You cannot attach a TLS certificate to a load balancer using the <code>AWS::Lightsail::LoadBalancer</code> resource type. Instead, use the <code>AWS::Lightsail::LoadBalancerTlsCertificate</code> resource type to create a certificate and attach it to a load balancer.
CloudformationResource: AWS::Lightsail::LoadBalancer
ExampleMetadata: fixture=_generated
IpAddressType
The IP address type of the load balancer.
public virtual string? IpAddressType { get; set; }
Property Value
Remarks
You cannot attach a TLS certificate to a load balancer using the <code>AWS::Lightsail::LoadBalancer</code> resource type. Instead, use the <code>AWS::Lightsail::LoadBalancerTlsCertificate</code> resource type to create a certificate and attach it to a load balancer.
CloudformationResource: AWS::Lightsail::LoadBalancer
ExampleMetadata: fixture=_generated
LoadBalancerName
The name of the load balancer.
public virtual string LoadBalancerName { get; set; }
Property Value
Remarks
You cannot attach a TLS certificate to a load balancer using the <code>AWS::Lightsail::LoadBalancer</code> resource type. Instead, use the <code>AWS::Lightsail::LoadBalancerTlsCertificate</code> resource type to create a certificate and attach it to a load balancer.
CloudformationResource: AWS::Lightsail::LoadBalancer
ExampleMetadata: fixture=_generated
LoadBalancerRef
A reference to a LoadBalancer resource.
public virtual ILoadBalancerReference LoadBalancerRef { get; }
Property Value
Remarks
You cannot attach a TLS certificate to a load balancer using the <code>AWS::Lightsail::LoadBalancer</code> resource type. Instead, use the <code>AWS::Lightsail::LoadBalancerTlsCertificate</code> resource type to create a certificate and attach it to a load balancer.
CloudformationResource: AWS::Lightsail::LoadBalancer
ExampleMetadata: fixture=_generated
SessionStickinessEnabled
A Boolean value indicating whether session stickiness is enabled.
public virtual object? SessionStickinessEnabled { get; set; }
Property Value
Remarks
Type union: either bool or IResolvable
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
Remarks
You cannot attach a TLS certificate to a load balancer using the <code>AWS::Lightsail::LoadBalancer</code> resource type. Instead, use the <code>AWS::Lightsail::LoadBalancerTlsCertificate</code> resource type to create a certificate and attach it to a load balancer.
CloudformationResource: AWS::Lightsail::LoadBalancer
ExampleMetadata: fixture=_generated
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
Remarks
You cannot attach a TLS certificate to a load balancer using the <code>AWS::Lightsail::LoadBalancer</code> resource type. Instead, use the <code>AWS::Lightsail::LoadBalancerTlsCertificate</code> resource type to create a certificate and attach it to a load balancer.
CloudformationResource: AWS::Lightsail::LoadBalancer
ExampleMetadata: fixture=_generated
TagsRaw
An array of key-value pairs to apply to this resource.
public virtual ICfnTag[]? TagsRaw { get; set; }
Property Value
ICfnTag[]
Remarks
You cannot attach a TLS certificate to a load balancer using the <code>AWS::Lightsail::LoadBalancer</code> resource type. Instead, use the <code>AWS::Lightsail::LoadBalancerTlsCertificate</code> resource type to create a certificate and attach it to a load balancer.
CloudformationResource: AWS::Lightsail::LoadBalancer
ExampleMetadata: fixture=_generated
TlsPolicyName
The name of the TLS security policy for the load balancer.
public virtual string? TlsPolicyName { get; set; }
Property Value
Remarks
You cannot attach a TLS certificate to a load balancer using the <code>AWS::Lightsail::LoadBalancer</code> resource type. Instead, use the <code>AWS::Lightsail::LoadBalancerTlsCertificate</code> resource type to create a certificate and attach it to a load balancer.
CloudformationResource: AWS::Lightsail::LoadBalancer
ExampleMetadata: fixture=_generated
Methods
ArnForLoadBalancer(ILoadBalancerRef)
The AWS::Lightsail::LoadBalancer resource specifies a load balancer that can be used with Lightsail instances.
public static string ArnForLoadBalancer(ILoadBalancerRef resource)
Parameters
- resource ILoadBalancerRef
Returns
Remarks
You cannot attach a TLS certificate to a load balancer using the <code>AWS::Lightsail::LoadBalancer</code> resource type. Instead, use the <code>AWS::Lightsail::LoadBalancerTlsCertificate</code> 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"
});
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.
Remarks
You cannot attach a TLS certificate to a load balancer using the <code>AWS::Lightsail::LoadBalancer</code> resource type. Instead, use the <code>AWS::Lightsail::LoadBalancerTlsCertificate</code> resource type to create a certificate and attach it to a load balancer.
CloudformationResource: AWS::Lightsail::LoadBalancer
ExampleMetadata: fixture=_generated
IsCfnLoadBalancer(object)
Checks whether the given object is a CfnLoadBalancer.
public static bool IsCfnLoadBalancer(object x)
Parameters
- x object
Returns
Remarks
You cannot attach a TLS certificate to a load balancer using the <code>AWS::Lightsail::LoadBalancer</code> resource type. Instead, use the <code>AWS::Lightsail::LoadBalancerTlsCertificate</code> resource type to create a certificate and attach it to a load balancer.
CloudformationResource: AWS::Lightsail::LoadBalancer
ExampleMetadata: fixture=_generated
RenderProperties(IDictionary<string, object>)
The AWS::Lightsail::LoadBalancer resource specifies a load balancer that can be used with Lightsail instances.
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props IDictionary<string, object>
Returns
Overrides
Remarks
You cannot attach a TLS certificate to a load balancer using the <code>AWS::Lightsail::LoadBalancer</code> resource type. Instead, use the <code>AWS::Lightsail::LoadBalancerTlsCertificate</code> resource type to create a certificate and attach it to a load balancer.
CloudformationResource: AWS::Lightsail::LoadBalancer
ExampleMetadata: fixture=_generated