com.pulumi.gcp.compute.kotlin.inputs.RegionBackendServiceConsistentHashArgs.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.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.inputs.RegionBackendServiceConsistentHashArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
*
* @property httpCookie Hash is based on HTTP Cookie. This field describes a HTTP cookie
* that will be used as the hash key for the consistent hash load
* balancer. If the cookie is not present, it will be generated.
* This field is applicable if the sessionAffinity is set to HTTP_COOKIE.
* Structure is documented below.
* @property httpHeaderName The hash based on the value of the specified header field.
* This field is applicable if the sessionAffinity is set to HEADER_FIELD.
* @property minimumRingSize The minimum number of virtual nodes to use for the hash ring.
* Larger ring sizes result in more granular load
* distributions. If the number of hosts in the load balancing pool
* is larger than the ring size, each host will be assigned a single
* virtual node.
* Defaults to 1024.
*/
public data class RegionBackendServiceConsistentHashArgs(
public val httpCookie: Output? = null,
public val httpHeaderName: Output? = null,
public val minimumRingSize: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.compute.inputs.RegionBackendServiceConsistentHashArgs =
com.pulumi.gcp.compute.inputs.RegionBackendServiceConsistentHashArgs.builder()
.httpCookie(httpCookie?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.httpHeaderName(httpHeaderName?.applyValue({ args0 -> args0 }))
.minimumRingSize(minimumRingSize?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [RegionBackendServiceConsistentHashArgs].
*/
@PulumiTagMarker
public class RegionBackendServiceConsistentHashArgsBuilder internal constructor() {
private var httpCookie: Output? = null
private var httpHeaderName: Output? = null
private var minimumRingSize: Output? = null
/**
* @param value Hash is based on HTTP Cookie. This field describes a HTTP cookie
* that will be used as the hash key for the consistent hash load
* balancer. If the cookie is not present, it will be generated.
* This field is applicable if the sessionAffinity is set to HTTP_COOKIE.
* Structure is documented below.
*/
@JvmName("laqosntroytvvpvq")
public suspend fun httpCookie(`value`: Output) {
this.httpCookie = value
}
/**
* @param value The hash based on the value of the specified header field.
* This field is applicable if the sessionAffinity is set to HEADER_FIELD.
*/
@JvmName("xgrnjrafpwkiixeo")
public suspend fun httpHeaderName(`value`: Output) {
this.httpHeaderName = value
}
/**
* @param value The minimum number of virtual nodes to use for the hash ring.
* Larger ring sizes result in more granular load
* distributions. If the number of hosts in the load balancing pool
* is larger than the ring size, each host will be assigned a single
* virtual node.
* Defaults to 1024.
*/
@JvmName("eyurhyqrldxksmvi")
public suspend fun minimumRingSize(`value`: Output) {
this.minimumRingSize = value
}
/**
* @param value Hash is based on HTTP Cookie. This field describes a HTTP cookie
* that will be used as the hash key for the consistent hash load
* balancer. If the cookie is not present, it will be generated.
* This field is applicable if the sessionAffinity is set to HTTP_COOKIE.
* Structure is documented below.
*/
@JvmName("ebuqhpumgyengclo")
public suspend fun httpCookie(`value`: RegionBackendServiceConsistentHashHttpCookieArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.httpCookie = mapped
}
/**
* @param argument Hash is based on HTTP Cookie. This field describes a HTTP cookie
* that will be used as the hash key for the consistent hash load
* balancer. If the cookie is not present, it will be generated.
* This field is applicable if the sessionAffinity is set to HTTP_COOKIE.
* Structure is documented below.
*/
@JvmName("xxnljfrplashlfkr")
public suspend fun httpCookie(argument: suspend RegionBackendServiceConsistentHashHttpCookieArgsBuilder.() -> Unit) {
val toBeMapped = RegionBackendServiceConsistentHashHttpCookieArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.httpCookie = mapped
}
/**
* @param value The hash based on the value of the specified header field.
* This field is applicable if the sessionAffinity is set to HEADER_FIELD.
*/
@JvmName("itrfmwvhgdlkvvls")
public suspend fun httpHeaderName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.httpHeaderName = mapped
}
/**
* @param value The minimum number of virtual nodes to use for the hash ring.
* Larger ring sizes result in more granular load
* distributions. If the number of hosts in the load balancing pool
* is larger than the ring size, each host will be assigned a single
* virtual node.
* Defaults to 1024.
*/
@JvmName("wbdchsnjilpfdrym")
public suspend fun minimumRingSize(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.minimumRingSize = mapped
}
internal fun build(): RegionBackendServiceConsistentHashArgs =
RegionBackendServiceConsistentHashArgs(
httpCookie = httpCookie,
httpHeaderName = httpHeaderName,
minimumRingSize = minimumRingSize,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy