com.pulumi.gcp.compute.kotlin.outputs.RegionBackendServiceFailoverPolicy.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.compute.kotlin.outputs
import kotlin.Boolean
import kotlin.Double
import kotlin.Suppress
/**
*
* @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 RegionBackendServiceFailoverPolicy(
public val disableConnectionDrainOnFailover: Boolean? = null,
public val dropTrafficIfUnhealthy: Boolean? = null,
public val failoverRatio: Double? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.gcp.compute.outputs.RegionBackendServiceFailoverPolicy): RegionBackendServiceFailoverPolicy = RegionBackendServiceFailoverPolicy(
disableConnectionDrainOnFailover = javaType.disableConnectionDrainOnFailover().map({ args0 ->
args0
}).orElse(null),
dropTrafficIfUnhealthy = javaType.dropTrafficIfUnhealthy().map({ args0 -> args0 }).orElse(null),
failoverRatio = javaType.failoverRatio().map({ args0 -> args0 }).orElse(null),
)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy