Class HealthCheck.Builder
java.lang.Object
software.amazon.awscdk.services.elasticloadbalancing.HealthCheck.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<HealthCheck>
- Enclosing interface:
HealthCheck
@Stability(Stable)
public static final class HealthCheck.Builder
extends Object
implements software.amazon.jsii.Builder<HealthCheck>
A builder for
HealthCheck-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.healthyThreshold(Number healthyThreshold) Sets the value ofHealthCheck.getHealthyThreshold()Sets the value ofHealthCheck.getInterval()Sets the value ofHealthCheck.getPath()Sets the value ofHealthCheck.getPort()protocol(LoadBalancingProtocol protocol) Sets the value ofHealthCheck.getProtocol()Sets the value ofHealthCheck.getTimeout()unhealthyThreshold(Number unhealthyThreshold) Sets the value ofHealthCheck.getUnhealthyThreshold()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
port
Sets the value ofHealthCheck.getPort()- Parameters:
port- What port number to health check on. This parameter is required.- Returns:
this
-
healthyThreshold
Sets the value ofHealthCheck.getHealthyThreshold()- Parameters:
healthyThreshold- After how many successful checks is an instance considered healthy.- Returns:
this
-
interval
Sets the value ofHealthCheck.getInterval()- Parameters:
interval- Number of seconds between health checks.- Returns:
this
-
path
Sets the value ofHealthCheck.getPath()- Parameters:
path- What path to use for HTTP or HTTPS health check (must return 200). For SSL and TCP health checks, accepting connections is enough to be considered healthy.- Returns:
this
-
protocol
Sets the value ofHealthCheck.getProtocol()- Parameters:
protocol- What protocol to use for health checking. The protocol is automatically determined from the port if it's not supplied.- Returns:
this
-
timeout
Sets the value ofHealthCheck.getTimeout()- Parameters:
timeout- Health check timeout.- Returns:
this
-
unhealthyThreshold
Sets the value ofHealthCheck.getUnhealthyThreshold()- Parameters:
unhealthyThreshold- After how many unsuccessful checks is an instance considered unhealthy.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<HealthCheck>- Returns:
- a new instance of
HealthCheck - Throws:
NullPointerException- if any required attribute was not provided
-