Package org.cdk8s.plus20
Class ProbeOptions.Builder
- java.lang.Object
-
- org.cdk8s.plus20.ProbeOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ProbeOptions>
- Enclosing interface:
- ProbeOptions
@Stability(Stable) public static final class ProbeOptions.Builder extends Object implements software.amazon.jsii.Builder<ProbeOptions>
A builder forProbeOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProbeOptionsbuild()Builds the configured instance.ProbeOptions.BuilderfailureThreshold(Number failureThreshold)Sets the value ofProbeOptions.getFailureThreshold()ProbeOptions.BuilderinitialDelaySeconds(org.cdk8s.Duration initialDelaySeconds)Sets the value ofProbeOptions.getInitialDelaySeconds()ProbeOptions.BuilderperiodSeconds(org.cdk8s.Duration periodSeconds)Sets the value ofProbeOptions.getPeriodSeconds()ProbeOptions.BuildersuccessThreshold(Number successThreshold)Sets the value ofProbeOptions.getSuccessThreshold()ProbeOptions.BuildertimeoutSeconds(org.cdk8s.Duration timeoutSeconds)Sets the value ofProbeOptions.getTimeoutSeconds()
-
-
-
Method Detail
-
failureThreshold
@Stability(Stable) public ProbeOptions.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 ProbeOptions.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 ProbeOptions.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 ProbeOptions.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 ProbeOptions.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 ProbeOptions build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ProbeOptions>- Returns:
- a new instance of
ProbeOptions - Throws:
NullPointerException- if any required attribute was not provided
-
-