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

com.pulumi.cloudflare.kotlin.outputs.LoadBalancerPoolOrigin.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.Boolean
import kotlin.Double
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List

/**
 *
 * @property address The IP address (IPv4 or IPv6) of the origin, or the publicly addressable hostname.
 * @property enabled Whether this origin is enabled. Disabled origins will not receive traffic and are excluded from health checks. Defaults to `true`.
 * @property headers HTTP request headers.
 * @property name A human-identifiable name for the origin.
 * @property virtualNetworkId The virtual network subnet ID the origin belongs in. Virtual network must also belong to the account.
 * @property weight The weight (0.01 - 1.00) of this origin, relative to other origins in the pool. Equal values mean equal weighting. A weight of 0 means traffic will not be sent to this origin, but health is still checked. When `origin_steering.policy="least_outstanding_requests"`, weight is used to scale the origin's outstanding requests. When `origin_steering.policy="least_connections"`, weight is used to scale the origin's open connections. Defaults to `1`.
 */
public data class LoadBalancerPoolOrigin(
    public val address: String,
    public val enabled: Boolean? = null,
    public val headers: List? = null,
    public val name: String,
    public val virtualNetworkId: String? = null,
    public val weight: Double? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.cloudflare.outputs.LoadBalancerPoolOrigin): LoadBalancerPoolOrigin = LoadBalancerPoolOrigin(
            address = javaType.address(),
            enabled = javaType.enabled().map({ args0 -> args0 }).orElse(null),
            headers = javaType.headers().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.cloudflare.kotlin.outputs.LoadBalancerPoolOriginHeader.Companion.toKotlin(args0)
                })
            }),
            name = javaType.name(),
            virtualNetworkId = javaType.virtualNetworkId().map({ args0 -> args0 }).orElse(null),
            weight = javaType.weight().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy