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

com.pulumi.cloudflare.kotlin.outputs.LoadBalancerRuleOverride.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.outputs

import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List

/**
 *
 * @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 LoadBalancerRuleOverride(
    public val adaptiveRoutings: List? = null,
    public val countryPools: List? = null,
    public val defaultPools: List? = null,
    public val fallbackPool: String? = null,
    public val locationStrategies: List? = null,
    public val popPools: List? = null,
    public val randomSteerings: List? = null,
    public val regionPools: List? = null,
    public val sessionAffinity: String? = null,
    public val sessionAffinityAttributes: List? =
        null,
    public val sessionAffinityTtl: Int? = null,
    public val steeringPolicy: String? = null,
    public val ttl: Int? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.cloudflare.outputs.LoadBalancerRuleOverride): LoadBalancerRuleOverride = LoadBalancerRuleOverride(
            adaptiveRoutings = javaType.adaptiveRoutings().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.cloudflare.kotlin.outputs.LoadBalancerRuleOverrideAdaptiveRouting.Companion.toKotlin(args0)
                })
            }),
            countryPools = javaType.countryPools().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.cloudflare.kotlin.outputs.LoadBalancerRuleOverrideCountryPool.Companion.toKotlin(args0)
                })
            }),
            defaultPools = javaType.defaultPools().map({ args0 -> args0 }),
            fallbackPool = javaType.fallbackPool().map({ args0 -> args0 }).orElse(null),
            locationStrategies = javaType.locationStrategies().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.cloudflare.kotlin.outputs.LoadBalancerRuleOverrideLocationStrategy.Companion.toKotlin(args0)
                })
            }),
            popPools = javaType.popPools().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.cloudflare.kotlin.outputs.LoadBalancerRuleOverridePopPool.Companion.toKotlin(args0)
                })
            }),
            randomSteerings = javaType.randomSteerings().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.cloudflare.kotlin.outputs.LoadBalancerRuleOverrideRandomSteering.Companion.toKotlin(args0)
                })
            }),
            regionPools = javaType.regionPools().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.cloudflare.kotlin.outputs.LoadBalancerRuleOverrideRegionPool.Companion.toKotlin(args0)
                })
            }),
            sessionAffinity = javaType.sessionAffinity().map({ args0 -> args0 }).orElse(null),
            sessionAffinityAttributes = javaType.sessionAffinityAttributes().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.cloudflare.kotlin.outputs.LoadBalancerRuleOverrideSessionAffinityAttribute.Companion.toKotlin(args0)
                })
            }),
            sessionAffinityTtl = javaType.sessionAffinityTtl().map({ args0 -> args0 }).orElse(null),
            steeringPolicy = javaType.steeringPolicy().map({ args0 -> args0 }).orElse(null),
            ttl = javaType.ttl().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy