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

com.pulumi.cloudflare.kotlin.inputs.LoadBalancerRuleOverrideArgs.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: 5.40.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.cloudflare.kotlin.inputs

import com.pulumi.cloudflare.inputs.LoadBalancerRuleOverrideArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
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.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property adaptiveRoutings Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
 * @property countryPools A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
 * @property defaultPools A list of pool IDs ordered by their failover priority. Used whenever `pop_pools`/`country_pools`/`region_pools` are not defined.
 * @property fallbackPool The pool ID to use when all other pools are detected as unhealthy.
 * @property locationStrategies Controls location-based steering for non-proxied requests.
 * @property popPools A set containing mappings of Cloudflare Point-of-Presence (PoP) identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). This feature is only available to enterprise customers.
 * @property randomSteerings Configures pool weights. When `steering_policy="random"`, a random pool is selected with probability proportional to pool weights. When `steering_policy="least_outstanding_requests"`, pool weights are used to scale each pool's outstanding requests. When `steering_policy="least_connections"`, pool weights are used to scale each pool's open connections.
 * @property regionPools A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
 * @property sessionAffinity Configure attributes for session affinity.
 * @property sessionAffinityAttributes Configure attributes for session affinity. Note that the property `drain_duration` is not currently supported as a rule override.
 * @property sessionAffinityTtl Time, in seconds, until this load balancer's session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of `82800` (23 hours) will be used unless `session_affinity_ttl` is explicitly set. Once the expiry time has been reached, subsequent requests may get sent to a different origin server. Valid values are between `1800` and `604800`.
 * @property steeringPolicy The method the load balancer uses to determine the route to your origin. Value `off` uses `default_pool_ids`. Value `geo` uses `pop_pools`/`country_pools`/`region_pools`. For non-proxied requests, the `country` for `country_pools` is determined by `location_strategy`. Value `random` selects a pool randomly. Value `dynamic_latency` uses round trip time to select the closest pool in `default_pool_ids` (requires pool health checks). Value `proximity` uses the pools' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined by `location_strategy` for non-proxied requests. Value `least_outstanding_requests` selects a pool by taking into consideration `random_steering` weights, as well as each pool's number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others. Value `least_connections` selects a pool by taking into consideration `random_steering` weights, as well as each pool's number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections. Value `""` maps to `geo` if you use `pop_pools`/`country_pools`/`region_pools` otherwise `off`. Available values: `off`, `geo`, `dynamic_latency`, `random`, `proximity`, `least_outstanding_requests`, `least_connections`, `""` Defaults to `""`.
 * @property ttl Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This cannot be set for proxied load balancers. Defaults to `30`.
 */
