Class CfnTargetGroup.HealthCheckConfigProperty.Builder
java.lang.Object
software.amazon.awscdk.services.vpclattice.CfnTargetGroup.HealthCheckConfigProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnTargetGroup.HealthCheckConfigProperty>
- Enclosing interface:
- CfnTargetGroup.HealthCheckConfigProperty
@Stability(Stable)
public static final class CfnTargetGroup.HealthCheckConfigProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnTargetGroup.HealthCheckConfigProperty>
A builder for
CfnTargetGroup.HealthCheckConfigProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnTargetGroup.HealthCheckConfigProperty.getEnabled()enabled(IResolvable enabled) Sets the value ofCfnTargetGroup.HealthCheckConfigProperty.getEnabled()healthCheckIntervalSeconds(Number healthCheckIntervalSeconds) Sets the value ofCfnTargetGroup.HealthCheckConfigProperty.getHealthCheckIntervalSeconds()healthCheckTimeoutSeconds(Number healthCheckTimeoutSeconds) Sets the value ofCfnTargetGroup.HealthCheckConfigProperty.getHealthCheckTimeoutSeconds()healthyThresholdCount(Number healthyThresholdCount) Sets the value ofCfnTargetGroup.HealthCheckConfigProperty.getHealthyThresholdCount()matcher(IResolvable matcher) Sets the value ofCfnTargetGroup.HealthCheckConfigProperty.getMatcher()matcher(CfnTargetGroup.MatcherProperty matcher) Sets the value ofCfnTargetGroup.HealthCheckConfigProperty.getMatcher()Sets the value ofCfnTargetGroup.HealthCheckConfigProperty.getPath()Sets the value ofCfnTargetGroup.HealthCheckConfigProperty.getPort()Sets the value ofCfnTargetGroup.HealthCheckConfigProperty.getProtocol()protocolVersion(String protocolVersion) Sets the value ofCfnTargetGroup.HealthCheckConfigProperty.getProtocolVersion()unhealthyThresholdCount(Number unhealthyThresholdCount) Sets the value ofCfnTargetGroup.HealthCheckConfigProperty.getUnhealthyThresholdCount()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
enabled
Sets the value ofCfnTargetGroup.HealthCheckConfigProperty.getEnabled()- Parameters:
enabled- Indicates whether health checking is enabled.- Returns:
this
-
enabled
@Stability(Stable) public CfnTargetGroup.HealthCheckConfigProperty.Builder enabled(IResolvable enabled) Sets the value ofCfnTargetGroup.HealthCheckConfigProperty.getEnabled()- Parameters:
enabled- Indicates whether health checking is enabled.- Returns:
this
-
healthCheckIntervalSeconds
@Stability(Stable) public CfnTargetGroup.HealthCheckConfigProperty.Builder healthCheckIntervalSeconds(Number healthCheckIntervalSeconds) Sets the value ofCfnTargetGroup.HealthCheckConfigProperty.getHealthCheckIntervalSeconds()- Parameters:
healthCheckIntervalSeconds- The approximate amount of time, in seconds, between health checks of an individual target. The range is 5–300 seconds. The default is 30 seconds.- Returns:
this
-
healthCheckTimeoutSeconds
@Stability(Stable) public CfnTargetGroup.HealthCheckConfigProperty.Builder healthCheckTimeoutSeconds(Number healthCheckTimeoutSeconds) Sets the value ofCfnTargetGroup.HealthCheckConfigProperty.getHealthCheckTimeoutSeconds()- Parameters:
healthCheckTimeoutSeconds- The amount of time, in seconds, to wait before reporting a target as unhealthy. The range is 1–120 seconds. The default is 5 seconds.- Returns:
this
-
healthyThresholdCount
@Stability(Stable) public CfnTargetGroup.HealthCheckConfigProperty.Builder healthyThresholdCount(Number healthyThresholdCount) Sets the value ofCfnTargetGroup.HealthCheckConfigProperty.getHealthyThresholdCount()- Parameters:
healthyThresholdCount- The number of consecutive successful health checks required before considering an unhealthy target healthy. The range is 2–10. The default is 5.- Returns:
this
-
matcher
@Stability(Stable) public CfnTargetGroup.HealthCheckConfigProperty.Builder matcher(IResolvable matcher) Sets the value ofCfnTargetGroup.HealthCheckConfigProperty.getMatcher()- Parameters:
matcher- The codes to use when checking for a successful response from a target. These are called Success codes in the console.- Returns:
this
-
matcher
@Stability(Stable) public CfnTargetGroup.HealthCheckConfigProperty.Builder matcher(CfnTargetGroup.MatcherProperty matcher) Sets the value ofCfnTargetGroup.HealthCheckConfigProperty.getMatcher()- Parameters:
matcher- The codes to use when checking for a successful response from a target. These are called Success codes in the console.- Returns:
this
-
path
Sets the value ofCfnTargetGroup.HealthCheckConfigProperty.getPath()- Parameters:
path- The destination for health checks on the targets. If the protocol version isHTTP/1.1orHTTP/2, specify a valid URI (for example,/path?query). The default path is/. Health checks are not supported if the protocol version isgRPC, however, you can chooseHTTP/1.1orHTTP/2and specify a valid URI.- Returns:
this
-
port
Sets the value ofCfnTargetGroup.HealthCheckConfigProperty.getPort()- Parameters:
port- The port used when performing health checks on targets. The default setting is the port that a target receives traffic on.- Returns:
this
-
protocol
@Stability(Stable) public CfnTargetGroup.HealthCheckConfigProperty.Builder protocol(String protocol) Sets the value ofCfnTargetGroup.HealthCheckConfigProperty.getProtocol()- Parameters:
protocol- The protocol used when performing health checks on targets. The possible protocols areHTTPandHTTPS. The default isHTTP.- Returns:
this
-
protocolVersion
@Stability(Stable) public CfnTargetGroup.HealthCheckConfigProperty.Builder protocolVersion(String protocolVersion) Sets the value ofCfnTargetGroup.HealthCheckConfigProperty.getProtocolVersion()- Parameters:
protocolVersion- The protocol version used when performing health checks on targets. The possible protocol versions areHTTP1andHTTP2.- Returns:
this
-
unhealthyThresholdCount
@Stability(Stable) public CfnTargetGroup.HealthCheckConfigProperty.Builder unhealthyThresholdCount(Number unhealthyThresholdCount) Sets the value ofCfnTargetGroup.HealthCheckConfigProperty.getUnhealthyThresholdCount()- Parameters:
unhealthyThresholdCount- The number of consecutive failed health checks required before considering a target unhealthy. The range is 2–10. The default is 2.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnTargetGroup.HealthCheckConfigProperty>- Returns:
- a new instance of
CfnTargetGroup.HealthCheckConfigProperty - Throws:
NullPointerException- if any required attribute was not provided
-