Class CfnContainerGroupDefinition.ContainerHealthCheckProperty.Builder
java.lang.Object
software.amazon.awscdk.services.gamelift.CfnContainerGroupDefinition.ContainerHealthCheckProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnContainerGroupDefinition.ContainerHealthCheckProperty>
- Enclosing interface:
CfnContainerGroupDefinition.ContainerHealthCheckProperty
@Stability(Stable)
public static final class CfnContainerGroupDefinition.ContainerHealthCheckProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnContainerGroupDefinition.ContainerHealthCheckProperty>
A builder for
CfnContainerGroupDefinition.ContainerHealthCheckProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnContainerGroupDefinition.ContainerHealthCheckProperty.getCommand()Sets the value ofCfnContainerGroupDefinition.ContainerHealthCheckProperty.getInterval()Sets the value ofCfnContainerGroupDefinition.ContainerHealthCheckProperty.getRetries()startPeriod(Number startPeriod) Sets the value ofCfnContainerGroupDefinition.ContainerHealthCheckProperty.getTimeout()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
command
@Stability(Stable) public CfnContainerGroupDefinition.ContainerHealthCheckProperty.Builder command(List<String> command) Sets the value ofCfnContainerGroupDefinition.ContainerHealthCheckProperty.getCommand()- Parameters:
command- A string array that specifies the command that the container runs to determine if it's healthy. This parameter is required.- Returns:
this
-
interval
@Stability(Stable) public CfnContainerGroupDefinition.ContainerHealthCheckProperty.Builder interval(Number interval) Sets the value ofCfnContainerGroupDefinition.ContainerHealthCheckProperty.getInterval()- Parameters:
interval- The time period (in seconds) between each health check.- Returns:
this
-
retries
@Stability(Stable) public CfnContainerGroupDefinition.ContainerHealthCheckProperty.Builder retries(Number retries) Sets the value ofCfnContainerGroupDefinition.ContainerHealthCheckProperty.getRetries()- Parameters:
retries- The number of times to retry a failed health check before flagging the container unhealthy. The first run of the command does not count as a retry.- Returns:
this
-
startPeriod
@Stability(Stable) public CfnContainerGroupDefinition.ContainerHealthCheckProperty.Builder startPeriod(Number startPeriod) - Parameters:
startPeriod- The optional grace period (in seconds) to give a container time to bootstrap before the first failed health check counts toward the number of retries.- Returns:
this
-
timeout
@Stability(Stable) public CfnContainerGroupDefinition.ContainerHealthCheckProperty.Builder timeout(Number timeout) Sets the value ofCfnContainerGroupDefinition.ContainerHealthCheckProperty.getTimeout()- Parameters:
timeout- The time period (in seconds) to wait for a health check to succeed before counting a failed health check.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnContainerGroupDefinition.ContainerHealthCheckProperty>- Returns:
- a new instance of
CfnContainerGroupDefinition.ContainerHealthCheckProperty - Throws:
NullPointerException- if any required attribute was not provided
-