All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awscdk.services.apprunner.alpha.TcpHealthCheckOptions Maven / Gradle / Ivy

There is a newer version: 2.173.2-alpha.0
Show newest version
package software.amazon.awscdk.services.apprunner.alpha;

/**
 * (experimental) Properties used to define TCP Based healthchecks.
 * 

* Example: *

*

 * // The code below shows an example of how to instantiate this type.
 * // The values are placeholders you should change.
 * import software.amazon.awscdk.services.apprunner.alpha.*;
 * import software.amazon.awscdk.*;
 * TcpHealthCheckOptions tcpHealthCheckOptions = TcpHealthCheckOptions.builder()
 *         .healthyThreshold(123)
 *         .interval(Duration.minutes(30))
 *         .timeout(Duration.minutes(30))
 *         .unhealthyThreshold(123)
 *         .build();
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.104.0 (build e79254c)", date = "2024-11-22T02:24:11.379Z") @software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.apprunner.alpha.$Module.class, fqn = "@aws-cdk/aws-apprunner-alpha.TcpHealthCheckOptions") @software.amazon.jsii.Jsii.Proxy(TcpHealthCheckOptions.Jsii$Proxy.class) @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public interface TcpHealthCheckOptions extends software.amazon.jsii.JsiiSerializable { /** * (experimental) The number of consecutive checks that must succeed before App Runner decides that the service is healthy. *

* Default: 1 */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.Number getHealthyThreshold() { return null; } /** * (experimental) The time interval, in seconds, between health checks. *

* Default: Duration.seconds(5) */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.Duration getInterval() { return null; } /** * (experimental) The time, in seconds, to wait for a health check response before deciding it failed. *

* Default: Duration.seconds(2) */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.Duration getTimeout() { return null; } /** * (experimental) The number of consecutive checks that must fail before App Runner decides that the service is unhealthy. *

* Default: 5 */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.Number getUnhealthyThreshold() { return null; } /** * @return a {@link Builder} of {@link TcpHealthCheckOptions} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link TcpHealthCheckOptions} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { java.lang.Number healthyThreshold; software.amazon.awscdk.Duration interval; software.amazon.awscdk.Duration timeout; java.lang.Number unhealthyThreshold; /** * Sets the value of {@link TcpHealthCheckOptions#getHealthyThreshold} * @param healthyThreshold The number of consecutive checks that must succeed before App Runner decides that the service is healthy. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder healthyThreshold(java.lang.Number healthyThreshold) { this.healthyThreshold = healthyThreshold; return this; } /** * Sets the value of {@link TcpHealthCheckOptions#getInterval} * @param interval The time interval, in seconds, between health checks. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder interval(software.amazon.awscdk.Duration interval) { this.interval = interval; return this; } /** * Sets the value of {@link TcpHealthCheckOptions#getTimeout} * @param timeout The time, in seconds, to wait for a health check response before deciding it failed. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder timeout(software.amazon.awscdk.Duration timeout) { this.timeout = timeout; return this; } /** * Sets the value of {@link TcpHealthCheckOptions#getUnhealthyThreshold} * @param unhealthyThreshold The number of consecutive checks that must fail before App Runner decides that the service is unhealthy. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder unhealthyThreshold(java.lang.Number unhealthyThreshold) { this.unhealthyThreshold = unhealthyThreshold; return this; } /** * Builds the configured instance. * @return a new instance of {@link TcpHealthCheckOptions} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public TcpHealthCheckOptions build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link TcpHealthCheckOptions} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements TcpHealthCheckOptions { private final java.lang.Number healthyThreshold; private final software.amazon.awscdk.Duration interval; private final software.amazon.awscdk.Duration timeout; private final java.lang.Number unhealthyThreshold; /** * Constructor that initializes the object based on values retrieved from the JsiiObject. * @param objRef Reference to the JSII managed object. */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); this.healthyThreshold = software.amazon.jsii.Kernel.get(this, "healthyThreshold", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); this.interval = software.amazon.jsii.Kernel.get(this, "interval", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.Duration.class)); this.timeout = software.amazon.jsii.Kernel.get(this, "timeout", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.Duration.class)); this.unhealthyThreshold = software.amazon.jsii.Kernel.get(this, "unhealthyThreshold", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ protected Jsii$Proxy(final Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.healthyThreshold = builder.healthyThreshold; this.interval = builder.interval; this.timeout = builder.timeout; this.unhealthyThreshold = builder.unhealthyThreshold; } @Override public final java.lang.Number getHealthyThreshold() { return this.healthyThreshold; } @Override public final software.amazon.awscdk.Duration getInterval() { return this.interval; } @Override public final software.amazon.awscdk.Duration getTimeout() { return this.timeout; } @Override public final java.lang.Number getUnhealthyThreshold() { return this.unhealthyThreshold; } @Override @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); if (this.getHealthyThreshold() != null) { data.set("healthyThreshold", om.valueToTree(this.getHealthyThreshold())); } if (this.getInterval() != null) { data.set("interval", om.valueToTree(this.getInterval())); } if (this.getTimeout() != null) { data.set("timeout", om.valueToTree(this.getTimeout())); } if (this.getUnhealthyThreshold() != null) { data.set("unhealthyThreshold", om.valueToTree(this.getUnhealthyThreshold())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("@aws-cdk/aws-apprunner-alpha.TcpHealthCheckOptions")); struct.set("data", data); final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); obj.set("$jsii.struct", struct); return obj; } @Override public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TcpHealthCheckOptions.Jsii$Proxy that = (TcpHealthCheckOptions.Jsii$Proxy) o; if (this.healthyThreshold != null ? !this.healthyThreshold.equals(that.healthyThreshold) : that.healthyThreshold != null) return false; if (this.interval != null ? !this.interval.equals(that.interval) : that.interval != null) return false; if (this.timeout != null ? !this.timeout.equals(that.timeout) : that.timeout != null) return false; return this.unhealthyThreshold != null ? this.unhealthyThreshold.equals(that.unhealthyThreshold) : that.unhealthyThreshold == null; } @Override public final int hashCode() { int result = this.healthyThreshold != null ? this.healthyThreshold.hashCode() : 0; result = 31 * result + (this.interval != null ? this.interval.hashCode() : 0); result = 31 * result + (this.timeout != null ? this.timeout.hashCode() : 0); result = 31 * result + (this.unhealthyThreshold != null ? this.unhealthyThreshold.hashCode() : 0); return result; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy