Class LoadBalancer
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<LoadBalancer.Builder,
LoadBalancer>
Describes a load balancer.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal String
arn()
The Amazon Resource Name (ARN) of the load balancer.static LoadBalancer.Builder
builder()
final Map
<LoadBalancerAttributeName, String> A string to string map of the configuration options for your load balancer.A string to string map of the configuration options for your load balancer.final Instant
The date when your load balancer was created.final String
dnsName()
The DNS name of your Lightsail load balancer.final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final boolean
For responses, this returns true if the service returned a value for the ConfigurationOptions property.final int
hashCode()
final boolean
For responses, this returns true if the service returned a value for the InstanceHealthSummary property.final boolean
For responses, this returns true if the service returned a value for the PublicPorts property.final boolean
hasTags()
For responses, this returns true if the service returned a value for the Tags property.final boolean
For responses, this returns true if the service returned a value for the TlsCertificateSummaries property.final String
The path you specified to perform your health checks.final Boolean
A Boolean value that indicates whether HTTPS redirection is enabled for the load balancer.final List
<InstanceHealthSummary> An array of InstanceHealthSummary objects describing the health of the load balancer.final Integer
The port where the load balancer will direct traffic to your Lightsail instances.final IpAddressType
The IP address type of the load balancer.final String
The IP address type of the load balancer.final ResourceLocation
location()
The AWS Region where your load balancer was created (e.g.,us-east-2a
).final String
name()
The name of the load balancer (e.g.,my-load-balancer
).final LoadBalancerProtocol
protocol()
The protocol you have enabled for your load balancer.final String
The protocol you have enabled for your load balancer.An array of public port settings for your load balancer.final ResourceType
The resource type (e.g.,LoadBalancer
.final String
The resource type (e.g.,LoadBalancer
.static Class
<? extends LoadBalancer.Builder> final LoadBalancerState
state()
The status of your load balancer.final String
The status of your load balancer.final String
The support code.tags()
The tag keys and optional values for the resource.An array of LoadBalancerTlsCertificateSummary objects that provide additional information about the SSL/TLS certificates.final String
The name of the TLS security policy for the load balancer.Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
name
The name of the load balancer (e.g.,
my-load-balancer
).- Returns:
- The name of the load balancer (e.g.,
my-load-balancer
).
-
arn
The Amazon Resource Name (ARN) of the load balancer.
- Returns:
- The Amazon Resource Name (ARN) of the load balancer.
-
supportCode
The support code. Include this code in your email to support when you have questions about your Lightsail load balancer. This code enables our support team to look up your Lightsail information more easily.
- Returns:
- The support code. Include this code in your email to support when you have questions about your Lightsail load balancer. This code enables our support team to look up your Lightsail information more easily.
-
createdAt
The date when your load balancer was created.
- Returns:
- The date when your load balancer was created.
-
location
The AWS Region where your load balancer was created (e.g.,
us-east-2a
). Lightsail automatically creates your load balancer across Availability Zones.- Returns:
- The AWS Region where your load balancer was created (e.g.,
us-east-2a
). Lightsail automatically creates your load balancer across Availability Zones.
-
resourceType
The resource type (e.g.,
LoadBalancer
.If the service returns an enum value that is not available in the current SDK version,
resourceType
will returnResourceType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromresourceTypeAsString()
.- Returns:
- The resource type (e.g.,
LoadBalancer
. - See Also:
-
resourceTypeAsString
The resource type (e.g.,
LoadBalancer
.If the service returns an enum value that is not available in the current SDK version,
resourceType
will returnResourceType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromresourceTypeAsString()
.- Returns:
- The resource type (e.g.,
LoadBalancer
. - See Also:
-
hasTags
public final boolean hasTags()For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
tags
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTags()
method.- Returns:
- The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.
-
dnsName
The DNS name of your Lightsail load balancer.
- Returns:
- The DNS name of your Lightsail load balancer.
-
state
The status of your load balancer. Valid values are below.
If the service returns an enum value that is not available in the current SDK version,
state
will returnLoadBalancerState.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromstateAsString()
.- Returns:
- The status of your load balancer. Valid values are below.
- See Also:
-
stateAsString
The status of your load balancer. Valid values are below.
If the service returns an enum value that is not available in the current SDK version,
state
will returnLoadBalancerState.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromstateAsString()
.- Returns:
- The status of your load balancer. Valid values are below.
- See Also:
-
protocol
The protocol you have enabled for your load balancer. Valid values are below.
You can't just have
HTTP_HTTPS
, but you can have justHTTP
.If the service returns an enum value that is not available in the current SDK version,
protocol
will returnLoadBalancerProtocol.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromprotocolAsString()
.- Returns:
- The protocol you have enabled for your load balancer. Valid values are below.
You can't just have
HTTP_HTTPS
, but you can have justHTTP
. - See Also:
-
protocolAsString
The protocol you have enabled for your load balancer. Valid values are below.
You can't just have
HTTP_HTTPS
, but you can have justHTTP
.If the service returns an enum value that is not available in the current SDK version,
protocol
will returnLoadBalancerProtocol.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromprotocolAsString()
.- Returns:
- The protocol you have enabled for your load balancer. Valid values are below.
You can't just have
HTTP_HTTPS
, but you can have justHTTP
. - See Also:
-
hasPublicPorts
public final boolean hasPublicPorts()For responses, this returns true if the service returned a value for the PublicPorts property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
publicPorts
An array of public port settings for your load balancer. For HTTP, use port 80. For HTTPS, use port 443.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasPublicPorts()
method.- Returns:
- An array of public port settings for your load balancer. For HTTP, use port 80. For HTTPS, use port 443.
-
healthCheckPath
The path you specified to perform your health checks. If no path is specified, the load balancer tries to make a request to the default (root) page.
- Returns:
- The path you specified to perform your health checks. If no path is specified, the load balancer tries to make a request to the default (root) page.
-
instancePort
The port where the load balancer will direct traffic to your Lightsail instances. For HTTP traffic, it's port 80. For HTTPS traffic, it's port 443.
- Returns:
- The port where the load balancer will direct traffic to your Lightsail instances. For HTTP traffic, it's port 80. For HTTPS traffic, it's port 443.
-
hasInstanceHealthSummary
public final boolean hasInstanceHealthSummary()For responses, this returns true if the service returned a value for the InstanceHealthSummary property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
instanceHealthSummary
An array of InstanceHealthSummary objects describing the health of the load balancer.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasInstanceHealthSummary()
method.- Returns:
- An array of InstanceHealthSummary objects describing the health of the load balancer.
-
hasTlsCertificateSummaries
public final boolean hasTlsCertificateSummaries()For responses, this returns true if the service returned a value for the TlsCertificateSummaries property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
tlsCertificateSummaries
An array of LoadBalancerTlsCertificateSummary objects that provide additional information about the SSL/TLS certificates. For example, if
true
, the certificate is attached to the load balancer.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTlsCertificateSummaries()
method.- Returns:
- An array of LoadBalancerTlsCertificateSummary objects that provide additional information about the
SSL/TLS certificates. For example, if
true
, the certificate is attached to the load balancer.
-
configurationOptions
A string to string map of the configuration options for your load balancer. Valid values are listed below.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasConfigurationOptions()
method.- Returns:
- A string to string map of the configuration options for your load balancer. Valid values are listed below.
-
hasConfigurationOptions
public final boolean hasConfigurationOptions()For responses, this returns true if the service returned a value for the ConfigurationOptions property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
configurationOptionsAsStrings
A string to string map of the configuration options for your load balancer. Valid values are listed below.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasConfigurationOptions()
method.- Returns:
- A string to string map of the configuration options for your load balancer. Valid values are listed below.
-
ipAddressType
The IP address type of the load balancer.
The possible values are
ipv4
for IPv4 only, anddualstack
for IPv4 and IPv6.If the service returns an enum value that is not available in the current SDK version,
ipAddressType
will returnIpAddressType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromipAddressTypeAsString()
.- Returns:
- The IP address type of the load balancer.
The possible values are
ipv4
for IPv4 only, anddualstack
for IPv4 and IPv6. - See Also:
-
ipAddressTypeAsString
The IP address type of the load balancer.
The possible values are
ipv4
for IPv4 only, anddualstack
for IPv4 and IPv6.If the service returns an enum value that is not available in the current SDK version,
ipAddressType
will returnIpAddressType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromipAddressTypeAsString()
.- Returns:
- The IP address type of the load balancer.
The possible values are
ipv4
for IPv4 only, anddualstack
for IPv4 and IPv6. - See Also:
-
httpsRedirectionEnabled
A Boolean value that indicates whether HTTPS redirection is enabled for the load balancer.
- Returns:
- A Boolean value that indicates whether HTTPS redirection is enabled for the load balancer.
-
tlsPolicyName
The name of the TLS security policy for the load balancer.
- Returns:
- The name of the TLS security policy for the load balancer.
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<LoadBalancer.Builder,
LoadBalancer> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value. -
getValueForField
-
sdkFields
-