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

com.pulumi.azurenative.network.kotlin.inputs.OutboundRuleArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.network.kotlin.inputs

import com.pulumi.azurenative.network.inputs.OutboundRuleArgs.builder
import com.pulumi.azurenative.network.kotlin.enums.LoadBalancerOutboundRuleProtocol
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
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

/**
 * Outbound rule of the load balancer.
 * @property allocatedOutboundPorts The number of outbound ports to be used for NAT.
 * @property backendAddressPool A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
 * @property enableTcpReset Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
 * @property frontendIPConfigurations The Frontend IP addresses of the load balancer.
 * @property id Resource ID.
 * @property idleTimeoutInMinutes The timeout for the TCP idle connection.
 * @property name The name of the resource that is unique within the set of outbound rules used by the load balancer. This name can be used to access the resource.
 * @property protocol The protocol for the outbound rule in load balancer.
 */
public data class OutboundRuleArgs(
    public val allocatedOutboundPorts: Output? = null,
    public val backendAddressPool: Output,
    public val enableTcpReset: Output? = null,
    public val frontendIPConfigurations: Output>,
    public val id: Output? = null,
    public val idleTimeoutInMinutes: Output? = null,
    public val name: Output? = null,
    public val protocol: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.network.inputs.OutboundRuleArgs =
        com.pulumi.azurenative.network.inputs.OutboundRuleArgs.builder()
            .allocatedOutboundPorts(allocatedOutboundPorts?.applyValue({ args0 -> args0 }))
            .backendAddressPool(
                backendAddressPool.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .enableTcpReset(enableTcpReset?.applyValue({ args0 -> args0 }))
            .frontendIPConfigurations(
                frontendIPConfigurations.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .id(id?.applyValue({ args0 -> args0 }))
            .idleTimeoutInMinutes(idleTimeoutInMinutes?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .protocol(
                protocol.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            ).build()
}

/**
 * Builder for [OutboundRuleArgs].
 */
@PulumiTagMarker
public class OutboundRuleArgsBuilder internal constructor() {
    private var allocatedOutboundPorts: Output? = null

    private var backendAddressPool: Output? = null

    private var enableTcpReset: Output? = null

    private var frontendIPConfigurations: Output>? = null

    private var id: Output? = null

    private var idleTimeoutInMinutes: Output? = null

    private var name: Output? = null

    private var protocol: Output>? = null

    /**
     * @param value The number of outbound ports to be used for NAT.
     */
    @JvmName("sfhwcnwfkeirxpel")
    public suspend fun allocatedOutboundPorts(`value`: Output) {
        this.allocatedOutboundPorts = value
    }

    /**
     * @param value A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
     */
    @JvmName("lyjufnfkhqcqiuyo")
    public suspend fun backendAddressPool(`value`: Output) {
        this.backendAddressPool = value
    }

    /**
     * @param value Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
     */
    @JvmName("tdtqfoyhdpyxtieh")
    public suspend fun enableTcpReset(`value`: Output) {
        this.enableTcpReset = value
    }

    /**
     * @param value The Frontend IP addresses of the load balancer.
     */
    @JvmName("agogisinbxaphxga")
    public suspend fun frontendIPConfigurations(`value`: Output>) {
        this.frontendIPConfigurations = value
    }

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

    /**
     * @param values The Frontend IP addresses of the load balancer.
     */
    @JvmName("mkmdhrpvkwclguvn")
    public suspend fun frontendIPConfigurations(values: List>) {
        this.frontendIPConfigurations = Output.all(values)
    }

    /**
     * @param value Resource ID.
     */
    @JvmName("fmclskkoyrvisrfr")
    public suspend fun id(`value`: Output) {
        this.id = value
    }

    /**
     * @param value The timeout for the TCP idle connection.
     */
    @JvmName("qwrdtlabonoaxopj")
    public suspend fun idleTimeoutInMinutes(`value`: Output) {
        this.idleTimeoutInMinutes = value
    }

    /**
     * @param value The name of the resource that is unique within the set of outbound rules used by the load balancer. This name can be used to access the resource.
     */
    @JvmName("jtxudvclghbgqfva")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The protocol for the outbound rule in load balancer.
     */
    @JvmName("aqnidsaixisattxc")
    public suspend fun protocol(`value`: Output>) {
        this.protocol = value
    }

    /**
     * @param value The number of outbound ports to be used for NAT.
     */
    @JvmName("qxkhvkbuuaiotwta")
    public suspend fun allocatedOutboundPorts(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allocatedOutboundPorts = mapped
    }

    /**
     * @param value A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
     */
    @JvmName("lrjissedjqgdkhay")
    public suspend fun backendAddressPool(`value`: SubResourceArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.backendAddressPool = mapped
    }

    /**
     * @param argument A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
     */
    @JvmName("kymqhqytaaveysut")
    public suspend fun backendAddressPool(argument: suspend SubResourceArgsBuilder.() -> Unit) {
        val toBeMapped = SubResourceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.backendAddressPool = mapped
    }

    /**
     * @param value Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
     */
    @JvmName("ekvdxubvqxtuykix")
    public suspend fun enableTcpReset(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableTcpReset = mapped
    }

    /**
     * @param value The Frontend IP addresses of the load balancer.
     */
    @JvmName("qbwwkmhhmihkgvok")
    public suspend fun frontendIPConfigurations(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.frontendIPConfigurations = mapped
    }

    /**
     * @param argument The Frontend IP addresses of the load balancer.
     */
    @JvmName("taxldakashactwhd")
    public suspend fun frontendIPConfigurations(argument: List Unit>) {
        val toBeMapped = argument.toList().map { SubResourceArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.frontendIPConfigurations = mapped
    }

    /**
     * @param argument The Frontend IP addresses of the load balancer.
     */
    @JvmName("nptvaksstnmoooyf")
    public suspend fun frontendIPConfigurations(vararg argument: suspend SubResourceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { SubResourceArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.frontendIPConfigurations = mapped
    }

    /**
     * @param argument The Frontend IP addresses of the load balancer.
     */
    @JvmName("jksqpkmyhruvefjs")
    public suspend fun frontendIPConfigurations(argument: suspend SubResourceArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(SubResourceArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.frontendIPConfigurations = mapped
    }

    /**
     * @param values The Frontend IP addresses of the load balancer.
     */
    @JvmName("cxyepyrprxejhjgx")
    public suspend fun frontendIPConfigurations(vararg values: SubResourceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.frontendIPConfigurations = mapped
    }

    /**
     * @param value Resource ID.
     */
    @JvmName("lamccpmsbsnvwmbx")
    public suspend fun id(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.id = mapped
    }

    /**
     * @param value The timeout for the TCP idle connection.
     */
    @JvmName("cucbripekgpoljrp")
    public suspend fun idleTimeoutInMinutes(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.idleTimeoutInMinutes = mapped
    }

    /**
     * @param value The name of the resource that is unique within the set of outbound rules used by the load balancer. This name can be used to access the resource.
     */
    @JvmName("xyhkeiavnmvcxfge")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The protocol for the outbound rule in load balancer.
     */
    @JvmName("wgqhvnhpvygthqwl")
    public suspend fun protocol(`value`: Either) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.protocol = mapped
    }

    /**
     * @param value The protocol for the outbound rule in load balancer.
     */
    @JvmName("outruntxteinpeql")
    public fun protocol(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.protocol = mapped
    }

    /**
     * @param value The protocol for the outbound rule in load balancer.
     */
    @JvmName("ttlmyernalijtdce")
    public fun protocol(`value`: LoadBalancerOutboundRuleProtocol) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.protocol = mapped
    }

    internal fun build(): OutboundRuleArgs = OutboundRuleArgs(
        allocatedOutboundPorts = allocatedOutboundPorts,
        backendAddressPool = backendAddressPool ?: throw PulumiNullFieldException("backendAddressPool"),
        enableTcpReset = enableTcpReset,
        frontendIPConfigurations = frontendIPConfigurations ?: throw
            PulumiNullFieldException("frontendIPConfigurations"),
        id = id,
        idleTimeoutInMinutes = idleTimeoutInMinutes,
        name = name,
        protocol = protocol ?: throw PulumiNullFieldException("protocol"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy