Package org.cdk8s.plus20
Class TcpSocketProbeOptions.Builder
- java.lang.Object
-
- org.cdk8s.plus20.TcpSocketProbeOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<TcpSocketProbeOptions>
- Enclosing interface:
- TcpSocketProbeOptions
@Stability(Stable) public static final class TcpSocketProbeOptions.Builder extends Object implements software.amazon.jsii.Builder<TcpSocketProbeOptions>
A builder forTcpSocketProbeOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
host
@Stability(Stable) public TcpSocketProbeOptions.Builder host(String host)
Sets the value ofTcpSocketProbeOptions.getHost()- Parameters:
host- The host name to connect to on the container.- Returns:
this
-
port
@Stability(Stable) public TcpSocketProbeOptions.Builder port(Number port)
Sets the value ofTcpSocketProbeOptions.getPort()- Parameters:
port- The TCP port to connect to on the container.- Returns:
this
-
failureThreshold
@Stability(Stable) public TcpSocketProbeOptions.Builder failureThreshold(Number failureThreshold)
Sets the value ofProbeOptions.getFailureThreshold()- Parameters:
failureThreshold- Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.- Returns:
this
-
initialDelaySeconds
@Stability(Stable) public TcpSocketProbeOptions.Builder initialDelaySeconds(org.cdk8s.Duration initialDelaySeconds)
Sets the value ofProbeOptions.getInitialDelaySeconds()- Parameters:
initialDelaySeconds- Number of seconds after the container has started before liveness probes are initiated.- Returns:
this
-
periodSeconds
@Stability(Stable) public TcpSocketProbeOptions.Builder periodSeconds(org.cdk8s.Duration periodSeconds)
Sets the value ofProbeOptions.getPeriodSeconds()- Parameters:
periodSeconds- How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.- Returns:
this
-
successThreshold
@Stability(Stable) public TcpSocketProbeOptions.Builder successThreshold(Number successThreshold)
Sets the value ofProbeOptions.getSuccessThreshold()- Parameters:
successThreshold- Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.- Returns:
this
-
timeoutSeconds
@Stability(Stable) public TcpSocketProbeOptions.Builder timeoutSeconds(org.cdk8s.Duration timeoutSeconds)
Sets the value ofProbeOptions.getTimeoutSeconds()- Parameters:
timeoutSeconds- Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1.- Returns:
this
-
build
@Stability(Stable) public TcpSocketProbeOptions build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<TcpSocketProbeOptions>- Returns:
- a new instance of
TcpSocketProbeOptions - Throws:
NullPointerException- if any required attribute was not provided
-
-