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

com.pulumi.gcp.compute.kotlin.inputs.BackendServiceConsistentHashArgs.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.10.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.BackendServiceConsistentHashArgs.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 BackendServiceConsistentHashArgs(
    public val httpCookie: Output? = null,
    public val httpHeaderName: Output? = null,
    public val minimumRingSize: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.inputs.BackendServiceConsistentHashArgs =
        com.pulumi.gcp.compute.inputs.BackendServiceConsistentHashArgs.builder()
            .httpCookie(httpCookie?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .httpHeaderName(httpHeaderName?.applyValue({ args0 -> args0 }))
            .minimumRingSize(minimumRingSize?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [BackendServiceConsistentHashArgs].
 */
@PulumiTagMarker
public class BackendServiceConsistentHashArgsBuilder 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("jugqvfhaadvpibvp")
    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("pgffnggghnihyafg")
    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("eshjyyydtugoyfca")
    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("ebsvtvfqtmfrkugm")
    public suspend fun httpCookie(`value`: BackendServiceConsistentHashHttpCookieArgs?) {
        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("dhjwhtjjnewhfilg")
    public suspend fun httpCookie(argument: suspend BackendServiceConsistentHashHttpCookieArgsBuilder.() -> Unit) {
        val toBeMapped = BackendServiceConsistentHashHttpCookieArgsBuilder().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("tdkqjtjhyprusypl")
    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("sblidwvyhchqheia")
    public suspend fun minimumRingSize(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.minimumRingSize = mapped
    }

    internal fun build(): BackendServiceConsistentHashArgs = BackendServiceConsistentHashArgs(
        httpCookie = httpCookie,
        httpHeaderName = httpHeaderName,
        minimumRingSize = minimumRingSize,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy