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

com.pulumi.awsnative.lightsail.kotlin.LoadBalancerArgs.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: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.lightsail.kotlin

import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.awsnative.lightsail.LoadBalancerArgs.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.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Resource Type definition for AWS::Lightsail::LoadBalancer
 * @property attachedInstances The names of the instances attached to the load balancer.
 * @property healthCheckPath The path you provided to perform the load balancer health check. If you didn't specify a health check path, Lightsail uses the root path of your website (e.g., "/").
 * @property instancePort The instance port where you're creating your load balancer.
 * @property ipAddressType The IP address type for the load balancer. The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6. The default value is dualstack.
 * @property loadBalancerName The name of your load balancer.
 * @property sessionStickinessEnabled Configuration option to enable session stickiness.
 * @property sessionStickinessLbCookieDurationSeconds Configuration option to adjust session stickiness cookie duration parameter.
 * @property tags An array of key-value pairs to apply to this resource.
 * @property tlsPolicyName The name of the TLS policy to apply to the load balancer.
 */
public data class LoadBalancerArgs(
    public val attachedInstances: Output>? = null,
    public val healthCheckPath: Output? = null,
    public val instancePort: Output? = null,
    public val ipAddressType: Output? = null,
    public val loadBalancerName: Output? = null,
    public val sessionStickinessEnabled: Output? = null,
    public val sessionStickinessLbCookieDurationSeconds: Output? = null,
    public val tags: Output>? = null,
    public val tlsPolicyName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.lightsail.LoadBalancerArgs =
        com.pulumi.awsnative.lightsail.LoadBalancerArgs.builder()
            .attachedInstances(attachedInstances?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .healthCheckPath(healthCheckPath?.applyValue({ args0 -> args0 }))
            .instancePort(instancePort?.applyValue({ args0 -> args0 }))
            .ipAddressType(ipAddressType?.applyValue({ args0 -> args0 }))
            .loadBalancerName(loadBalancerName?.applyValue({ args0 -> args0 }))
            .sessionStickinessEnabled(sessionStickinessEnabled?.applyValue({ args0 -> args0 }))
            .sessionStickinessLbCookieDurationSeconds(
                sessionStickinessLbCookieDurationSeconds?.applyValue({ args0 ->
                    args0
                }),
            )
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .tlsPolicyName(tlsPolicyName?.applyValue({ args0 -> args0 })).build()
}

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

    private var healthCheckPath: Output? = null

    private var instancePort: Output? = null

    private var ipAddressType: Output? = null

    private var loadBalancerName: Output? = null

    private var sessionStickinessEnabled: Output? = null

    private var sessionStickinessLbCookieDurationSeconds: Output? = null

    private var tags: Output>? = null

    private var tlsPolicyName: Output? = null

    /**
     * @param value The names of the instances attached to the load balancer.
     */
    @JvmName("sbmncpcobklsjhvp")
    public suspend fun attachedInstances(`value`: Output>) {
        this.attachedInstances = value
    }

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

    /**
     * @param values The names of the instances attached to the load balancer.
     */
    @JvmName("jvhvkctkkjtoqnkm")
    public suspend fun attachedInstances(values: List>) {
        this.attachedInstances = Output.all(values)
    }

    /**
     * @param value The path you provided to perform the load balancer health check. If you didn't specify a health check path, Lightsail uses the root path of your website (e.g., "/").
     */
    @JvmName("wmxysliciiesnxyu")
    public suspend fun healthCheckPath(`value`: Output) {
        this.healthCheckPath = value
    }

    /**
     * @param value The instance port where you're creating your load balancer.
     */
    @JvmName("dxmtnyaukmlmilfm")
    public suspend fun instancePort(`value`: Output) {
        this.instancePort = value
    }

    /**
     * @param value The IP address type for the load balancer. The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6. The default value is dualstack.
     */
    @JvmName("qacbqhkklmmfrpmn")
    public suspend fun ipAddressType(`value`: Output) {
        this.ipAddressType = value
    }

    /**
     * @param value The name of your load balancer.
     */
    @JvmName("fthcwykwnbwdpubs")
    public suspend fun loadBalancerName(`value`: Output) {
        this.loadBalancerName = value
    }

    /**
     * @param value Configuration option to enable session stickiness.
     */
    @JvmName("vipglbuljcswnsnt")
    public suspend fun sessionStickinessEnabled(`value`: Output) {
        this.sessionStickinessEnabled = value
    }

    /**
     * @param value Configuration option to adjust session stickiness cookie duration parameter.
     */
    @JvmName("mxlxwdkrbtbkaasj")
    public suspend fun sessionStickinessLbCookieDurationSeconds(`value`: Output) {
        this.sessionStickinessLbCookieDurationSeconds = value
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     */
    @JvmName("pcdyfpgxhhdbeofq")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values An array of key-value pairs to apply to this resource.
     */
    @JvmName("kvmvhdnteopgtcum")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value The name of the TLS policy to apply to the load balancer.
     */
    @JvmName("aleiueyxyopdpwfn")
    public suspend fun tlsPolicyName(`value`: Output) {
        this.tlsPolicyName = value
    }

    /**
     * @param value The names of the instances attached to the load balancer.
     */
    @JvmName("gpiqrkegdwjdvgse")
    public suspend fun attachedInstances(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.attachedInstances = mapped
    }

    /**
     * @param values The names of the instances attached to the load balancer.
     */
    @JvmName("brdbcxggjvtkihee")
    public suspend fun attachedInstances(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.attachedInstances = mapped
    }

    /**
     * @param value The path you provided to perform the load balancer health check. If you didn't specify a health check path, Lightsail uses the root path of your website (e.g., "/").
     */
    @JvmName("rubrowdjjjytjhpu")
    public suspend fun healthCheckPath(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.healthCheckPath = mapped
    }

    /**
     * @param value The instance port where you're creating your load balancer.
     */
    @JvmName("mvrwyjkhudwwwqpl")
    public suspend fun instancePort(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instancePort = mapped
    }

    /**
     * @param value The IP address type for the load balancer. The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6. The default value is dualstack.
     */
    @JvmName("xdvoynvjtyhgovky")
    public suspend fun ipAddressType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipAddressType = mapped
    }

    /**
     * @param value The name of your load balancer.
     */
    @JvmName("quauuwtsdpwhhiim")
    public suspend fun loadBalancerName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.loadBalancerName = mapped
    }

    /**
     * @param value Configuration option to enable session stickiness.
     */
    @JvmName("fbaremvwsudurkhb")
    public suspend fun sessionStickinessEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sessionStickinessEnabled = mapped
    }

    /**
     * @param value Configuration option to adjust session stickiness cookie duration parameter.
     */
    @JvmName("deryrdguqptaditd")
    public suspend fun sessionStickinessLbCookieDurationSeconds(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sessionStickinessLbCookieDurationSeconds = mapped
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     */
    @JvmName("mvyilrbdvhynnejf")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("maesdyodlnmoobfx")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("upumcmffjtwdejit")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("fwslndijaiaxfaja")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values An array of key-value pairs to apply to this resource.
     */
    @JvmName("vrssgkobvuxiiofc")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The name of the TLS policy to apply to the load balancer.
     */
    @JvmName("rygwrmdkolndgykh")
    public suspend fun tlsPolicyName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tlsPolicyName = mapped
    }

    internal fun build(): LoadBalancerArgs = LoadBalancerArgs(
        attachedInstances = attachedInstances,
        healthCheckPath = healthCheckPath,
        instancePort = instancePort,
        ipAddressType = ipAddressType,
        loadBalancerName = loadBalancerName,
        sessionStickinessEnabled = sessionStickinessEnabled,
        sessionStickinessLbCookieDurationSeconds = sessionStickinessLbCookieDurationSeconds,
        tags = tags,
        tlsPolicyName = tlsPolicyName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy