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

com.pulumi.digitalocean.kotlin.inputs.LoadBalancerHealthcheckArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 4.38.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.digitalocean.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.digitalocean.inputs.LoadBalancerHealthcheckArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 *
 * @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 LoadBalancerHealthcheckArgs(
    public val checkIntervalSeconds: Output? = null,
    public val healthyThreshold: Output? = null,
    public val path: Output? = null,
    public val port: Output,
    public val protocol: Output,
    public val responseTimeoutSeconds: Output? = null,
    public val unhealthyThreshold: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.digitalocean.inputs.LoadBalancerHealthcheckArgs =
        com.pulumi.digitalocean.inputs.LoadBalancerHealthcheckArgs.builder()
            .checkIntervalSeconds(checkIntervalSeconds?.applyValue({ args0 -> args0 }))
            .healthyThreshold(healthyThreshold?.applyValue({ args0 -> args0 }))
            .path(path?.applyValue({ args0 -> args0 }))
            .port(port.applyValue({ args0 -> args0 }))
            .protocol(protocol.applyValue({ args0 -> args0 }))
            .responseTimeoutSeconds(responseTimeoutSeconds?.applyValue({ args0 -> args0 }))
            .unhealthyThreshold(unhealthyThreshold?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [LoadBalancerHealthcheckArgs].
 */
@PulumiTagMarker
public class LoadBalancerHealthcheckArgsBuilder internal constructor() {
    private var checkIntervalSeconds: Output? = null

    private var healthyThreshold: Output? = null

    private var path: Output? = null

    private var port: Output? = null

    private var protocol: Output? = null

    private var responseTimeoutSeconds: Output? = null

    private var unhealthyThreshold: Output? = null

    /**
     * @param value The number of seconds between two consecutive health checks. If not specified, the default value is `10`.
     */
    @JvmName("lruuvlglnqflujty")
    public suspend fun checkIntervalSeconds(`value`: Output) {
        this.checkIntervalSeconds = value
    }

    /**
     * @param value 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`.
     */
    @JvmName("sagfppbheewkedno")
    public suspend fun healthyThreshold(`value`: Output) {
        this.healthyThreshold = value
    }

    /**
     * @param value The path on the backend Droplets to which the Load Balancer instance will send a request.
     */
    @JvmName("ogimimeamirbhbvn")
    public suspend fun path(`value`: Output) {
        this.path = value
    }

    /**
     * @param value An integer representing the port on the backend Droplets on which the health check will attempt a connection.
     */
    @JvmName("ooclubehsgmqeqvi")
    public suspend fun port(`value`: Output) {
        this.port = value
    }

    /**
     * @param value The protocol used for health checks sent to the backend Droplets. The possible values are `http`, `https` or `tcp`.
     */
    @JvmName("vqjvikqqxemhquvs")
    public suspend fun protocol(`value`: Output) {
        this.protocol = value
    }

    /**
     * @param value 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`.
     */
    @JvmName("pfvfgkdnpvnvtgan")
    public suspend fun responseTimeoutSeconds(`value`: Output) {
        this.responseTimeoutSeconds = value
    }

    /**
     * @param value 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`.
     */
    @JvmName("jpqcldkagroucdio")
    public suspend fun unhealthyThreshold(`value`: Output) {
        this.unhealthyThreshold = value
    }

    /**
     * @param value The number of seconds between two consecutive health checks. If not specified, the default value is `10`.
     */
    @JvmName("pfomugrhdfjkcamr")
    public suspend fun checkIntervalSeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.checkIntervalSeconds = mapped
    }

    /**
     * @param value 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`.
     */
    @JvmName("mylitouikxvcvdua")
    public suspend fun healthyThreshold(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.healthyThreshold = mapped
    }

    /**
     * @param value The path on the backend Droplets to which the Load Balancer instance will send a request.
     */
    @JvmName("agwmodepyearwkop")
    public suspend fun path(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.path = mapped
    }

    /**
     * @param value An integer representing the port on the backend Droplets on which the health check will attempt a connection.
     */
    @JvmName("bclfumrimpjlairb")
    public suspend fun port(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.port = mapped
    }

    /**
     * @param value The protocol used for health checks sent to the backend Droplets. The possible values are `http`, `https` or `tcp`.
     */
    @JvmName("tfrkdpfmuuwlmhkp")
    public suspend fun protocol(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.protocol = mapped
    }

    /**
     * @param value 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`.
     */
    @JvmName("gyyavubbexolunck")
    public suspend fun responseTimeoutSeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.responseTimeoutSeconds = mapped
    }

    /**
     * @param value 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`.
     */
    @JvmName("fkmatbjjlrrltrwi")
    public suspend fun unhealthyThreshold(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.unhealthyThreshold = mapped
    }

    internal fun build(): LoadBalancerHealthcheckArgs = LoadBalancerHealthcheckArgs(
        checkIntervalSeconds = checkIntervalSeconds,
        healthyThreshold = healthyThreshold,
        path = path,
        port = port ?: throw PulumiNullFieldException("port"),
        protocol = protocol ?: throw PulumiNullFieldException("protocol"),
        responseTimeoutSeconds = responseTimeoutSeconds,
        unhealthyThreshold = unhealthyThreshold,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy