Class CfnLoadBalancer
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.lightsail.CfnLoadBalancer
- All Implemented Interfaces:
IInspectable
,ITaggable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.106.0 (build e852934)",
date="2025-02-05T22:42:06.736Z")
@Stability(Stable)
public class CfnLoadBalancer
extends CfnResource
implements IInspectable, ITaggable
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 theAWS::Lightsail::LoadBalancerTlsCertificate
resource type to create a certificate and attach it to a load balancer.
Example:
// 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.*; CfnLoadBalancer cfnLoadBalancer = CfnLoadBalancer.Builder.create(this, "MyCfnLoadBalancer") .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();
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CfnLoadBalancer
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnLoadBalancer
(software.amazon.jsii.JsiiObjectRef objRef) CfnLoadBalancer
(software.constructs.Construct scope, String id, CfnLoadBalancerProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe Lightsail instances to attach to the load balancer.The Amazon Resource Name (ARN) of the load balancer.The path on the attached instance where the health check will be performed.The port that the load balancer uses to direct traffic to your Lightsail instances.The IP address type of the load balancer.The name of the load balancer.A Boolean value indicating whether session stickiness is enabled.The time period, in seconds, after which the load balancer session stickiness cookie should be considered stale.getTags()
Tag Manager which manages the tags for this resource.An array of key-value pairs to apply to this resource.The name of the TLS security policy for the load balancer.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setAttachedInstances
(List<String> value) The Lightsail instances to attach to the load balancer.void
setHealthCheckPath
(String value) The path on the attached instance where the health check will be performed.void
setInstancePort
(Number value) The port that the load balancer uses to direct traffic to your Lightsail instances.void
setIpAddressType
(String value) The IP address type of the load balancer.void
setLoadBalancerName
(String value) The name of the load balancer.void
A Boolean value indicating whether session stickiness is enabled.void
A Boolean value indicating whether session stickiness is enabled.void
The time period, in seconds, after which the load balancer session stickiness cookie should be considered stale.void
setTagsRaw
(List<CfnTag> value) An array of key-value pairs to apply to this resource.void
setTlsPolicyName
(String value) The name of the TLS security policy for the load balancer.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnLoadBalancer
protected CfnLoadBalancer(software.amazon.jsii.JsiiObjectRef objRef) -
CfnLoadBalancer
protected CfnLoadBalancer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnLoadBalancer
@Stability(Stable) public CfnLoadBalancer(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnLoadBalancerProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrLoadBalancerArn
The Amazon Resource Name (ARN) of the load balancer. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getInstancePort
The port that the load balancer uses to direct traffic to your Lightsail instances. -
setInstancePort
The port that the load balancer uses to direct traffic to your Lightsail instances. -
getLoadBalancerName
The name of the load balancer. -
setLoadBalancerName
The name of the load balancer. -
getAttachedInstances
The Lightsail instances to attach to the load balancer. -
setAttachedInstances
The Lightsail instances to attach to the load balancer. -
getHealthCheckPath
The path on the attached instance where the health check will be performed. -
setHealthCheckPath
The path on the attached instance where the health check will be performed. -
getIpAddressType
The IP address type of the load balancer. -
setIpAddressType
The IP address type of the load balancer. -
getSessionStickinessEnabled
A Boolean value indicating whether session stickiness is enabled. -
setSessionStickinessEnabled
A Boolean value indicating whether session stickiness is enabled. -
setSessionStickinessEnabled
A Boolean value indicating whether session stickiness is enabled. -
getSessionStickinessLbCookieDurationSeconds
The time period, in seconds, after which the load balancer session stickiness cookie should be considered stale. -
setSessionStickinessLbCookieDurationSeconds
The time period, in seconds, after which the load balancer session stickiness cookie should be considered stale. -
getTagsRaw
An array of key-value pairs to apply to this resource. -
setTagsRaw
An array of key-value pairs to apply to this resource. -
getTlsPolicyName
The name of the TLS security policy for the load balancer. -
setTlsPolicyName
The name of the TLS security policy for the load balancer.
-