com.pulumi.digitalocean.kotlin.outputs.LoadBalancerHealthcheck.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.digitalocean.kotlin.outputs
import kotlin.Int
import kotlin.String
import kotlin.Suppress
/**
*
* @property checkIntervalSeconds The number of seconds between two consecutive health checks. If not specified, the default value is `10`.
* @property healthyThreshold The number of times a health check must pass for a backend Droplet to be marked "healthy" and be re-added to the pool. If not specified, the default value is `5`.
* @property path The path on the backend Droplets to which the Load Balancer instance will send a request.
* @property port An integer representing the port on the backend Droplets on which the health check will attempt a connection.
* @property protocol The protocol used for health checks sent to the backend Droplets. The possible values are `http`, `https` or `tcp`.
* @property responseTimeoutSeconds The number of seconds the Load Balancer instance will wait for a response until marking a health check as failed. If not specified, the default value is `5`.
* @property unhealthyThreshold The number of times a health check must fail for a backend Droplet to be marked "unhealthy" and be removed from the pool. If not specified, the default value is `3`.
*/
public data class LoadBalancerHealthcheck(
public val checkIntervalSeconds: Int? = null,
public val healthyThreshold: Int? = null,
public val path: String? = null,
public val port: Int,
public val protocol: String,
public val responseTimeoutSeconds: Int? = null,
public val unhealthyThreshold: Int? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.digitalocean.outputs.LoadBalancerHealthcheck): LoadBalancerHealthcheck = LoadBalancerHealthcheck(
checkIntervalSeconds = javaType.checkIntervalSeconds().map({ args0 -> args0 }).orElse(null),
healthyThreshold = javaType.healthyThreshold().map({ args0 -> args0 }).orElse(null),
path = javaType.path().map({ args0 -> args0 }).orElse(null),
port = javaType.port(),
protocol = javaType.protocol(),
responseTimeoutSeconds = javaType.responseTimeoutSeconds().map({ args0 -> args0 }).orElse(null),
unhealthyThreshold = javaType.unhealthyThreshold().map({ args0 -> args0 }).orElse(null),
)
}
}