public data class LoadBalancerRuleOverrideArgs(
    public val adaptiveRoutings: Output>? = null,
    public val countryPools: Output>? = null,
    public val defaultPools: Output>? = null,
    public val fallbackPool: Output? = null,
    public val locationStrategies: Output>? = null,
    public val popPools: Output>? = null,
    public val randomSteerings: Output>? = null,
    public val regionPools: Output>? = null,
    public val sessionAffinity: Output? = null,
    public val sessionAffinityAttributes: Output>? = null,
    public val sessionAffinityTtl: Output? = null,
    public val steeringPolicy: Output? = null,
    public val ttl: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.inputs.LoadBalancerRuleOverrideArgs =
        com.pulumi.cloudflare.inputs.LoadBalancerRuleOverrideArgs.builder()
            .adaptiveRoutings(
                adaptiveRoutings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .countryPools(
                countryPools?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .defaultPools(defaultPools?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .fallbackPool(fallbackPool?.applyValue({ args0 -> args0 }))
            .locationStrategies(
                locationStrategies?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .popPools(
                popPools?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .randomSteerings(
                randomSteerings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .regionPools(
                regionPools?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .sessionAffinity(sessionAffinity?.applyValue({ args0 -> args0 }))
            .sessionAffinityAttributes(
                sessionAffinityAttributes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .sessionAffinityTtl(sessionAffinityTtl?.applyValue({ args0 -> args0 }))
            .steeringPolicy(steeringPolicy?.applyValue({ args0 -> args0 }))
            .ttl(ttl?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [LoadBalancerRuleOverrideArgs].
 */
@PulumiTagMarker
public class LoadBalancerRuleOverrideArgsBuilder internal constructor() {
    private var adaptiveRoutings: Output>? = null

    private var countryPools: Output>? = null

    private var defaultPools: Output>? = null

    private var fallbackPool: Output? = null

    private var locationStrategies: Output>? = null

    private var popPools: Output>? = null

    private var randomSteerings: Output>? = null

    private var regionPools: Output>? = null

    private var sessionAffinity: Output? = null

    private var sessionAffinityAttributes:
        Output>? = null

    private var sessionAffinityTtl: Output? = null

    private var steeringPolicy: Output? = null

    private var ttl: Output? = null

    /**
     * @param value Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
     */
    @JvmName("ehftdsetkurmqcoa")
    public suspend fun adaptiveRoutings(`value`: Output>) {
        this.adaptiveRoutings = value
    }

    @JvmName("woncbaayylheuabd")
    public suspend fun adaptiveRoutings(vararg values: Output) {
        this.adaptiveRoutings = Output.all(values.asList())
    }

    /**
     * @param values Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
     */
    @JvmName("ulsnmbxtugwekdvl")
    public suspend fun adaptiveRoutings(values: List>) {
        this.adaptiveRoutings = Output.all(values)
    }

    /**
     * @param value A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
     */
    @JvmName("almvdvrnqptrphxh")
    public suspend fun countryPools(`value`: Output>) {
        this.countryPools = value
    }

    @JvmName("mmwtqyxphcrkmknf")
    public suspend fun countryPools(vararg values: Output) {
        this.countryPools = Output.all(values.asList())
    }

    /**
     * @param values A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
     */
    @JvmName("mudxsxchygjfpcjx")
    public suspend fun countryPools(values: List>) {
        this.countryPools = Output.all(values)
    }

    /**
     * @param value A list of pool IDs ordered by their failover priority. Used whenever `pop_pools`/`country_pools`/`region_pools` are not defined.
     */
    @JvmName("fjhryqdlhpdaoykx")
    public suspend fun defaultPools(`value`: Output>) {
        this.defaultPools = value
    }

    @JvmName("abvbfqlxeafiewqn")
    public suspend fun defaultPools(vararg values: Output) {
        this.defaultPools = Output.all(values.asList())
    }

    /**
     * @param values A list of pool IDs ordered by their failover priority. Used whenever `pop_pools`/`country_pools`/`region_pools` are not defined.
     */
    @JvmName("jacckrdewckdxijw")
    public suspend fun defaultPools(values: List>) {
        this.defaultPools = Output.all(values)
    }

    /**
     * @param value The pool ID to use when all other pools are detected as unhealthy.
     */
    @JvmName("vgqyombugaqssncd")
    public suspend fun fallbackPool(`value`: Output) {
        this.fallbackPool = value
    }

    /**
     * @param value Controls location-based steering for non-proxied requests.
     */
    @JvmName("vfnsjissfelwhjhv")
    public suspend fun locationStrategies(`value`: Output>) {
        this.locationStrategies = value
    }

    @JvmName("vdoomebtguqrmlqj")
    public suspend fun locationStrategies(vararg values: Output) {
        this.locationStrategies = Output.all(values.asList())
    }

    /**
     * @param values Controls location-based steering for non-proxied requests.
     */
    @JvmName("jkrvgijqownvedgo")
    public suspend fun locationStrategies(values: List>) {
        this.locationStrategies = Output.all(values)
    }

    /**
     * @param value A set containing mappings of Cloudflare Point-of-Presence (PoP) identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). This feature is only available to enterprise customers.
     */
    @JvmName("nfwyhcyfspmnvwhv")
    public suspend fun popPools(`value`: Output>) {
        this.popPools = value
    }

    @JvmName("fhwbclumkkuginuw")
    public suspend fun popPools(vararg values: Output) {
        this.popPools = Output.all(values.asList())
    }

    /**
     * @param values A set containing mappings of Cloudflare Point-of-Presence (PoP) identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). This feature is only available to enterprise customers.
     */
    @JvmName("xnbudsuiuxykpwrw")
    public suspend fun popPools(values: List>) {
        this.popPools = Output.all(values)
    }

    /**
     * @param value Configures pool weights. When `steering_policy="random"`, a random pool is selected with probability proportional to pool weights. When `steering_policy="least_outstanding_requests"`, pool weights are used to scale each pool's outstanding requests. When `steering_policy="least_connections"`, pool weights are used to scale each pool's open connections.
     */
    @JvmName("wjwvtgrqtakaihde")
    public suspend fun randomSteerings(`value`: Output>) {
        this.randomSteerings = value
    }

    @JvmName("cdnmqtvyfiiiahlu")
    public suspend fun randomSteerings(vararg values: Output) {
        this.randomSteerings = Output.all(values.asList())
    }

    /**
     * @param values Configures pool weights. When `steering_policy="random"`, a random pool is selected with probability proportional to pool weights. When `steering_policy="least_outstanding_requests"`, pool weights are used to scale each pool's outstanding requests. When `steering_policy="least_connections"`, pool weights are used to scale each pool's open connections.
     */
    @JvmName("aaeomjuodpgofpgq")
    public suspend fun randomSteerings(values: List>) {
        this.randomSteerings = Output.all(values)
    }

    /**
     * @param value A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
     */
    @JvmName("vkynmvyaotrlvboc")
    public suspend fun regionPools(`value`: Output>) {
        this.regionPools = value
    }

    @JvmName("abxlmvjvwxwcmdyx")
    public suspend fun regionPools(vararg values: Output) {
        this.regionPools = Output.all(values.asList())
    }

    /**
     * @param values A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
     */
    @JvmName("flvwgsylmhwgfllu")
    public suspend fun regionPools(values: List>) {
        this.regionPools = Output.all(values)
    }

    /**
     * @param value Configure attributes for session affinity.
     */
    @JvmName("umqorxedtihymopl")
    public suspend fun sessionAffinity(`value`: Output) {
        this.sessionAffinity = value
    }

    /**
     * @param value Configure attributes for session affinity. Note that the property `drain_duration` is not currently supported as a rule override.
     */
    @JvmName("xkmbjewvvoofpyqm")
    public suspend fun sessionAffinityAttributes(`value`: Output>) {
        this.sessionAffinityAttributes = value
    }

    @JvmName("crxxwvjlpjptsupx")
    public suspend fun sessionAffinityAttributes(vararg values: Output) {
        this.sessionAffinityAttributes = Output.all(values.asList())
    }

    /**
     * @param values Configure attributes for session affinity. Note that the property `drain_duration` is not currently supported as a rule override.
     */
    @JvmName("mkdlerquqhgogayq")
    public suspend fun sessionAffinityAttributes(values: List>) {
        this.sessionAffinityAttributes = Output.all(values)
    }

    /**
     * @param value Time, in seconds, until this load balancer's session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of `82800` (23 hours) will be used unless `session_affinity_ttl` is explicitly set. Once the expiry time has been reached, subsequent requests may get sent to a different origin server. Valid values are between `1800` and `604800`.
     */
    @JvmName("odpartwxthgahujl")
    public suspend fun sessionAffinityTtl(`value`: Output) {
        this.sessionAffinityTtl = value
    }

    /**
     * @param value The method the load balancer uses to determine the route to your origin. Value `off` uses `default_pool_ids`. Value `geo` uses `pop_pools`/`country_pools`/`region_pools`. For non-proxied requests, the `country` for `country_pools` is determined by `location_strategy`. Value `random` selects a pool randomly. Value `dynamic_latency` uses round trip time to select the closest pool in `default_pool_ids` (requires pool health checks). Value `proximity` uses the pools' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined by `location_strategy` for non-proxied requests. Value `least_outstanding_requests` selects a pool by taking into consideration `random_steering` weights, as well as each pool's number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others. Value `least_connections` selects a pool by taking into consideration `random_steering` weights, as well as each pool's number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections. Value `""` maps to `geo` if you use `pop_pools`/`country_pools`/`region_pools` otherwise `off`. Available values: `off`, `geo`, `dynamic_latency`, `random`, `proximity`, `least_outstanding_requests`, `least_connections`, `""` Defaults to `""`.
     */
    @JvmName("pqlokoppipodjgxt")
    public suspend fun steeringPolicy(`value`: Output) {
        this.steeringPolicy = value
    }

    /**
     * @param value Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This cannot be set for proxied load balancers. Defaults to `30`.
     */
    @JvmName("lpriaoyyoedcafkj")
    public suspend fun ttl(`value`: Output) {
        this.ttl = value
    }

    /**
     * @param value Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
     */
    @JvmName("eslkvytapxllfsyu")
    public suspend fun adaptiveRoutings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.adaptiveRoutings = mapped
    }

    /**
     * @param argument Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
     */
    @JvmName("jubbtridoucxmdwt")
    public suspend fun adaptiveRoutings(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            LoadBalancerRuleOverrideAdaptiveRoutingArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.adaptiveRoutings = mapped
    }

    /**
     * @param argument Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
     */
    @JvmName("rkrqyjlpnodpxuiu")
    public suspend fun adaptiveRoutings(vararg argument: suspend LoadBalancerRuleOverrideAdaptiveRoutingArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            LoadBalancerRuleOverrideAdaptiveRoutingArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.adaptiveRoutings = mapped
    }

    /**
     * @param argument Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
     */
    @JvmName("txrogmxugohobigj")
    public suspend fun adaptiveRoutings(argument: suspend LoadBalancerRuleOverrideAdaptiveRoutingArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            LoadBalancerRuleOverrideAdaptiveRoutingArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.adaptiveRoutings = mapped
    }

    /**
     * @param values Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
     */
    @JvmName("bgxjisjheqhmhlkr")
    public suspend fun adaptiveRoutings(vararg values: LoadBalancerRuleOverrideAdaptiveRoutingArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.adaptiveRoutings = mapped
    }

    /**
     * @param value A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
     */
    @JvmName("njxpmmjreunrktmc")
    public suspend fun countryPools(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.countryPools = mapped
    }

    /**
     * @param argument A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
     */
    @JvmName("fbgkepjcykeibmfr")
    public suspend fun countryPools(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            LoadBalancerRuleOverrideCountryPoolArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.countryPools = mapped
    }

    /**
     * @param argument A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
     */
    @JvmName("epgiiwbmowgcowex")
    public suspend fun countryPools(vararg argument: suspend LoadBalancerRuleOverrideCountryPoolArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            LoadBalancerRuleOverrideCountryPoolArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.countryPools = mapped
    }

    /**
     * @param argument A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
     */
    @JvmName("yphxkuflpfispced")
    public suspend fun countryPools(argument: suspend LoadBalancerRuleOverrideCountryPoolArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            LoadBalancerRuleOverrideCountryPoolArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.countryPools = mapped
    }

    /**
     * @param values A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
     */
    @JvmName("cauqopvwycydewql")
    public suspend fun countryPools(vararg values: LoadBalancerRuleOverrideCountryPoolArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.countryPools = mapped
    }

    /**
     * @param value A list of pool IDs ordered by their failover priority. Used whenever `pop_pools`/`country_pools`/`region_pools` are not defined.
     */
    @JvmName("tpgoxlahkgwihjrd")
    public suspend fun defaultPools(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultPools = mapped
    }

    /**
     * @param values A list of pool IDs ordered by their failover priority. Used whenever `pop_pools`/`country_pools`/`region_pools` are not defined.
     */
    @JvmName("rxkvlqkoorfhemav")
    public suspend fun defaultPools(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.defaultPools = mapped
    }

    /**
     * @param value The pool ID to use when all other pools are detected as unhealthy.
     */
    @JvmName("nnjhqpexoknikcsd")
    public suspend fun fallbackPool(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fallbackPool = mapped
    }

    /**
     * @param value Controls location-based steering for non-proxied requests.
     */
    @JvmName("yrtpsxtijxysaqmt")
    public suspend fun locationStrategies(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.locationStrategies = mapped
    }

    /**
     * @param argument Controls location-based steering for non-proxied requests.
     */
    @JvmName("tioqprorgerchcbp")
    public suspend fun locationStrategies(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            LoadBalancerRuleOverrideLocationStrategyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.locationStrategies = mapped
    }

    /**
     * @param argument Controls location-based steering for non-proxied requests.
     */
    @JvmName("aqdpgrhgwnkfqdyx")
    public suspend fun locationStrategies(vararg argument: suspend LoadBalancerRuleOverrideLocationStrategyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            LoadBalancerRuleOverrideLocationStrategyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.locationStrategies = mapped
    }

    /**
     * @param argument Controls location-based steering for non-proxied requests.
     */
    @JvmName("eiosokqpotptpxqr")
    public suspend fun locationStrategies(argument: suspend LoadBalancerRuleOverrideLocationStrategyArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            LoadBalancerRuleOverrideLocationStrategyArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.locationStrategies = mapped
    }

    /**
     * @param values Controls location-based steering for non-proxied requests.
     */
    @JvmName("onjmwspcejhcemoo")
    public suspend fun locationStrategies(vararg values: LoadBalancerRuleOverrideLocationStrategyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.locationStrategies = mapped
    }

    /**
     * @param value A set containing mappings of Cloudflare Point-of-Presence (PoP) identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). This feature is only available to enterprise customers.
     */
    @JvmName("bdpoxqvbqegmvvtt")
    public suspend fun popPools(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.popPools = mapped
    }

    /**
     * @param argument A set containing mappings of Cloudflare Point-of-Presence (PoP) identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). This feature is only available to enterprise customers.
     */
    @JvmName("vgkwploigmvceyyb")
    public suspend fun popPools(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            LoadBalancerRuleOverridePopPoolArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.popPools = mapped
    }

    /**
     * @param argument A set containing mappings of Cloudflare Point-of-Presence (PoP) identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). This feature is only available to enterprise customers.
     */
    @JvmName("illqbyyfqtlqueux")
    public suspend fun popPools(vararg argument: suspend LoadBalancerRuleOverridePopPoolArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            LoadBalancerRuleOverridePopPoolArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.popPools = mapped
    }

    /**
     * @param argument A set containing mappings of Cloudflare Point-of-Presence (PoP) identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). This feature is only available to enterprise customers.
     */
    @JvmName("nsppwlinttymebyx")
    public suspend fun popPools(argument: suspend LoadBalancerRuleOverridePopPoolArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            LoadBalancerRuleOverridePopPoolArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.popPools = mapped
    }

    /**
     * @param values A set containing mappings of Cloudflare Point-of-Presence (PoP) identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). This feature is only available to enterprise customers.
     */
    @JvmName("dvgfgaioouxngsqm")
    public suspend fun popPools(vararg values: LoadBalancerRuleOverridePopPoolArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.popPools = mapped
    }

    /**
     * @param value Configures pool weights. When `steering_policy="random"`, a random pool is selected with probability proportional to pool weights. When `steering_policy="least_outstanding_requests"`, pool weights are used to scale each pool's outstanding requests. When `steering_policy="least_connections"`, pool weights are used to scale each pool's open connections.
     */
    @JvmName("iogtlqyruhlsmspm")
    public suspend fun randomSteerings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.randomSteerings = mapped
    }

    /**
     * @param argument Configures pool weights. When `steering_policy="random"`, a random pool is selected with probability proportional to pool weights. When `steering_policy="least_outstanding_requests"`, pool weights are used to scale each pool's outstanding requests. When `steering_policy="least_connections"`, pool weights are used to scale each pool's open connections.
     */
    @JvmName("mrhvymkdaolfygbe")
    public suspend fun randomSteerings(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            LoadBalancerRuleOverrideRandomSteeringArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.randomSteerings = mapped
    }

    /**
     * @param argument Configures pool weights. When `steering_policy="random"`, a random pool is selected with probability proportional to pool weights. When `steering_policy="least_outstanding_requests"`, pool weights are used to scale each pool's outstanding requests. When `steering_policy="least_connections"`, pool weights are used to scale each pool's open connections.
     */
    @JvmName("vfhtgyuvmvoaaaed")
    public suspend fun randomSteerings(vararg argument: suspend LoadBalancerRuleOverrideRandomSteeringArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            LoadBalancerRuleOverrideRandomSteeringArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.randomSteerings = mapped
    }

    /**
     * @param argument Configures pool weights. When `steering_policy="random"`, a random pool is selected with probability proportional to pool weights. When `steering_policy="least_outstanding_requests"`, pool weights are used to scale each pool's outstanding requests. When `steering_policy="least_connections"`, pool weights are used to scale each pool's open connections.
     */
    @JvmName("gqltgaqabxmuxpiu")
    public suspend fun randomSteerings(argument: suspend LoadBalancerRuleOverrideRandomSteeringArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            LoadBalancerRuleOverrideRandomSteeringArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.randomSteerings = mapped
    }

    /**
     * @param values Configures pool weights. When `steering_policy="random"`, a random pool is selected with probability proportional to pool weights. When `steering_policy="least_outstanding_requests"`, pool weights are used to scale each pool's outstanding requests. When `steering_policy="least_connections"`, pool weights are used to scale each pool's open connections.
     */
    @JvmName("xmcpniremwlcqxnw")
    public suspend fun randomSteerings(vararg values: LoadBalancerRuleOverrideRandomSteeringArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.randomSteerings = mapped
    }

    /**
     * @param value A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
     */
    @JvmName("tuwwylrwrupunjxd")
    public suspend fun regionPools(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.regionPools = mapped
    }

    /**
     * @param argument A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
     */
    @JvmName("agdijiyfcaihrhlj")
    public suspend fun regionPools(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            LoadBalancerRuleOverrideRegionPoolArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.regionPools = mapped
    }

    /**
     * @param argument A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
     */
    @JvmName("lgtkujmkbmsqxhtn")
    public suspend fun regionPools(vararg argument: suspend LoadBalancerRuleOverrideRegionPoolArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            LoadBalancerRuleOverrideRegionPoolArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.regionPools = mapped
    }

    /**
     * @param argument A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
     */
    @JvmName("rgdkvdfipawohyhy")
    public suspend fun regionPools(argument: suspend LoadBalancerRuleOverrideRegionPoolArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            LoadBalancerRuleOverrideRegionPoolArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.regionPools = mapped
    }

    /**
     * @param values A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
     */
    @JvmName("iivmqbalnbiqaqqt")
    public suspend fun regionPools(vararg values: LoadBalancerRuleOverrideRegionPoolArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.regionPools = mapped
    }

    /**
     * @param value Configure attributes for session affinity.
     */
    @JvmName("xsoresomugihgvye")
    public suspend fun sessionAffinity(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sessionAffinity = mapped
    }

    /**
     * @param value Configure attributes for session affinity. Note that the property `drain_duration` is not currently supported as a rule override.
     */
    @JvmName("iivbrhaxarqnebyt")
    public suspend fun sessionAffinityAttributes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sessionAffinityAttributes = mapped
    }

    /**
     * @param argument Configure attributes for session affinity. Note that the property `drain_duration` is not currently supported as a rule override.
     */
    @JvmName("bjlcluylgykfwqdu")
    public suspend fun sessionAffinityAttributes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            LoadBalancerRuleOverrideSessionAffinityAttributeArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.sessionAffinityAttributes = mapped
    }

    /**
     * @param argument Configure attributes for session affinity. Note that the property `drain_duration` is not currently supported as a rule override.
     */
    @JvmName("stjxcfqigainnovq")
    public suspend fun sessionAffinityAttributes(vararg argument: suspend LoadBalancerRuleOverrideSessionAffinityAttributeArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            LoadBalancerRuleOverrideSessionAffinityAttributeArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.sessionAffinityAttributes = mapped
    }

    /**
     * @param argument Configure attributes for session affinity. Note that the property `drain_duration` is not currently supported as a rule override.
     */
    @JvmName("kqrmyldwauntxavp")
    public suspend fun sessionAffinityAttributes(argument: suspend LoadBalancerRuleOverrideSessionAffinityAttributeArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                LoadBalancerRuleOverrideSessionAffinityAttributeArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.sessionAffinityAttributes = mapped
    }

    /**
     * @param values Configure attributes for session affinity. Note that the property `drain_duration` is not currently supported as a rule override.
     */
    @JvmName("odqlmirufjvdribx")
    public suspend fun sessionAffinityAttributes(vararg values: LoadBalancerRuleOverrideSessionAffinityAttributeArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sessionAffinityAttributes = mapped
    }

    /**
     * @param value Time, in seconds, until this load balancer's session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of `82800` (23 hours) will be used unless `session_affinity_ttl` is explicitly set. Once the expiry time has been reached, subsequent requests may get sent to a different origin server. Valid values are between `1800` and `604800`.
     */
    @JvmName("xuyryqeovxepxevr")
    public suspend fun sessionAffinityTtl(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sessionAffinityTtl = mapped
    }

    /**
     * @param value The method the load balancer uses to determine the route to your origin. Value `off` uses `default_pool_ids`. Value `geo` uses `pop_pools`/`country_pools`/`region_pools`. For non-proxied requests, the `country` for `country_pools` is determined by `location_strategy`. Value `random` selects a pool randomly. Value `dynamic_latency` uses round trip time to select the closest pool in `default_pool_ids` (requires pool health checks). Value `proximity` uses the pools' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined by `location_strategy` for non-proxied requests. Value `least_outstanding_requests` selects a pool by taking into consideration `random_steering` weights, as well as each pool's number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others. Value `least_connections` selects a pool by taking into consideration `random_steering` weights, as well as each pool's number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections. Value `""` maps to `geo` if you use `pop_pools`/`country_pools`/`region_pools` otherwise `off`. Available values: `off`, `geo`, `dynamic_latency`, `random`, `proximity`, `least_outstanding_requests`, `least_connections`, `""` Defaults to `""`.
     */
    @JvmName("konnvjjqmmdalofu")
    public suspend fun steeringPolicy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.steeringPolicy = mapped
    }

    /**
     * @param value Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This cannot be set for proxied load balancers. Defaults to `30`.
     */
    @JvmName("fdlglivqqmihgqss")
    public suspend fun ttl(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ttl = mapped
    }

    internal fun build(): LoadBalancerRuleOverrideArgs = LoadBalancerRuleOverrideArgs(
        adaptiveRoutings = adaptiveRoutings,
        countryPools = countryPools,
        defaultPools = defaultPools,
        fallbackPool = fallbackPool,
        locationStrategies = locationStrategies,
        popPools = popPools,
        randomSteerings = randomSteerings,
        regionPools = regionPools,
        sessionAffinity = sessionAffinity,
        sessionAffinityAttributes = sessionAffinityAttributes,
        sessionAffinityTtl = sessionAffinityTtl,
        steeringPolicy = steeringPolicy,
        ttl = ttl,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy