Class CfnContainer.HealthCheckConfigProperty.Builder
java.lang.Object
software.amazon.awscdk.services.lightsail.CfnContainer.HealthCheckConfigProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnContainer.HealthCheckConfigProperty>
- Enclosing interface:
CfnContainer.HealthCheckConfigProperty
@Stability(Stable)
public static final class CfnContainer.HealthCheckConfigProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnContainer.HealthCheckConfigProperty>
A builder for
CfnContainer.HealthCheckConfigProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.healthyThreshold(Number healthyThreshold) Sets the value ofCfnContainer.HealthCheckConfigProperty.getHealthyThreshold()intervalSeconds(Number intervalSeconds) Sets the value ofCfnContainer.HealthCheckConfigProperty.getIntervalSeconds()Sets the value ofCfnContainer.HealthCheckConfigProperty.getPath()successCodes(String successCodes) Sets the value ofCfnContainer.HealthCheckConfigProperty.getSuccessCodes()timeoutSeconds(Number timeoutSeconds) Sets the value ofCfnContainer.HealthCheckConfigProperty.getTimeoutSeconds()unhealthyThreshold(Number unhealthyThreshold) Sets the value ofCfnContainer.HealthCheckConfigProperty.getUnhealthyThreshold()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
healthyThreshold
@Stability(Stable) public CfnContainer.HealthCheckConfigProperty.Builder healthyThreshold(Number healthyThreshold) Sets the value ofCfnContainer.HealthCheckConfigProperty.getHealthyThreshold()- Parameters:
healthyThreshold- The number of consecutive health check successes required before moving the container to theHealthystate. The default value is2.- Returns:
this
-
intervalSeconds
@Stability(Stable) public CfnContainer.HealthCheckConfigProperty.Builder intervalSeconds(Number intervalSeconds) Sets the value ofCfnContainer.HealthCheckConfigProperty.getIntervalSeconds()- Parameters:
intervalSeconds- The approximate interval, in seconds, between health checks of an individual container. You can specify between5and300seconds. The default value is5.- Returns:
this
-
path
Sets the value ofCfnContainer.HealthCheckConfigProperty.getPath()- Parameters:
path- The path on the container on which to perform the health check. The default value is/.- Returns:
this
-
successCodes
@Stability(Stable) public CfnContainer.HealthCheckConfigProperty.Builder successCodes(String successCodes) Sets the value ofCfnContainer.HealthCheckConfigProperty.getSuccessCodes()- Parameters:
successCodes- The HTTP codes to use when checking for a successful response from a container. You can specify values between200and499. You can specify multiple values (for example,200,202) or a range of values (for example,200-299).- Returns:
this
-
timeoutSeconds
@Stability(Stable) public CfnContainer.HealthCheckConfigProperty.Builder timeoutSeconds(Number timeoutSeconds) Sets the value ofCfnContainer.HealthCheckConfigProperty.getTimeoutSeconds()- Parameters:
timeoutSeconds- The amount of time, in seconds, during which no response means a failed health check. You can specify between2and60seconds. The default value is2.- Returns:
this
-
unhealthyThreshold
@Stability(Stable) public CfnContainer.HealthCheckConfigProperty.Builder unhealthyThreshold(Number unhealthyThreshold) Sets the value ofCfnContainer.HealthCheckConfigProperty.getUnhealthyThreshold()- Parameters:
unhealthyThreshold- The number of consecutive health check failures required before moving the container to theUnhealthystate. The default value is2.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnContainer.HealthCheckConfigProperty>- Returns:
- a new instance of
CfnContainer.HealthCheckConfigProperty - Throws:
NullPointerException- if any required attribute was not provided
-