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

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

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

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

import com.pulumi.azurenative.network.inputs.VpnConnectionArgs.builder
import com.pulumi.azurenative.network.kotlin.enums.VirtualNetworkGatewayConnectionProtocol
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.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

/**
 * VpnConnection Resource.
 * @property connectionBandwidth Expected bandwidth in MBPS.
 * @property dpdTimeoutSeconds DPD timeout in seconds for vpn connection.
 * @property enableBgp EnableBgp flag.
 * @property enableInternetSecurity Enable internet security.
 * @property enableRateLimiting EnableBgp flag.
 * @property id Resource ID.
 * @property ipsecPolicies The IPSec Policies to be considered by this connection.
 * @property name The name of the resource that is unique within a resource group. This name can be used to access the resource.
 * @property remoteVpnSite Id of the connected vpn site.
 * @property routingConfiguration The Routing Configuration indicating the associated and propagated route tables on this connection.
 * @property routingWeight Routing weight for vpn connection.
 * @property sharedKey SharedKey for the vpn connection.
 * @property trafficSelectorPolicies The Traffic Selector Policies to be considered by this connection.
 * @property useLocalAzureIpAddress Use local azure ip to initiate connection.
 * @property usePolicyBasedTrafficSelectors Enable policy-based traffic selectors.
 * @property vpnConnectionProtocolType Connection protocol used for this connection.
 * @property vpnLinkConnections List of all vpn site link connections to the gateway.
 */
public data class VpnConnectionArgs(
    public val connectionBandwidth: Output? = null,
    public val dpdTimeoutSeconds: Output? = null,
    public val enableBgp: Output? = null,
    public val enableInternetSecurity: Output? = null,
    public val enableRateLimiting: Output? = null,
    public val id: Output? = null,
    public val ipsecPolicies: Output>? = null,
    public val name: Output? = null,
    public val remoteVpnSite: Output? = null,
    public val routingConfiguration: Output? = null,
    public val routingWeight: Output? = null,
    public val sharedKey: Output? = null,
    public val trafficSelectorPolicies: Output>? = null,
    public val useLocalAzureIpAddress: Output? = null,
    public val usePolicyBasedTrafficSelectors: Output? = null,
    public val vpnConnectionProtocolType: Output>? = null,
    public val vpnLinkConnections: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.network.inputs.VpnConnectionArgs =
        com.pulumi.azurenative.network.inputs.VpnConnectionArgs.builder()
            .connectionBandwidth(connectionBandwidth?.applyValue({ args0 -> args0 }))
            .dpdTimeoutSeconds(dpdTimeoutSeconds?.applyValue({ args0 -> args0 }))
            .enableBgp(enableBgp?.applyValue({ args0 -> args0 }))
            .enableInternetSecurity(enableInternetSecurity?.applyValue({ args0 -> args0 }))
            .enableRateLimiting(enableRateLimiting?.applyValue({ args0 -> args0 }))
            .id(id?.applyValue({ args0 -> args0 }))
            .ipsecPolicies(
                ipsecPolicies?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .name(name?.applyValue({ args0 -> args0 }))
            .remoteVpnSite(remoteVpnSite?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .routingConfiguration(
                routingConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .routingWeight(routingWeight?.applyValue({ args0 -> args0 }))
            .sharedKey(sharedKey?.applyValue({ args0 -> args0 }))
            .trafficSelectorPolicies(
                trafficSelectorPolicies?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .useLocalAzureIpAddress(useLocalAzureIpAddress?.applyValue({ args0 -> args0 }))
            .usePolicyBasedTrafficSelectors(usePolicyBasedTrafficSelectors?.applyValue({ args0 -> args0 }))
            .vpnConnectionProtocolType(
                vpnConnectionProtocolType?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            )
            .vpnLinkConnections(
                vpnLinkConnections?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            ).build()
}

/**
 * Builder for [VpnConnectionArgs].
 */
@PulumiTagMarker
public class VpnConnectionArgsBuilder internal constructor() {
    private var connectionBandwidth: Output? = null

    private var dpdTimeoutSeconds: Output? = null

    private var enableBgp: Output? = null

    private var enableInternetSecurity: Output? = null

    private var enableRateLimiting: Output? = null

    private var id: Output? = null

    private var ipsecPolicies: Output>? = null

    private var name: Output? = null

    private var remoteVpnSite: Output? = null

    private var routingConfiguration: Output? = null

    private var routingWeight: Output? = null

    private var sharedKey: Output? = null

    private var trafficSelectorPolicies: Output>? = null

    private var useLocalAzureIpAddress: Output? = null

    private var usePolicyBasedTrafficSelectors: Output? = null

    private var vpnConnectionProtocolType:
        Output>? = null

    private var vpnLinkConnections: Output>? = null

    /**
     * @param value Expected bandwidth in MBPS.
     */
    @JvmName("sbinmtuvwrclowku")
    public suspend fun connectionBandwidth(`value`: Output) {
        this.connectionBandwidth = value
    }

    /**
     * @param value DPD timeout in seconds for vpn connection.
     */
    @JvmName("exnukykfgdxhqrmb")
    public suspend fun dpdTimeoutSeconds(`value`: Output) {
        this.dpdTimeoutSeconds = value
    }

    /**
     * @param value EnableBgp flag.
     */
    @JvmName("pqnsrtipvxxcfmhl")
    public suspend fun enableBgp(`value`: Output) {
        this.enableBgp = value
    }

    /**
     * @param value Enable internet security.
     */
    @JvmName("vllqmtcrleptnybu")
    public suspend fun enableInternetSecurity(`value`: Output) {
        this.enableInternetSecurity = value
    }

    /**
     * @param value EnableBgp flag.
     */
    @JvmName("qbxxymmvcrovvtad")
    public suspend fun enableRateLimiting(`value`: Output) {
        this.enableRateLimiting = value
    }

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

    /**
     * @param value The IPSec Policies to be considered by this connection.
     */
    @JvmName("gmjqnhajwctqmyab")
    public suspend fun ipsecPolicies(`value`: Output>) {
        this.ipsecPolicies = value
    }

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

    /**
     * @param values The IPSec Policies to be considered by this connection.
     */
    @JvmName("vosdlksyokoiiesb")
    public suspend fun ipsecPolicies(values: List>) {
        this.ipsecPolicies = Output.all(values)
    }

    /**
     * @param value The name of the resource that is unique within a resource group. This name can be used to access the resource.
     */
    @JvmName("vhkutcujdqrmfdom")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Id of the connected vpn site.
     */
    @JvmName("sgxdwxmvvpcoahsw")
    public suspend fun remoteVpnSite(`value`: Output) {
        this.remoteVpnSite = value
    }

    /**
     * @param value The Routing Configuration indicating the associated and propagated route tables on this connection.
     */
    @JvmName("bbajbjoxkuqwsfcg")
    public suspend fun routingConfiguration(`value`: Output) {
        this.routingConfiguration = value
    }

    /**
     * @param value Routing weight for vpn connection.
     */
    @JvmName("cvbgucnkfqmynegr")
    public suspend fun routingWeight(`value`: Output) {
        this.routingWeight = value
    }

    /**
     * @param value SharedKey for the vpn connection.
     */
    @JvmName("usqvgsouaeqmngpn")
    public suspend fun sharedKey(`value`: Output) {
        this.sharedKey = value
    }

    /**
     * @param value The Traffic Selector Policies to be considered by this connection.
     */
    @JvmName("lyvadhoserjeiekw")
    public suspend fun trafficSelectorPolicies(`value`: Output>) {
        this.trafficSelectorPolicies = value
    }

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

    /**
     * @param values The Traffic Selector Policies to be considered by this connection.
     */
    @JvmName("tdvtiagkbwhypkbq")
    public suspend fun trafficSelectorPolicies(values: List>) {
        this.trafficSelectorPolicies = Output.all(values)
    }

    /**
     * @param value Use local azure ip to initiate connection.
     */
    @JvmName("gsosyikpglcunfns")
    public suspend fun useLocalAzureIpAddress(`value`: Output) {
        this.useLocalAzureIpAddress = value
    }

    /**
     * @param value Enable policy-based traffic selectors.
     */
    @JvmName("ggoicovpcysqrmxa")
    public suspend fun usePolicyBasedTrafficSelectors(`value`: Output) {
        this.usePolicyBasedTrafficSelectors = value
    }

    /**
     * @param value Connection protocol used for this connection.
     */
    @JvmName("rjcrgjrkcoyatydg")
    public suspend fun vpnConnectionProtocolType(`value`: Output>) {
        this.vpnConnectionProtocolType = value
    }

    /**
     * @param value List of all vpn site link connections to the gateway.
     */
    @JvmName("wcsggdhbmbjognpx")
    public suspend fun vpnLinkConnections(`value`: Output>) {
        this.vpnLinkConnections = value
    }

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

    /**
     * @param values List of all vpn site link connections to the gateway.
     */
    @JvmName("vbugixtkqwsvlshh")
    public suspend fun vpnLinkConnections(values: List>) {
        this.vpnLinkConnections = Output.all(values)
    }

    /**
     * @param value Expected bandwidth in MBPS.
     */
    @JvmName("sstpkysvmjjmbjlx")
    public suspend fun connectionBandwidth(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.connectionBandwidth = mapped
    }

    /**
     * @param value DPD timeout in seconds for vpn connection.
     */
    @JvmName("irtmtrhhkpbinthn")
    public suspend fun dpdTimeoutSeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dpdTimeoutSeconds = mapped
    }

    /**
     * @param value EnableBgp flag.
     */
    @JvmName("omjilvaciwpslyif")
    public suspend fun enableBgp(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableBgp = mapped
    }

    /**
     * @param value Enable internet security.
     */
    @JvmName("nxpjrwhemnceklhw")
    public suspend fun enableInternetSecurity(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableInternetSecurity = mapped
    }

    /**
     * @param value EnableBgp flag.
     */
    @JvmName("fhqfcutldupbqufx")
    public suspend fun enableRateLimiting(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableRateLimiting = mapped
    }

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

    /**
     * @param value The IPSec Policies to be considered by this connection.
     */
    @JvmName("egqdavvshpdtggxj")
    public suspend fun ipsecPolicies(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipsecPolicies = mapped
    }

    /**
     * @param argument The IPSec Policies to be considered by this connection.
     */
    @JvmName("sxvpedlbctubhbjx")
    public suspend fun ipsecPolicies(argument: List Unit>) {
        val toBeMapped = argument.toList().map { IpsecPolicyArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.ipsecPolicies = mapped
    }

    /**
     * @param argument The IPSec Policies to be considered by this connection.
     */
    @JvmName("xiwrkvvcdccuvcqc")
    public suspend fun ipsecPolicies(vararg argument: suspend IpsecPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { IpsecPolicyArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.ipsecPolicies = mapped
    }

    /**
     * @param argument The IPSec Policies to be considered by this connection.
     */
    @JvmName("lcsmvddktirpduwe")
    public suspend fun ipsecPolicies(argument: suspend IpsecPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(IpsecPolicyArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.ipsecPolicies = mapped
    }

    /**
     * @param values The IPSec Policies to be considered by this connection.
     */
    @JvmName("edwsjfwxsxuepltt")
    public suspend fun ipsecPolicies(vararg values: IpsecPolicyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipsecPolicies = mapped
    }

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

    /**
     * @param value Id of the connected vpn site.
     */
    @JvmName("fxwvdserbvneygra")
    public suspend fun remoteVpnSite(`value`: SubResourceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.remoteVpnSite = mapped
    }

    /**
     * @param argument Id of the connected vpn site.
     */
    @JvmName("ybbegvksfwivhurd")
    public suspend fun remoteVpnSite(argument: suspend SubResourceArgsBuilder.() -> Unit) {
        val toBeMapped = SubResourceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.remoteVpnSite = mapped
    }

    /**
     * @param value The Routing Configuration indicating the associated and propagated route tables on this connection.
     */
    @JvmName("rksvmcciiclewsih")
    public suspend fun routingConfiguration(`value`: RoutingConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.routingConfiguration = mapped
    }

    /**
     * @param argument The Routing Configuration indicating the associated and propagated route tables on this connection.
     */
    @JvmName("tulotqqsxbsjvawk")
    public suspend fun routingConfiguration(argument: suspend RoutingConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = RoutingConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.routingConfiguration = mapped
    }

    /**
     * @param value Routing weight for vpn connection.
     */
    @JvmName("oonitheqngtiasxs")
    public suspend fun routingWeight(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.routingWeight = mapped
    }

    /**
     * @param value SharedKey for the vpn connection.
     */
    @JvmName("widionncphrkwtfr")
    public suspend fun sharedKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sharedKey = mapped
    }

    /**
     * @param value The Traffic Selector Policies to be considered by this connection.
     */
    @JvmName("oxgjsleuwwyvkopq")
    public suspend fun trafficSelectorPolicies(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.trafficSelectorPolicies = mapped
    }

    /**
     * @param argument The Traffic Selector Policies to be considered by this connection.
     */
    @JvmName("wtabugtisyqgiwlg")
    public suspend fun trafficSelectorPolicies(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TrafficSelectorPolicyArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.trafficSelectorPolicies = mapped
    }

    /**
     * @param argument The Traffic Selector Policies to be considered by this connection.
     */
    @JvmName("fbeliunfjngxhero")
    public suspend fun trafficSelectorPolicies(vararg argument: suspend TrafficSelectorPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TrafficSelectorPolicyArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.trafficSelectorPolicies = mapped
    }

    /**
     * @param argument The Traffic Selector Policies to be considered by this connection.
     */
    @JvmName("tbfwubucorgocmjp")
    public suspend fun trafficSelectorPolicies(argument: suspend TrafficSelectorPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TrafficSelectorPolicyArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.trafficSelectorPolicies = mapped
    }

    /**
     * @param values The Traffic Selector Policies to be considered by this connection.
     */
    @JvmName("dsjyhrxqwujtausu")
    public suspend fun trafficSelectorPolicies(vararg values: TrafficSelectorPolicyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.trafficSelectorPolicies = mapped
    }

    /**
     * @param value Use local azure ip to initiate connection.
     */
    @JvmName("suvqimdpqtalbpwl")
    public suspend fun useLocalAzureIpAddress(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.useLocalAzureIpAddress = mapped
    }

    /**
     * @param value Enable policy-based traffic selectors.
     */
    @JvmName("olvgicuapfcqwumk")
    public suspend fun usePolicyBasedTrafficSelectors(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.usePolicyBasedTrafficSelectors = mapped
    }

    /**
     * @param value Connection protocol used for this connection.
     */
    @JvmName("nxktrldhyftybtql")
    public suspend fun vpnConnectionProtocolType(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vpnConnectionProtocolType = mapped
    }

    /**
     * @param value Connection protocol used for this connection.
     */
    @JvmName("wtvqavfjjyymgshg")
    public fun vpnConnectionProtocolType(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.vpnConnectionProtocolType = mapped
    }

    /**
     * @param value Connection protocol used for this connection.
     */
    @JvmName("vmpxyntnjrckbnku")
    public fun vpnConnectionProtocolType(`value`: VirtualNetworkGatewayConnectionProtocol) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.vpnConnectionProtocolType = mapped
    }

    /**
     * @param value List of all vpn site link connections to the gateway.
     */
    @JvmName("lmreftuqywtmfiun")
    public suspend fun vpnLinkConnections(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vpnLinkConnections = mapped
    }

    /**
     * @param argument List of all vpn site link connections to the gateway.
     */
    @JvmName("dwsgpdptpbnmxghh")
    public suspend fun vpnLinkConnections(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            VpnSiteLinkConnectionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.vpnLinkConnections = mapped
    }

    /**
     * @param argument List of all vpn site link connections to the gateway.
     */
    @JvmName("ifhphokdtytxmskn")
    public suspend fun vpnLinkConnections(vararg argument: suspend VpnSiteLinkConnectionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            VpnSiteLinkConnectionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.vpnLinkConnections = mapped
    }

    /**
     * @param argument List of all vpn site link connections to the gateway.
     */
    @JvmName("culehamowsxvlymk")
    public suspend fun vpnLinkConnections(argument: suspend VpnSiteLinkConnectionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(VpnSiteLinkConnectionArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.vpnLinkConnections = mapped
    }

    /**
     * @param values List of all vpn site link connections to the gateway.
     */
    @JvmName("ievodakcyrrwpygu")
    public suspend fun vpnLinkConnections(vararg values: VpnSiteLinkConnectionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.vpnLinkConnections = mapped
    }

    internal fun build(): VpnConnectionArgs = VpnConnectionArgs(
        connectionBandwidth = connectionBandwidth,
        dpdTimeoutSeconds = dpdTimeoutSeconds,
        enableBgp = enableBgp,
        enableInternetSecurity = enableInternetSecurity,
        enableRateLimiting = enableRateLimiting,
        id = id,
        ipsecPolicies = ipsecPolicies,
        name = name,
        remoteVpnSite = remoteVpnSite,
        routingConfiguration = routingConfiguration,
        routingWeight = routingWeight,
        sharedKey = sharedKey,
        trafficSelectorPolicies = trafficSelectorPolicies,
        useLocalAzureIpAddress = useLocalAzureIpAddress,
        usePolicyBasedTrafficSelectors = usePolicyBasedTrafficSelectors,
        vpnConnectionProtocolType = vpnConnectionProtocolType,
        vpnLinkConnections = vpnLinkConnections,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy