@Stability(value=Experimental) public static final class HealthCheck.Builder extends Object implements software.amazon.jsii.Builder<HealthCheck>
HealthCheck| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
HealthCheck |
build()
Builds the configured instance.
|
HealthCheck.Builder |
command(List<String> command)
Sets the value of
HealthCheck.getCommand() |
HealthCheck.Builder |
interval(Duration interval)
Sets the value of
HealthCheck.getInterval() |
HealthCheck.Builder |
retries(Number retries)
Sets the value of
HealthCheck.getRetries() |
HealthCheck.Builder |
startPeriod(Duration startPeriod)
Sets the value of
HealthCheck.getStartPeriod() |
HealthCheck.Builder |
timeout(Duration timeout)
Sets the value of
HealthCheck.getTimeout() |
@Stability(value=Experimental) public HealthCheck.Builder command(List<String> command)
HealthCheck.getCommand()command - A string array representing the command that the container runs to determine if it is healthy. This parameter is required.
The string array must start with CMD to execute the command arguments directly, or
CMD-SHELL to run the command with the container's default shell.
For example: [ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ]
this@Stability(value=Experimental) public HealthCheck.Builder interval(Duration interval)
HealthCheck.getInterval()interval - The time period in seconds between each health check execution.
You may specify between 5 and 300 seconds.this@Stability(value=Experimental) public HealthCheck.Builder retries(Number retries)
HealthCheck.getRetries()retries - The number of times to retry a failed health check before the container is considered unhealthy.
You may specify between 1 and 10 retries.this@Stability(value=Experimental) public HealthCheck.Builder startPeriod(Duration startPeriod)
HealthCheck.getStartPeriod()startPeriod - The optional grace period within which to provide containers time to bootstrap before failed health checks count towards the maximum number of retries.
You may specify between 0 and 300 seconds.this@Stability(value=Experimental) public HealthCheck.Builder timeout(Duration timeout)
HealthCheck.getTimeout()timeout - The time period in seconds to wait for a health check to succeed before it is considered a failure.
You may specify between 2 and 60 seconds.this@Stability(value=Experimental) public HealthCheck build()
build in interface software.amazon.jsii.Builder<HealthCheck>HealthCheckNullPointerException - if any required attribute was not providedCopyright © 2021. All rights reserved.