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

com.pulumi.gcp.compute.kotlin.inputs.RegionBackendServiceFailoverPolicyArgs.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: 8.12.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.compute.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.inputs.RegionBackendServiceFailoverPolicyArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Double
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 *
 * @property disableConnectionDrainOnFailover On failover or failback, this field indicates whether connection drain
 * will be honored. Setting this to true has the following effect: connections
 * to the old active pool are not drained. Connections to the new active pool
 * use the timeout of 10 min (currently fixed). Setting to false has the
 * following effect: both old and new connections will have a drain timeout
 * of 10 min.
 * This can be set to true only if the protocol is TCP.
 * The default is false.
 * @property dropTrafficIfUnhealthy This option is used only when no healthy VMs are detected in the primary
 * and backup instance groups. When set to true, traffic is dropped. When
 * set to false, new connections are sent across all VMs in the primary group.
 * The default is false.
 * @property failoverRatio The value of the field must be in [0, 1]. If the ratio of the healthy
 * VMs in the primary backend is at or below this number, traffic arriving
 * at the load-balanced IP will be directed to the failover backend.
 * In case where 'failoverRatio' is not set or all the VMs in the backup
 * backend are unhealthy, the traffic will be directed back to the primary
 * backend in the "force" mode, where traffic will be spread to the healthy
 * VMs with the best effort, or to all VMs when no VM is healthy.
 * This field is only used with l4 load balancing.
 */
public data class RegionBackendServiceFailoverPolicyArgs(
    public val disableConnectionDrainOnFailover: Output? = null,
    public val dropTrafficIfUnhealthy: Output? = null,
    public val failoverRatio: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.inputs.RegionBackendServiceFailoverPolicyArgs =
        com.pulumi.gcp.compute.inputs.RegionBackendServiceFailoverPolicyArgs.builder()
            .disableConnectionDrainOnFailover(disableConnectionDrainOnFailover?.applyValue({ args0 -> args0 }))
            .dropTrafficIfUnhealthy(dropTrafficIfUnhealthy?.applyValue({ args0 -> args0 }))
            .failoverRatio(failoverRatio?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [RegionBackendServiceFailoverPolicyArgs].
 */
@PulumiTagMarker
public class RegionBackendServiceFailoverPolicyArgsBuilder internal constructor() {
    private var disableConnectionDrainOnFailover: Output? = null

    private var dropTrafficIfUnhealthy: Output? = null

    private var failoverRatio: Output? = null

    /**
     * @param value On failover or failback, this field indicates whether connection drain
     * will be honored. Setting this to true has the following effect: connections
     * to the old active pool are not drained. Connections to the new active pool
     * use the timeout of 10 min (currently fixed). Setting to false has the
     * following effect: both old and new connections will have a drain timeout
     * of 10 min.
     * This can be set to true only if the protocol is TCP.
     * The default is false.
     */
    @JvmName("cpmkkcystujrennl")
    public suspend fun disableConnectionDrainOnFailover(`value`: Output) {
        this.disableConnectionDrainOnFailover = value
    }

    /**
     * @param value This option is used only when no healthy VMs are detected in the primary
     * and backup instance groups. When set to true, traffic is dropped. When
     * set to false, new connections are sent across all VMs in the primary group.
     * The default is false.
     */
    @JvmName("svtbwsmxkuatichp")
    public suspend fun dropTrafficIfUnhealthy(`value`: Output) {
        this.dropTrafficIfUnhealthy = value
    }

    /**
     * @param value The value of the field must be in [0, 1]. If the ratio of the healthy
     * VMs in the primary backend is at or below this number, traffic arriving
     * at the load-balanced IP will be directed to the failover backend.
     * In case where 'failoverRatio' is not set or all the VMs in the backup
     * backend are unhealthy, the traffic will be directed back to the primary
     * backend in the "force" mode, where traffic will be spread to the healthy
     * VMs with the best effort, or to all VMs when no VM is healthy.
     * This field is only used with l4 load balancing.
     */
    @JvmName("eafyfqcixwogjttb")
    public suspend fun failoverRatio(`value`: Output) {
        this.failoverRatio = value
    }

    /**
     * @param value On failover or failback, this field indicates whether connection drain
     * will be honored. Setting this to true has the following effect: connections
     * to the old active pool are not drained. Connections to the new active pool
     * use the timeout of 10 min (currently fixed). Setting to false has the
     * following effect: both old and new connections will have a drain timeout
     * of 10 min.
     * This can be set to true only if the protocol is TCP.
     * The default is false.
     */
    @JvmName("hclqtgikymxhltmm")
    public suspend fun disableConnectionDrainOnFailover(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.disableConnectionDrainOnFailover = mapped
    }

    /**
     * @param value This option is used only when no healthy VMs are detected in the primary
     * and backup instance groups. When set to true, traffic is dropped. When
     * set to false, new connections are sent across all VMs in the primary group.
     * The default is false.
     */
    @JvmName("gctoumnadrxsyltk")
    public suspend fun dropTrafficIfUnhealthy(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dropTrafficIfUnhealthy = mapped
    }

    /**
     * @param value The value of the field must be in [0, 1]. If the ratio of the healthy
     * VMs in the primary backend is at or below this number, traffic arriving
     * at the load-balanced IP will be directed to the failover backend.
     * In case where 'failoverRatio' is not set or all the VMs in the backup
     * backend are unhealthy, the traffic will be directed back to the primary
     * backend in the "force" mode, where traffic will be spread to the healthy
     * VMs with the best effort, or to all VMs when no VM is healthy.
     * This field is only used with l4 load balancing.
     */
    @JvmName("teskvqyymiufottj")
    public suspend fun failoverRatio(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.failoverRatio = mapped
    }

    internal fun build(): RegionBackendServiceFailoverPolicyArgs =
        RegionBackendServiceFailoverPolicyArgs(
            disableConnectionDrainOnFailover = disableConnectionDrainOnFailover,
            dropTrafficIfUnhealthy = dropTrafficIfUnhealthy,
            failoverRatio = failoverRatio,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy