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

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

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

package com.pulumi.azurenative.network.kotlin

import com.pulumi.azurenative.network.VpnConnectionArgs.builder
import com.pulumi.azurenative.network.kotlin.enums.VirtualNetworkGatewayConnectionProtocol
import com.pulumi.azurenative.network.kotlin.inputs.IpsecPolicyArgs
import com.pulumi.azurenative.network.kotlin.inputs.IpsecPolicyArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.RoutingConfigurationArgs
import com.pulumi.azurenative.network.kotlin.inputs.RoutingConfigurationArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.SubResourceArgs
import com.pulumi.azurenative.network.kotlin.inputs.SubResourceArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.TrafficSelectorPolicyArgs
import com.pulumi.azurenative.network.kotlin.inputs.TrafficSelectorPolicyArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.VpnSiteLinkConnectionArgs
import com.pulumi.azurenative.network.kotlin.inputs.VpnSiteLinkConnectionArgsBuilder
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.
 * Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-11-01.
 * Other available API versions: 2018-04-01, 2018-07-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01.
 * ## Example Usage
 * ### VpnConnectionPut
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var vpnConnection = new AzureNative.Network.VpnConnection("vpnConnection", new()
 *     {
 *         ConnectionName = "vpnConnection1",
 *         GatewayName = "gateway1",
 *         RemoteVpnSite = new AzureNative.Network.Inputs.SubResourceArgs
 *         {
 *             Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1",
 *         },
 *         ResourceGroupName = "rg1",
 *         RoutingConfiguration = new AzureNative.Network.Inputs.RoutingConfigurationArgs
 *         {
 *             AssociatedRouteTable = new AzureNative.Network.Inputs.SubResourceArgs
 *             {
 *                 Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1",
 *             },
 *             InboundRouteMap = new AzureNative.Network.Inputs.SubResourceArgs
 *             {
 *                 Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1",
 *             },
 *             OutboundRouteMap = new AzureNative.Network.Inputs.SubResourceArgs
 *             {
 *                 Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2",
 *             },
 *             PropagatedRouteTables = new AzureNative.Network.Inputs.PropagatedRouteTableArgs
 *             {
 *                 Ids = new[]
 *                 {
 *                     new AzureNative.Network.Inputs.SubResourceArgs
 *                     {
 *                         Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1",
 *                     },
 *                     new AzureNative.Network.Inputs.SubResourceArgs
 *                     {
 *                         Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable2",
 *                     },
 *                     new AzureNative.Network.Inputs.SubResourceArgs
 *                     {
 *                         Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable3",
 *                     },
 *                 },
 *                 Labels = new[]
 *                 {
 *                     "label1",
 *                     "label2",
 *                 },
 *             },
 *         },
 *         TrafficSelectorPolicies = new[] {},
 *         VpnLinkConnections = new[]
 *         {
 *             new AzureNative.Network.Inputs.VpnSiteLinkConnectionArgs
 *             {
 *                 ConnectionBandwidth = 200,
 *                 Name = "Connection-Link1",
 *                 SharedKey = "key",
 *                 UsePolicyBasedTrafficSelectors = false,
 *                 VpnConnectionProtocolType = AzureNative.Network.VirtualNetworkGatewayConnectionProtocol.IKEv2,
 *                 VpnLinkConnectionMode = AzureNative.Network.VpnLinkConnectionMode.Default,
 *                 VpnSiteLink = new AzureNative.Network.Inputs.SubResourceArgs
 *                 {
 *                     Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1/vpnSiteLinks/siteLink1",
 *                 },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := network.NewVpnConnection(ctx, "vpnConnection", &network.VpnConnectionArgs{
 * 			ConnectionName: pulumi.String("vpnConnection1"),
 * 			GatewayName:    pulumi.String("gateway1"),
 * 			RemoteVpnSite: &network.SubResourceArgs{
 * 				Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1"),
 * 			},
 * 			ResourceGroupName: pulumi.String("rg1"),
 * 			RoutingConfiguration: &network.RoutingConfigurationArgs{
 * 				AssociatedRouteTable: &network.SubResourceArgs{
 * 					Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1"),
 * 				},
 * 				InboundRouteMap: &network.SubResourceArgs{
 * 					Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1"),
 * 				},
 * 				OutboundRouteMap: &network.SubResourceArgs{
 * 					Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2"),
 * 				},
 * 				PropagatedRouteTables: &network.PropagatedRouteTableArgs{
 * 					Ids: network.SubResourceArray{
 * 						&network.SubResourceArgs{
 * 							Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1"),
 * 						},
 * 						&network.SubResourceArgs{
 * 							Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable2"),
 * 						},
 * 						&network.SubResourceArgs{
 * 							Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable3"),
 * 						},
 * 					},
 * 					Labels: pulumi.StringArray{
 * 						pulumi.String("label1"),
 * 						pulumi.String("label2"),
 * 					},
 * 				},
 * 			},
 * 			TrafficSelectorPolicies: network.TrafficSelectorPolicyArray{},
 * 			VpnLinkConnections: network.VpnSiteLinkConnectionArray{
 * 				&network.VpnSiteLinkConnectionArgs{
 * 					ConnectionBandwidth:            pulumi.Int(200),
 * 					Name:                           pulumi.String("Connection-Link1"),
 * 					SharedKey:                      pulumi.String("key"),
 * 					UsePolicyBasedTrafficSelectors: pulumi.Bool(false),
 * 					VpnConnectionProtocolType:      pulumi.String(network.VirtualNetworkGatewayConnectionProtocolIKEv2),
 * 					VpnLinkConnectionMode:          pulumi.String(network.VpnLinkConnectionModeDefault),
 * 					VpnSiteLink: &network.SubResourceArgs{
 * 						Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1/vpnSiteLinks/siteLink1"),
 * 					},
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.network.VpnConnection;
 * import com.pulumi.azurenative.network.VpnConnectionArgs;
 * import com.pulumi.azurenative.network.inputs.SubResourceArgs;
 * import com.pulumi.azurenative.network.inputs.RoutingConfigurationArgs;
 * import com.pulumi.azurenative.network.inputs.PropagatedRouteTableArgs;
 * import com.pulumi.azurenative.network.inputs.VpnSiteLinkConnectionArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var vpnConnection = new VpnConnection("vpnConnection", VpnConnectionArgs.builder()
 *             .connectionName("vpnConnection1")
 *             .gatewayName("gateway1")
 *             .remoteVpnSite(SubResourceArgs.builder()
 *                 .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1")
 *                 .build())
 *             .resourceGroupName("rg1")
 *             .routingConfiguration(RoutingConfigurationArgs.builder()
 *                 .associatedRouteTable(SubResourceArgs.builder()
 *                     .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1")
 *                     .build())
 *                 .inboundRouteMap(SubResourceArgs.builder()
 *                     .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1")
 *                     .build())
 *                 .outboundRouteMap(SubResourceArgs.builder()
 *                     .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2")
 *                     .build())
 *                 .propagatedRouteTables(PropagatedRouteTableArgs.builder()
 *                     .ids(
 *                         SubResourceArgs.builder()
 *                             .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1")
 *                             .build(),
 *                         SubResourceArgs.builder()
 *                             .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable2")
 *                             .build(),
 *                         SubResourceArgs.builder()
 *                             .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable3")
 *                             .build())
 *                     .labels(
 *                         "label1",
 *                         "label2")
 *                     .build())
 *                 .build())
 *             .trafficSelectorPolicies()
 *             .vpnLinkConnections(VpnSiteLinkConnectionArgs.builder()
 *                 .connectionBandwidth(200)
 *                 .name("Connection-Link1")
 *                 .sharedKey("key")
 *                 .usePolicyBasedTrafficSelectors(false)
 *                 .vpnConnectionProtocolType("IKEv2")
 *                 .vpnLinkConnectionMode("Default")
 *                 .vpnSiteLink(SubResourceArgs.builder()
 *                     .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1/vpnSiteLinks/siteLink1")
 *                     .build())
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:network:VpnConnection vpnConnection1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}
 * ```
 * @property connectionBandwidth Expected bandwidth in MBPS.
 * @property connectionName The name of the connection.
 * @property dpdTimeoutSeconds DPD timeout in seconds for vpn connection.
 * @property enableBgp EnableBgp flag.
 * @property enableInternetSecurity Enable internet security.
 * @property enableRateLimiting EnableBgp flag.
 * @property gatewayName The name of the gateway.
 * @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 resourceGroupName The resource group name of the VpnGateway.
 * @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 connectionName: Output? = null,
    public val dpdTimeoutSeconds: Output? = null,
    public val enableBgp: Output? = null,
    public val enableInternetSecurity: Output? = null,
    public val enableRateLimiting: Output? = null,
    public val gatewayName: Output? = null,
    public val id: Output? = null,
    public val ipsecPolicies: Output>? = null,
    public val name: Output? = null,
    public val remoteVpnSite: Output? = null,
    public val resourceGroupName: 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.VpnConnectionArgs =
        com.pulumi.azurenative.network.VpnConnectionArgs.builder()
            .connectionBandwidth(connectionBandwidth?.applyValue({ args0 -> args0 }))
            .connectionName(connectionName?.applyValue({ args0 -> args0 }))
            .dpdTimeoutSeconds(dpdTimeoutSeconds?.applyValue({ args0 -> args0 }))
            .enableBgp(enableBgp?.applyValue({ args0 -> args0 }))
            .enableInternetSecurity(enableInternetSecurity?.applyValue({ args0 -> args0 }))
            .enableRateLimiting(enableRateLimiting?.applyValue({ args0 -> args0 }))
            .gatewayName(gatewayName?.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() }) }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .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 connectionName: Output? = null

    private var dpdTimeoutSeconds: Output? = null

    private var enableBgp: Output? = null

    private var enableInternetSecurity: Output? = null

    private var enableRateLimiting: Output? = null

    private var gatewayName: Output? = null

    private var id: Output? = null

    private var ipsecPolicies: Output>? = null

    private var name: Output? = null

    private var remoteVpnSite: Output? = null

    private var resourceGroupName: 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("pbahosryfltbmyfp")
    public suspend fun connectionBandwidth(`value`: Output) {
        this.connectionBandwidth = value
    }

    /**
     * @param value The name of the connection.
     */
    @JvmName("waepgidmguepvqwc")
    public suspend fun connectionName(`value`: Output) {
        this.connectionName = value
    }

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

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

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

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

    /**
     * @param value The name of the gateway.
     */
    @JvmName("vgppsciigxfrywit")
    public suspend fun gatewayName(`value`: Output) {
        this.gatewayName = value
    }

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

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

    @JvmName("ppbajxjfpwnjwcci")
    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("iaayeidaflqrljtv")
    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("yrvlbxjorgsoglhg")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

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

    /**
     * @param value The resource group name of the VpnGateway.
     */
    @JvmName("gvvtnppokdjvldiw")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

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

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

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

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

    @JvmName("vibjksocsfwqhddj")
    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("ljoqjfoixxqioycw")
    public suspend fun trafficSelectorPolicies(values: List>) {
        this.trafficSelectorPolicies = Output.all(values)
    }

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

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

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

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

    @JvmName("jfxgifvoikjmmxdn")
    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("jfhanldroptkqjtm")
    public suspend fun vpnLinkConnections(values: List>) {
        this.vpnLinkConnections = Output.all(values)
    }

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

    /**
     * @param value The name of the connection.
     */
    @JvmName("jeggaxaibbjnttjj")
    public suspend fun connectionName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.connectionName = mapped
    }

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

    /**
     * @param value EnableBgp flag.
     */
    @JvmName("kfiplthwehkwqfph")
    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("fdpnojssrkyryoqk")
    public suspend fun enableInternetSecurity(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableInternetSecurity = mapped
    }

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

    /**
     * @param value The name of the gateway.
     */
    @JvmName("dxytdxeynstwaiet")
    public suspend fun gatewayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.gatewayName = mapped
    }

    /**
     * @param value Resource ID.
     */
    @JvmName("puhdmrqgouucaeqk")
    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("ksseqhwuuswwvdiq")
    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("niayhpcnbuaiilfq")
    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("rgdhhvcpigtniaou")
    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("asrcbuepfnotdngf")
    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("bjeihpqocaomqbvm")
    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("pfmmiloyecdiunig")
    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("wcwmmtdgoqyimhwy")
    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("ubngngojjnlfpsun")
    public suspend fun remoteVpnSite(argument: suspend SubResourceArgsBuilder.() -> Unit) {
        val toBeMapped = SubResourceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.remoteVpnSite = mapped
    }

    /**
     * @param value The resource group name of the VpnGateway.
     */
    @JvmName("xwtjiolcivsawqec")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value The Routing Configuration indicating the associated and propagated route tables on this connection.
     */
    @JvmName("wbkrtirnqculoleo")
    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("hadolchnpvpjqvnm")
    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("ynpfogiujjnydslm")
    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("eocgjxsejjjmtuue")
    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("ukcgvnvgkcrjjhqg")
    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("dbjbrnthtmhhxiaf")
    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("vswnafppxvhljmue")
    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("oofxgdyuclckskmu")
    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("cmmvvrmupipyqgex")
    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("fyjlmcptibxkvcpb")
    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("xhmotqwyjoinmjbg")
    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("hdccyjreuswdchnq")
    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("mlavmvjgfmhdaabh")
    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("nxapqhnbtitwuqln")
    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("ppychtiycvhsuclc")
    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("enrujdmhdehxhmer")
    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("kmmuoowkvjlejtle")
    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("aegxotpgxvhghgas")
    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("xxvpytovpukqynhk")
    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,
        connectionName = connectionName,
        dpdTimeoutSeconds = dpdTimeoutSeconds,
        enableBgp = enableBgp,
        enableInternetSecurity = enableInternetSecurity,
        enableRateLimiting = enableRateLimiting,
        gatewayName = gatewayName,
        id = id,
        ipsecPolicies = ipsecPolicies,
        name = name,
        remoteVpnSite = remoteVpnSite,
        resourceGroupName = resourceGroupName,
        routingConfiguration = routingConfiguration,
        routingWeight = routingWeight,
        sharedKey = sharedKey,
        trafficSelectorPolicies = trafficSelectorPolicies,
        useLocalAzureIpAddress = useLocalAzureIpAddress,
        usePolicyBasedTrafficSelectors = usePolicyBasedTrafficSelectors,
        vpnConnectionProtocolType = vpnConnectionProtocolType,
        vpnLinkConnections = vpnLinkConnections,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy