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

com.pulumi.azure.network.kotlin.VirtualNetworkGatewayConnectionArgs.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: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.network.kotlin

import com.pulumi.azure.network.VirtualNetworkGatewayConnectionArgs.builder
import com.pulumi.azure.network.kotlin.inputs.VirtualNetworkGatewayConnectionCustomBgpAddressesArgs
import com.pulumi.azure.network.kotlin.inputs.VirtualNetworkGatewayConnectionCustomBgpAddressesArgsBuilder
import com.pulumi.azure.network.kotlin.inputs.VirtualNetworkGatewayConnectionIpsecPolicyArgs
import com.pulumi.azure.network.kotlin.inputs.VirtualNetworkGatewayConnectionIpsecPolicyArgsBuilder
import com.pulumi.azure.network.kotlin.inputs.VirtualNetworkGatewayConnectionTrafficSelectorPolicyArgs
import com.pulumi.azure.network.kotlin.inputs.VirtualNetworkGatewayConnectionTrafficSelectorPolicyArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a connection in an existing Virtual Network Gateway.
 * ## Example Usage
 * ### Site-to-Site connection
 * The following example shows a connection between an Azure virtual network
 * and an on-premises VPN device and network.
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "test",
 *     location: "West US",
 * });
 * const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
 *     name: "test",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     addressSpaces: ["10.0.0.0/16"],
 * });
 * const exampleSubnet = new azure.network.Subnet("example", {
 *     name: "GatewaySubnet",
 *     resourceGroupName: example.name,
 *     virtualNetworkName: exampleVirtualNetwork.name,
 *     addressPrefixes: ["10.0.1.0/24"],
 * });
 * const onpremise = new azure.network.LocalNetworkGateway("onpremise", {
 *     name: "onpremise",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     gatewayAddress: "168.62.225.23",
 *     addressSpaces: ["10.1.1.0/24"],
 * });
 * const examplePublicIp = new azure.network.PublicIp("example", {
 *     name: "test",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     allocationMethod: "Dynamic",
 * });
 * const exampleVirtualNetworkGateway = new azure.network.VirtualNetworkGateway("example", {
 *     name: "test",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     type: "Vpn",
 *     vpnType: "RouteBased",
 *     activeActive: false,
 *     enableBgp: false,
 *     sku: "Basic",
 *     ipConfigurations: [{
 *         publicIpAddressId: examplePublicIp.id,
 *         privateIpAddressAllocation: "Dynamic",
 *         subnetId: exampleSubnet.id,
 *     }],
 * });
 * const onpremiseVirtualNetworkGatewayConnection = new azure.network.VirtualNetworkGatewayConnection("onpremise", {
 *     name: "onpremise",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     type: "IPsec",
 *     virtualNetworkGatewayId: exampleVirtualNetworkGateway.id,
 *     localNetworkGatewayId: onpremise.id,
 *     sharedKey: "4-v3ry-53cr37-1p53c-5h4r3d-k3y",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="test",
 *     location="West US")
 * example_virtual_network = azure.network.VirtualNetwork("example",
 *     name="test",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     address_spaces=["10.0.0.0/16"])
 * example_subnet = azure.network.Subnet("example",
 *     name="GatewaySubnet",
 *     resource_group_name=example.name,
 *     virtual_network_name=example_virtual_network.name,
 *     address_prefixes=["10.0.1.0/24"])
 * onpremise = azure.network.LocalNetworkGateway("onpremise",
 *     name="onpremise",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     gateway_address="168.62.225.23",
 *     address_spaces=["10.1.1.0/24"])
 * example_public_ip = azure.network.PublicIp("example",
 *     name="test",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     allocation_method="Dynamic")
 * example_virtual_network_gateway = azure.network.VirtualNetworkGateway("example",
 *     name="test",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     type="Vpn",
 *     vpn_type="RouteBased",
 *     active_active=False,
 *     enable_bgp=False,
 *     sku="Basic",
 *     ip_configurations=[azure.network.VirtualNetworkGatewayIpConfigurationArgs(
 *         public_ip_address_id=example_public_ip.id,
 *         private_ip_address_allocation="Dynamic",
 *         subnet_id=example_subnet.id,
 *     )])
 * onpremise_virtual_network_gateway_connection = azure.network.VirtualNetworkGatewayConnection("onpremise",
 *     name="onpremise",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     type="IPsec",
 *     virtual_network_gateway_id=example_virtual_network_gateway.id,
 *     local_network_gateway_id=onpremise.id,
 *     shared_key="4-v3ry-53cr37-1p53c-5h4r3d-k3y")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "test",
 *         Location = "West US",
 *     });
 *     var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
 *     {
 *         Name = "test",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         AddressSpaces = new[]
 *         {
 *             "10.0.0.0/16",
 *         },
 *     });
 *     var exampleSubnet = new Azure.Network.Subnet("example", new()
 *     {
 *         Name = "GatewaySubnet",
 *         ResourceGroupName = example.Name,
 *         VirtualNetworkName = exampleVirtualNetwork.Name,
 *         AddressPrefixes = new[]
 *         {
 *             "10.0.1.0/24",
 *         },
 *     });
 *     var onpremise = new Azure.Network.LocalNetworkGateway("onpremise", new()
 *     {
 *         Name = "onpremise",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         GatewayAddress = "168.62.225.23",
 *         AddressSpaces = new[]
 *         {
 *             "10.1.1.0/24",
 *         },
 *     });
 *     var examplePublicIp = new Azure.Network.PublicIp("example", new()
 *     {
 *         Name = "test",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         AllocationMethod = "Dynamic",
 *     });
 *     var exampleVirtualNetworkGateway = new Azure.Network.VirtualNetworkGateway("example", new()
 *     {
 *         Name = "test",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         Type = "Vpn",
 *         VpnType = "RouteBased",
 *         ActiveActive = false,
 *         EnableBgp = false,
 *         Sku = "Basic",
 *         IpConfigurations = new[]
 *         {
 *             new Azure.Network.Inputs.VirtualNetworkGatewayIpConfigurationArgs
 *             {
 *                 PublicIpAddressId = examplePublicIp.Id,
 *                 PrivateIpAddressAllocation = "Dynamic",
 *                 SubnetId = exampleSubnet.Id,
 *             },
 *         },
 *     });
 *     var onpremiseVirtualNetworkGatewayConnection = new Azure.Network.VirtualNetworkGatewayConnection("onpremise", new()
 *     {
 *         Name = "onpremise",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         Type = "IPsec",
 *         VirtualNetworkGatewayId = exampleVirtualNetworkGateway.Id,
 *         LocalNetworkGatewayId = onpremise.Id,
 *         SharedKey = "4-v3ry-53cr37-1p53c-5h4r3d-k3y",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("test"),
 * 			Location: pulumi.String("West US"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
 * 			Name:              pulumi.String("test"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			AddressSpaces: pulumi.StringArray{
 * 				pulumi.String("10.0.0.0/16"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
 * 			Name:               pulumi.String("GatewaySubnet"),
 * 			ResourceGroupName:  example.Name,
 * 			VirtualNetworkName: exampleVirtualNetwork.Name,
 * 			AddressPrefixes: pulumi.StringArray{
 * 				pulumi.String("10.0.1.0/24"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		onpremise, err := network.NewLocalNetworkGateway(ctx, "onpremise", &network.LocalNetworkGatewayArgs{
 * 			Name:              pulumi.String("onpremise"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			GatewayAddress:    pulumi.String("168.62.225.23"),
 * 			AddressSpaces: pulumi.StringArray{
 * 				pulumi.String("10.1.1.0/24"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
 * 			Name:              pulumi.String("test"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			AllocationMethod:  pulumi.String("Dynamic"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleVirtualNetworkGateway, err := network.NewVirtualNetworkGateway(ctx, "example", &network.VirtualNetworkGatewayArgs{
 * 			Name:              pulumi.String("test"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			Type:              pulumi.String("Vpn"),
 * 			VpnType:           pulumi.String("RouteBased"),
 * 			ActiveActive:      pulumi.Bool(false),
 * 			EnableBgp:         pulumi.Bool(false),
 * 			Sku:               pulumi.String("Basic"),
 * 			IpConfigurations: network.VirtualNetworkGatewayIpConfigurationArray{
 * 				&network.VirtualNetworkGatewayIpConfigurationArgs{
 * 					PublicIpAddressId:          examplePublicIp.ID(),
 * 					PrivateIpAddressAllocation: pulumi.String("Dynamic"),
 * 					SubnetId:                   exampleSubnet.ID(),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = network.NewVirtualNetworkGatewayConnection(ctx, "onpremise", &network.VirtualNetworkGatewayConnectionArgs{
 * 			Name:                    pulumi.String("onpremise"),
 * 			Location:                example.Location,
 * 			ResourceGroupName:       example.Name,
 * 			Type:                    pulumi.String("IPsec"),
 * 			VirtualNetworkGatewayId: exampleVirtualNetworkGateway.ID(),
 * 			LocalNetworkGatewayId:   onpremise.ID(),
 * 			SharedKey:               pulumi.String("4-v3ry-53cr37-1p53c-5h4r3d-k3y"),
 * 		})
 * 		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.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.network.VirtualNetwork;
 * import com.pulumi.azure.network.VirtualNetworkArgs;
 * import com.pulumi.azure.network.Subnet;
 * import com.pulumi.azure.network.SubnetArgs;
 * import com.pulumi.azure.network.LocalNetworkGateway;
 * import com.pulumi.azure.network.LocalNetworkGatewayArgs;
 * import com.pulumi.azure.network.PublicIp;
 * import com.pulumi.azure.network.PublicIpArgs;
 * import com.pulumi.azure.network.VirtualNetworkGateway;
 * import com.pulumi.azure.network.VirtualNetworkGatewayArgs;
 * import com.pulumi.azure.network.inputs.VirtualNetworkGatewayIpConfigurationArgs;
 * import com.pulumi.azure.network.VirtualNetworkGatewayConnection;
 * import com.pulumi.azure.network.VirtualNetworkGatewayConnectionArgs;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("test")
 *             .location("West US")
 *             .build());
 *         var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
 *             .name("test")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .addressSpaces("10.0.0.0/16")
 *             .build());
 *         var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
 *             .name("GatewaySubnet")
 *             .resourceGroupName(example.name())
 *             .virtualNetworkName(exampleVirtualNetwork.name())
 *             .addressPrefixes("10.0.1.0/24")
 *             .build());
 *         var onpremise = new LocalNetworkGateway("onpremise", LocalNetworkGatewayArgs.builder()
 *             .name("onpremise")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .gatewayAddress("168.62.225.23")
 *             .addressSpaces("10.1.1.0/24")
 *             .build());
 *         var examplePublicIp = new PublicIp("examplePublicIp", PublicIpArgs.builder()
 *             .name("test")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .allocationMethod("Dynamic")
 *             .build());
 *         var exampleVirtualNetworkGateway = new VirtualNetworkGateway("exampleVirtualNetworkGateway", VirtualNetworkGatewayArgs.builder()
 *             .name("test")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .type("Vpn")
 *             .vpnType("RouteBased")
 *             .activeActive(false)
 *             .enableBgp(false)
 *             .sku("Basic")
 *             .ipConfigurations(VirtualNetworkGatewayIpConfigurationArgs.builder()
 *                 .publicIpAddressId(examplePublicIp.id())
 *                 .privateIpAddressAllocation("Dynamic")
 *                 .subnetId(exampleSubnet.id())
 *                 .build())
 *             .build());
 *         var onpremiseVirtualNetworkGatewayConnection = new VirtualNetworkGatewayConnection("onpremiseVirtualNetworkGatewayConnection", VirtualNetworkGatewayConnectionArgs.builder()
 *             .name("onpremise")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .type("IPsec")
 *             .virtualNetworkGatewayId(exampleVirtualNetworkGateway.id())
 *             .localNetworkGatewayId(onpremise.id())
 *             .sharedKey("4-v3ry-53cr37-1p53c-5h4r3d-k3y")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: test
 *       location: West US
 *   exampleVirtualNetwork:
 *     type: azure:network:VirtualNetwork
 *     name: example
 *     properties:
 *       name: test
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       addressSpaces:
 *         - 10.0.0.0/16
 *   exampleSubnet:
 *     type: azure:network:Subnet
 *     name: example
 *     properties:
 *       name: GatewaySubnet
 *       resourceGroupName: ${example.name}
 *       virtualNetworkName: ${exampleVirtualNetwork.name}
 *       addressPrefixes:
 *         - 10.0.1.0/24
 *   onpremise:
 *     type: azure:network:LocalNetworkGateway
 *     properties:
 *       name: onpremise
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       gatewayAddress: 168.62.225.23
 *       addressSpaces:
 *         - 10.1.1.0/24
 *   examplePublicIp:
 *     type: azure:network:PublicIp
 *     name: example
 *     properties:
 *       name: test
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       allocationMethod: Dynamic
 *   exampleVirtualNetworkGateway:
 *     type: azure:network:VirtualNetworkGateway
 *     name: example
 *     properties:
 *       name: test
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       type: Vpn
 *       vpnType: RouteBased
 *       activeActive: false
 *       enableBgp: false
 *       sku: Basic
 *       ipConfigurations:
 *         - publicIpAddressId: ${examplePublicIp.id}
 *           privateIpAddressAllocation: Dynamic
 *           subnetId: ${exampleSubnet.id}
 *   onpremiseVirtualNetworkGatewayConnection:
 *     type: azure:network:VirtualNetworkGatewayConnection
 *     name: onpremise
 *     properties:
 *       name: onpremise
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       type: IPsec
 *       virtualNetworkGatewayId: ${exampleVirtualNetworkGateway.id}
 *       localNetworkGatewayId: ${onpremise.id}
 *       sharedKey: 4-v3ry-53cr37-1p53c-5h4r3d-k3y
 * ```
 * 
 * ### VNet-to-VNet connection
 * The following example shows a connection between two Azure virtual network
 * in different locations/regions.
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const us = new azure.core.ResourceGroup("us", {
 *     name: "us",
 *     location: "East US",
 * });
 * const usVirtualNetwork = new azure.network.VirtualNetwork("us", {
 *     name: "us",
 *     location: us.location,
 *     resourceGroupName: us.name,
 *     addressSpaces: ["10.0.0.0/16"],
 * });
 * const usGateway = new azure.network.Subnet("us_gateway", {
 *     name: "GatewaySubnet",
 *     resourceGroupName: us.name,
 *     virtualNetworkName: usVirtualNetwork.name,
 *     addressPrefixes: ["10.0.1.0/24"],
 * });
 * const usPublicIp = new azure.network.PublicIp("us", {
 *     name: "us",
 *     location: us.location,
 *     resourceGroupName: us.name,
 *     allocationMethod: "Dynamic",
 * });
 * const usVirtualNetworkGateway = new azure.network.VirtualNetworkGateway("us", {
 *     name: "us-gateway",
 *     location: us.location,
 *     resourceGroupName: us.name,
 *     type: "Vpn",
 *     vpnType: "RouteBased",
 *     sku: "Basic",
 *     ipConfigurations: [{
 *         publicIpAddressId: usPublicIp.id,
 *         privateIpAddressAllocation: "Dynamic",
 *         subnetId: usGateway.id,
 *     }],
 * });
 * const europe = new azure.core.ResourceGroup("europe", {
 *     name: "europe",
 *     location: "West Europe",
 * });
 * const europeVirtualNetwork = new azure.network.VirtualNetwork("europe", {
 *     name: "europe",
 *     location: europe.location,
 *     resourceGroupName: europe.name,
 *     addressSpaces: ["10.1.0.0/16"],
 * });
 * const europeGateway = new azure.network.Subnet("europe_gateway", {
 *     name: "GatewaySubnet",
 *     resourceGroupName: europe.name,
 *     virtualNetworkName: europeVirtualNetwork.name,
 *     addressPrefixes: ["10.1.1.0/24"],
 * });
 * const europePublicIp = new azure.network.PublicIp("europe", {
 *     name: "europe",
 *     location: europe.location,
 *     resourceGroupName: europe.name,
 *     allocationMethod: "Dynamic",
 * });
 * const europeVirtualNetworkGateway = new azure.network.VirtualNetworkGateway("europe", {
 *     name: "europe-gateway",
 *     location: europe.location,
 *     resourceGroupName: europe.name,
 *     type: "Vpn",
 *     vpnType: "RouteBased",
 *     sku: "Basic",
 *     ipConfigurations: [{
 *         publicIpAddressId: europePublicIp.id,
 *         privateIpAddressAllocation: "Dynamic",
 *         subnetId: europeGateway.id,
 *     }],
 * });
 * const usToEurope = new azure.network.VirtualNetworkGatewayConnection("us_to_europe", {
 *     name: "us-to-europe",
 *     location: us.location,
 *     resourceGroupName: us.name,
 *     type: "Vnet2Vnet",
 *     virtualNetworkGatewayId: usVirtualNetworkGateway.id,
 *     peerVirtualNetworkGatewayId: europeVirtualNetworkGateway.id,
 *     sharedKey: "4-v3ry-53cr37-1p53c-5h4r3d-k3y",
 * });
 * const europeToUs = new azure.network.VirtualNetworkGatewayConnection("europe_to_us", {
 *     name: "europe-to-us",
 *     location: europe.location,
 *     resourceGroupName: europe.name,
 *     type: "Vnet2Vnet",
 *     virtualNetworkGatewayId: europeVirtualNetworkGateway.id,
 *     peerVirtualNetworkGatewayId: usVirtualNetworkGateway.id,
 *     sharedKey: "4-v3ry-53cr37-1p53c-5h4r3d-k3y",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * us = azure.core.ResourceGroup("us",
 *     name="us",
 *     location="East US")
 * us_virtual_network = azure.network.VirtualNetwork("us",
 *     name="us",
 *     location=us.location,
 *     resource_group_name=us.name,
 *     address_spaces=["10.0.0.0/16"])
 * us_gateway = azure.network.Subnet("us_gateway",
 *     name="GatewaySubnet",
 *     resource_group_name=us.name,
 *     virtual_network_name=us_virtual_network.name,
 *     address_prefixes=["10.0.1.0/24"])
 * us_public_ip = azure.network.PublicIp("us",
 *     name="us",
 *     location=us.location,
 *     resource_group_name=us.name,
 *     allocation_method="Dynamic")
 * us_virtual_network_gateway = azure.network.VirtualNetworkGateway("us",
 *     name="us-gateway",
 *     location=us.location,
 *     resource_group_name=us.name,
 *     type="Vpn",
 *     vpn_type="RouteBased",
 *     sku="Basic",
 *     ip_configurations=[azure.network.VirtualNetworkGatewayIpConfigurationArgs(
 *         public_ip_address_id=us_public_ip.id,
 *         private_ip_address_allocation="Dynamic",
 *         subnet_id=us_gateway.id,
 *     )])
 * europe = azure.core.ResourceGroup("europe",
 *     name="europe",
 *     location="West Europe")
 * europe_virtual_network = azure.network.VirtualNetwork("europe",
 *     name="europe",
 *     location=europe.location,
 *     resource_group_name=europe.name,
 *     address_spaces=["10.1.0.0/16"])
 * europe_gateway = azure.network.Subnet("europe_gateway",
 *     name="GatewaySubnet",
 *     resource_group_name=europe.name,
 *     virtual_network_name=europe_virtual_network.name,
 *     address_prefixes=["10.1.1.0/24"])
 * europe_public_ip = azure.network.PublicIp("europe",
 *     name="europe",
 *     location=europe.location,
 *     resource_group_name=europe.name,
 *     allocation_method="Dynamic")
 * europe_virtual_network_gateway = azure.network.VirtualNetworkGateway("europe",
 *     name="europe-gateway",
 *     location=europe.location,
 *     resource_group_name=europe.name,
 *     type="Vpn",
 *     vpn_type="RouteBased",
 *     sku="Basic",
 *     ip_configurations=[azure.network.VirtualNetworkGatewayIpConfigurationArgs(
 *         public_ip_address_id=europe_public_ip.id,
 *         private_ip_address_allocation="Dynamic",
 *         subnet_id=europe_gateway.id,
 *     )])
 * us_to_europe = azure.network.VirtualNetworkGatewayConnection("us_to_europe",
 *     name="us-to-europe",
 *     location=us.location,
 *     resource_group_name=us.name,
 *     type="Vnet2Vnet",
 *     virtual_network_gateway_id=us_virtual_network_gateway.id,
 *     peer_virtual_network_gateway_id=europe_virtual_network_gateway.id,
 *     shared_key="4-v3ry-53cr37-1p53c-5h4r3d-k3y")
 * europe_to_us = azure.network.VirtualNetworkGatewayConnection("europe_to_us",
 *     name="europe-to-us",
 *     location=europe.location,
 *     resource_group_name=europe.name,
 *     type="Vnet2Vnet",
 *     virtual_network_gateway_id=europe_virtual_network_gateway.id,
 *     peer_virtual_network_gateway_id=us_virtual_network_gateway.id,
 *     shared_key="4-v3ry-53cr37-1p53c-5h4r3d-k3y")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var us = new Azure.Core.ResourceGroup("us", new()
 *     {
 *         Name = "us",
 *         Location = "East US",
 *     });
 *     var usVirtualNetwork = new Azure.Network.VirtualNetwork("us", new()
 *     {
 *         Name = "us",
 *         Location = us.Location,
 *         ResourceGroupName = us.Name,
 *         AddressSpaces = new[]
 *         {
 *             "10.0.0.0/16",
 *         },
 *     });
 *     var usGateway = new Azure.Network.Subnet("us_gateway", new()
 *     {
 *         Name = "GatewaySubnet",
 *         ResourceGroupName = us.Name,
 *         VirtualNetworkName = usVirtualNetwork.Name,
 *         AddressPrefixes = new[]
 *         {
 *             "10.0.1.0/24",
 *         },
 *     });
 *     var usPublicIp = new Azure.Network.PublicIp("us", new()
 *     {
 *         Name = "us",
 *         Location = us.Location,
 *         ResourceGroupName = us.Name,
 *         AllocationMethod = "Dynamic",
 *     });
 *     var usVirtualNetworkGateway = new Azure.Network.VirtualNetworkGateway("us", new()
 *     {
 *         Name = "us-gateway",
 *         Location = us.Location,
 *         ResourceGroupName = us.Name,
 *         Type = "Vpn",
 *         VpnType = "RouteBased",
 *         Sku = "Basic",
 *         IpConfigurations = new[]
 *         {
 *             new Azure.Network.Inputs.VirtualNetworkGatewayIpConfigurationArgs
 *             {
 *                 PublicIpAddressId = usPublicIp.Id,
 *                 PrivateIpAddressAllocation = "Dynamic",
 *                 SubnetId = usGateway.Id,
 *             },
 *         },
 *     });
 *     var europe = new Azure.Core.ResourceGroup("europe", new()
 *     {
 *         Name = "europe",
 *         Location = "West Europe",
 *     });
 *     var europeVirtualNetwork = new Azure.Network.VirtualNetwork("europe", new()
 *     {
 *         Name = "europe",
 *         Location = europe.Location,
 *         ResourceGroupName = europe.Name,
 *         AddressSpaces = new[]
 *         {
 *             "10.1.0.0/16",
 *         },
 *     });
 *     var europeGateway = new Azure.Network.Subnet("europe_gateway", new()
 *     {
 *         Name = "GatewaySubnet",
 *         ResourceGroupName = europe.Name,
 *         VirtualNetworkName = europeVirtualNetwork.Name,
 *         AddressPrefixes = new[]
 *         {
 *             "10.1.1.0/24",
 *         },
 *     });
 *     var europePublicIp = new Azure.Network.PublicIp("europe", new()
 *     {
 *         Name = "europe",
 *         Location = europe.Location,
 *         ResourceGroupName = europe.Name,
 *         AllocationMethod = "Dynamic",
 *     });
 *     var europeVirtualNetworkGateway = new Azure.Network.VirtualNetworkGateway("europe", new()
 *     {
 *         Name = "europe-gateway",
 *         Location = europe.Location,
 *         ResourceGroupName = europe.Name,
 *         Type = "Vpn",
 *         VpnType = "RouteBased",
 *         Sku = "Basic",
 *         IpConfigurations = new[]
 *         {
 *             new Azure.Network.Inputs.VirtualNetworkGatewayIpConfigurationArgs
 *             {
 *                 PublicIpAddressId = europePublicIp.Id,
 *                 PrivateIpAddressAllocation = "Dynamic",
 *                 SubnetId = europeGateway.Id,
 *             },
 *         },
 *     });
 *     var usToEurope = new Azure.Network.VirtualNetworkGatewayConnection("us_to_europe", new()
 *     {
 *         Name = "us-to-europe",
 *         Location = us.Location,
 *         ResourceGroupName = us.Name,
 *         Type = "Vnet2Vnet",
 *         VirtualNetworkGatewayId = usVirtualNetworkGateway.Id,
 *         PeerVirtualNetworkGatewayId = europeVirtualNetworkGateway.Id,
 *         SharedKey = "4-v3ry-53cr37-1p53c-5h4r3d-k3y",
 *     });
 *     var europeToUs = new Azure.Network.VirtualNetworkGatewayConnection("europe_to_us", new()
 *     {
 *         Name = "europe-to-us",
 *         Location = europe.Location,
 *         ResourceGroupName = europe.Name,
 *         Type = "Vnet2Vnet",
 *         VirtualNetworkGatewayId = europeVirtualNetworkGateway.Id,
 *         PeerVirtualNetworkGatewayId = usVirtualNetworkGateway.Id,
 *         SharedKey = "4-v3ry-53cr37-1p53c-5h4r3d-k3y",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		us, err := core.NewResourceGroup(ctx, "us", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("us"),
 * 			Location: pulumi.String("East US"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		usVirtualNetwork, err := network.NewVirtualNetwork(ctx, "us", &network.VirtualNetworkArgs{
 * 			Name:              pulumi.String("us"),
 * 			Location:          us.Location,
 * 			ResourceGroupName: us.Name,
 * 			AddressSpaces: pulumi.StringArray{
 * 				pulumi.String("10.0.0.0/16"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		usGateway, err := network.NewSubnet(ctx, "us_gateway", &network.SubnetArgs{
 * 			Name:               pulumi.String("GatewaySubnet"),
 * 			ResourceGroupName:  us.Name,
 * 			VirtualNetworkName: usVirtualNetwork.Name,
 * 			AddressPrefixes: pulumi.StringArray{
 * 				pulumi.String("10.0.1.0/24"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		usPublicIp, err := network.NewPublicIp(ctx, "us", &network.PublicIpArgs{
 * 			Name:              pulumi.String("us"),
 * 			Location:          us.Location,
 * 			ResourceGroupName: us.Name,
 * 			AllocationMethod:  pulumi.String("Dynamic"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		usVirtualNetworkGateway, err := network.NewVirtualNetworkGateway(ctx, "us", &network.VirtualNetworkGatewayArgs{
 * 			Name:              pulumi.String("us-gateway"),
 * 			Location:          us.Location,
 * 			ResourceGroupName: us.Name,
 * 			Type:              pulumi.String("Vpn"),
 * 			VpnType:           pulumi.String("RouteBased"),
 * 			Sku:               pulumi.String("Basic"),
 * 			IpConfigurations: network.VirtualNetworkGatewayIpConfigurationArray{
 * 				&network.VirtualNetworkGatewayIpConfigurationArgs{
 * 					PublicIpAddressId:          usPublicIp.ID(),
 * 					PrivateIpAddressAllocation: pulumi.String("Dynamic"),
 * 					SubnetId:                   usGateway.ID(),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		europe, err := core.NewResourceGroup(ctx, "europe", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("europe"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		europeVirtualNetwork, err := network.NewVirtualNetwork(ctx, "europe", &network.VirtualNetworkArgs{
 * 			Name:              pulumi.String("europe"),
 * 			Location:          europe.Location,
 * 			ResourceGroupName: europe.Name,
 * 			AddressSpaces: pulumi.StringArray{
 * 				pulumi.String("10.1.0.0/16"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		europeGateway, err := network.NewSubnet(ctx, "europe_gateway", &network.SubnetArgs{
 * 			Name:               pulumi.String("GatewaySubnet"),
 * 			ResourceGroupName:  europe.Name,
 * 			VirtualNetworkName: europeVirtualNetwork.Name,
 * 			AddressPrefixes: pulumi.StringArray{
 * 				pulumi.String("10.1.1.0/24"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		europePublicIp, err := network.NewPublicIp(ctx, "europe", &network.PublicIpArgs{
 * 			Name:              pulumi.String("europe"),
 * 			Location:          europe.Location,
 * 			ResourceGroupName: europe.Name,
 * 			AllocationMethod:  pulumi.String("Dynamic"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		europeVirtualNetworkGateway, err := network.NewVirtualNetworkGateway(ctx, "europe", &network.VirtualNetworkGatewayArgs{
 * 			Name:              pulumi.String("europe-gateway"),
 * 			Location:          europe.Location,
 * 			ResourceGroupName: europe.Name,
 * 			Type:              pulumi.String("Vpn"),
 * 			VpnType:           pulumi.String("RouteBased"),
 * 			Sku:               pulumi.String("Basic"),
 * 			IpConfigurations: network.VirtualNetworkGatewayIpConfigurationArray{
 * 				&network.VirtualNetworkGatewayIpConfigurationArgs{
 * 					PublicIpAddressId:          europePublicIp.ID(),
 * 					PrivateIpAddressAllocation: pulumi.String("Dynamic"),
 * 					SubnetId:                   europeGateway.ID(),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = network.NewVirtualNetworkGatewayConnection(ctx, "us_to_europe", &network.VirtualNetworkGatewayConnectionArgs{
 * 			Name:                        pulumi.String("us-to-europe"),
 * 			Location:                    us.Location,
 * 			ResourceGroupName:           us.Name,
 * 			Type:                        pulumi.String("Vnet2Vnet"),
 * 			VirtualNetworkGatewayId:     usVirtualNetworkGateway.ID(),
 * 			PeerVirtualNetworkGatewayId: europeVirtualNetworkGateway.ID(),
 * 			SharedKey:                   pulumi.String("4-v3ry-53cr37-1p53c-5h4r3d-k3y"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = network.NewVirtualNetworkGatewayConnection(ctx, "europe_to_us", &network.VirtualNetworkGatewayConnectionArgs{
 * 			Name:                        pulumi.String("europe-to-us"),
 * 			Location:                    europe.Location,
 * 			ResourceGroupName:           europe.Name,
 * 			Type:                        pulumi.String("Vnet2Vnet"),
 * 			VirtualNetworkGatewayId:     europeVirtualNetworkGateway.ID(),
 * 			PeerVirtualNetworkGatewayId: usVirtualNetworkGateway.ID(),
 * 			SharedKey:                   pulumi.String("4-v3ry-53cr37-1p53c-5h4r3d-k3y"),
 * 		})
 * 		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.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.network.VirtualNetwork;
 * import com.pulumi.azure.network.VirtualNetworkArgs;
 * import com.pulumi.azure.network.Subnet;
 * import com.pulumi.azure.network.SubnetArgs;
 * import com.pulumi.azure.network.PublicIp;
 * import com.pulumi.azure.network.PublicIpArgs;
 * import com.pulumi.azure.network.VirtualNetworkGateway;
 * import com.pulumi.azure.network.VirtualNetworkGatewayArgs;
 * import com.pulumi.azure.network.inputs.VirtualNetworkGatewayIpConfigurationArgs;
 * import com.pulumi.azure.network.VirtualNetworkGatewayConnection;
 * import com.pulumi.azure.network.VirtualNetworkGatewayConnectionArgs;
 * 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 us = new ResourceGroup("us", ResourceGroupArgs.builder()
 *             .name("us")
 *             .location("East US")
 *             .build());
 *         var usVirtualNetwork = new VirtualNetwork("usVirtualNetwork", VirtualNetworkArgs.builder()
 *             .name("us")
 *             .location(us.location())
 *             .resourceGroupName(us.name())
 *             .addressSpaces("10.0.0.0/16")
 *             .build());
 *         var usGateway = new Subnet("usGateway", SubnetArgs.builder()
 *             .name("GatewaySubnet")
 *             .resourceGroupName(us.name())
 *             .virtualNetworkName(usVirtualNetwork.name())
 *             .addressPrefixes("10.0.1.0/24")
 *             .build());
 *         var usPublicIp = new PublicIp("usPublicIp", PublicIpArgs.builder()
 *             .name("us")
 *             .location(us.location())
 *             .resourceGroupName(us.name())
 *             .allocationMethod("Dynamic")
 *             .build());
 *         var usVirtualNetworkGateway = new VirtualNetworkGateway("usVirtualNetworkGateway", VirtualNetworkGatewayArgs.builder()
 *             .name("us-gateway")
 *             .location(us.location())
 *             .resourceGroupName(us.name())
 *             .type("Vpn")
 *             .vpnType("RouteBased")
 *             .sku("Basic")
 *             .ipConfigurations(VirtualNetworkGatewayIpConfigurationArgs.builder()
 *                 .publicIpAddressId(usPublicIp.id())
 *                 .privateIpAddressAllocation("Dynamic")
 *                 .subnetId(usGateway.id())
 *                 .build())
 *             .build());
 *         var europe = new ResourceGroup("europe", ResourceGroupArgs.builder()
 *             .name("europe")
 *             .location("West Europe")
 *             .build());
 *         var europeVirtualNetwork = new VirtualNetwork("europeVirtualNetwork", VirtualNetworkArgs.builder()
 *             .name("europe")
 *             .location(europe.location())
 *             .resourceGroupName(europe.name())
 *             .addressSpaces("10.1.0.0/16")
 *             .build());
 *         var europeGateway = new Subnet("europeGateway", SubnetArgs.builder()
 *             .name("GatewaySubnet")
 *             .resourceGroupName(europe.name())
 *             .virtualNetworkName(europeVirtualNetwork.name())
 *             .addressPrefixes("10.1.1.0/24")
 *             .build());
 *         var europePublicIp = new PublicIp("europePublicIp", PublicIpArgs.builder()
 *             .name("europe")
 *             .location(europe.location())
 *             .resourceGroupName(europe.name())
 *             .allocationMethod("Dynamic")
 *             .build());
 *         var europeVirtualNetworkGateway = new VirtualNetworkGateway("europeVirtualNetworkGateway", VirtualNetworkGatewayArgs.builder()
 *             .name("europe-gateway")
 *             .location(europe.location())
 *             .resourceGroupName(europe.name())
 *             .type("Vpn")
 *             .vpnType("RouteBased")
 *             .sku("Basic")
 *             .ipConfigurations(VirtualNetworkGatewayIpConfigurationArgs.builder()
 *                 .publicIpAddressId(europePublicIp.id())
 *                 .privateIpAddressAllocation("Dynamic")
 *                 .subnetId(europeGateway.id())
 *                 .build())
 *             .build());
 *         var usToEurope = new VirtualNetworkGatewayConnection("usToEurope", VirtualNetworkGatewayConnectionArgs.builder()
 *             .name("us-to-europe")
 *             .location(us.location())
 *             .resourceGroupName(us.name())
 *             .type("Vnet2Vnet")
 *             .virtualNetworkGatewayId(usVirtualNetworkGateway.id())
 *             .peerVirtualNetworkGatewayId(europeVirtualNetworkGateway.id())
 *             .sharedKey("4-v3ry-53cr37-1p53c-5h4r3d-k3y")
 *             .build());
 *         var europeToUs = new VirtualNetworkGatewayConnection("europeToUs", VirtualNetworkGatewayConnectionArgs.builder()
 *             .name("europe-to-us")
 *             .location(europe.location())
 *             .resourceGroupName(europe.name())
 *             .type("Vnet2Vnet")
 *             .virtualNetworkGatewayId(europeVirtualNetworkGateway.id())
 *             .peerVirtualNetworkGatewayId(usVirtualNetworkGateway.id())
 *             .sharedKey("4-v3ry-53cr37-1p53c-5h4r3d-k3y")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   us:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: us
 *       location: East US
 *   usVirtualNetwork:
 *     type: azure:network:VirtualNetwork
 *     name: us
 *     properties:
 *       name: us
 *       location: ${us.location}
 *       resourceGroupName: ${us.name}
 *       addressSpaces:
 *         - 10.0.0.0/16
 *   usGateway:
 *     type: azure:network:Subnet
 *     name: us_gateway
 *     properties:
 *       name: GatewaySubnet
 *       resourceGroupName: ${us.name}
 *       virtualNetworkName: ${usVirtualNetwork.name}
 *       addressPrefixes:
 *         - 10.0.1.0/24
 *   usPublicIp:
 *     type: azure:network:PublicIp
 *     name: us
 *     properties:
 *       name: us
 *       location: ${us.location}
 *       resourceGroupName: ${us.name}
 *       allocationMethod: Dynamic
 *   usVirtualNetworkGateway:
 *     type: azure:network:VirtualNetworkGateway
 *     name: us
 *     properties:
 *       name: us-gateway
 *       location: ${us.location}
 *       resourceGroupName: ${us.name}
 *       type: Vpn
 *       vpnType: RouteBased
 *       sku: Basic
 *       ipConfigurations:
 *         - publicIpAddressId: ${usPublicIp.id}
 *           privateIpAddressAllocation: Dynamic
 *           subnetId: ${usGateway.id}
 *   europe:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: europe
 *       location: West Europe
 *   europeVirtualNetwork:
 *     type: azure:network:VirtualNetwork
 *     name: europe
 *     properties:
 *       name: europe
 *       location: ${europe.location}
 *       resourceGroupName: ${europe.name}
 *       addressSpaces:
 *         - 10.1.0.0/16
 *   europeGateway:
 *     type: azure:network:Subnet
 *     name: europe_gateway
 *     properties:
 *       name: GatewaySubnet
 *       resourceGroupName: ${europe.name}
 *       virtualNetworkName: ${europeVirtualNetwork.name}
 *       addressPrefixes:
 *         - 10.1.1.0/24
 *   europePublicIp:
 *     type: azure:network:PublicIp
 *     name: europe
 *     properties:
 *       name: europe
 *       location: ${europe.location}
 *       resourceGroupName: ${europe.name}
 *       allocationMethod: Dynamic
 *   europeVirtualNetworkGateway:
 *     type: azure:network:VirtualNetworkGateway
 *     name: europe
 *     properties:
 *       name: europe-gateway
 *       location: ${europe.location}
 *       resourceGroupName: ${europe.name}
 *       type: Vpn
 *       vpnType: RouteBased
 *       sku: Basic
 *       ipConfigurations:
 *         - publicIpAddressId: ${europePublicIp.id}
 *           privateIpAddressAllocation: Dynamic
 *           subnetId: ${europeGateway.id}
 *   usToEurope:
 *     type: azure:network:VirtualNetworkGatewayConnection
 *     name: us_to_europe
 *     properties:
 *       name: us-to-europe
 *       location: ${us.location}
 *       resourceGroupName: ${us.name}
 *       type: Vnet2Vnet
 *       virtualNetworkGatewayId: ${usVirtualNetworkGateway.id}
 *       peerVirtualNetworkGatewayId: ${europeVirtualNetworkGateway.id}
 *       sharedKey: 4-v3ry-53cr37-1p53c-5h4r3d-k3y
 *   europeToUs:
 *     type: azure:network:VirtualNetworkGatewayConnection
 *     name: europe_to_us
 *     properties:
 *       name: europe-to-us
 *       location: ${europe.location}
 *       resourceGroupName: ${europe.name}
 *       type: Vnet2Vnet
 *       virtualNetworkGatewayId: ${europeVirtualNetworkGateway.id}
 *       peerVirtualNetworkGatewayId: ${usVirtualNetworkGateway.id}
 *       sharedKey: 4-v3ry-53cr37-1p53c-5h4r3d-k3y
 * ```
 * 
 * ## Import
 * Virtual Network Gateway Connections can be imported using their `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:network/virtualNetworkGatewayConnection:VirtualNetworkGatewayConnection exampleConnection /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup1/providers/Microsoft.Network/connections/myConnection1
 * ```
 * @property authorizationKey The authorization key associated with the Express Route Circuit. This field is required only if the type is an ExpressRoute connection.
 * @property connectionMode Connection mode to use. Possible values are `Default`, `InitiatorOnly` and `ResponderOnly`. Defaults to `Default`. Changing this value will force a resource to be created.
 * @property connectionProtocol The IKE protocol version to use. Possible values are `IKEv1` and `IKEv2`, values are `IKEv1` and `IKEv2`. Defaults to `IKEv2`. Changing this forces a new resource to be created.
 * > **Note:** Only valid for `IPSec` connections on virtual network gateways with SKU `VpnGw1`, `VpnGw2`, `VpnGw3`, `VpnGw1AZ`, `VpnGw2AZ` or `VpnGw3AZ`.
 * @property customBgpAddresses A `custom_bgp_addresses` block which is documented below.
 * The block can only be used on `IPSec` / `activeactive` connections,
 * For details about see [the relevant section in the Azure documentation](https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-aws-bgp).
 * @property dpdTimeoutSeconds The dead peer detection timeout of this connection in seconds. Changing this forces a new resource to be created.
 * @property egressNatRuleIds A list of the egress NAT Rule Ids.
 * @property enableBgp If `true`, BGP (Border Gateway Protocol) is enabled for this connection. Defaults to `false`.
 * @property expressRouteCircuitId The ID of the Express Route Circuit when creating an ExpressRoute connection (i.e. when `type` is `ExpressRoute`). The Express Route Circuit can be in the same or in a different subscription. Changing this forces a new resource to be created.
 * @property expressRouteGatewayBypass If `true`, data packets will bypass ExpressRoute Gateway for data forwarding This is only valid for ExpressRoute connections.
 * @property ingressNatRuleIds A list of the ingress NAT Rule Ids.
 * @property ipsecPolicy A `ipsec_policy` block which is documented below.
 * Only a single policy can be defined for a connection. For details on
 * custom policies refer to [the relevant section in the Azure documentation](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-ipsecikepolicy-rm-powershell).
 * @property localAzureIpAddressEnabled Use private local Azure IP for the connection. Changing this forces a new resource to be created.
 * @property localNetworkGatewayId The ID of the local network gateway when creating Site-to-Site connection (i.e. when `type` is `IPsec`).
 * @property location The location/region where the connection is located. Changing this forces a new resource to be created.
 * @property name The name of the connection. Changing the name forces a new resource to be created.
 * @property peerVirtualNetworkGatewayId The ID of the peer virtual network gateway when creating a VNet-to-VNet connection (i.e. when `type` is `Vnet2Vnet`). The peer Virtual Network Gateway can be in the same or in a different subscription. Changing this forces a new resource to be created.
 * @property privateLinkFastPathEnabled Bypass the Express Route gateway when accessing private-links. When enabled `express_route_gateway_bypass` must be set to `true`. Defaults to `false`.
 * @property resourceGroupName The name of the resource group in which to create the connection Changing this forces a new resource to be created.
 * @property routingWeight The routing weight. Defaults to `10`.
 * @property sharedKey The shared IPSec key. A key could be provided if a Site-to-Site, VNet-to-VNet or ExpressRoute connection is created.
 * @property tags A mapping of tags to assign to the resource.
 * @property trafficSelectorPolicy One or more `traffic_selector_policy` blocks which are documented below.
 * A `traffic_selector_policy` allows to specify a traffic selector policy proposal to be used in a virtual network gateway connection.
 * For details about traffic selectors refer to [the relevant section in the Azure documentation](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-connect-multiple-policybased-rm-ps).
 * @property type The type of connection. Valid options are `IPsec` (Site-to-Site), `ExpressRoute` (ExpressRoute), and `Vnet2Vnet` (VNet-to-VNet). Each connection type requires different mandatory arguments (refer to the examples above). Changing this forces a new resource to be created.
 * @property usePolicyBasedTrafficSelectors If `true`, policy-based traffic selectors are enabled for this connection. Enabling policy-based traffic selectors requires an `ipsec_policy` block. Defaults to `false`.
 * @property virtualNetworkGatewayId The ID of the Virtual Network Gateway in which the connection will be created. Changing this forces a new resource to be created.
 */
public data class VirtualNetworkGatewayConnectionArgs(
    public val authorizationKey: Output? = null,
    public val connectionMode: Output? = null,
    public val connectionProtocol: Output? = null,
    public val customBgpAddresses: Output? =
        null,
    public val dpdTimeoutSeconds: Output? = null,
    public val egressNatRuleIds: Output>? = null,
    public val enableBgp: Output? = null,
    public val expressRouteCircuitId: Output? = null,
    public val expressRouteGatewayBypass: Output? = null,
    public val ingressNatRuleIds: Output>? = null,
    public val ipsecPolicy: Output? = null,
    public val localAzureIpAddressEnabled: Output? = null,
    public val localNetworkGatewayId: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val peerVirtualNetworkGatewayId: Output? = null,
    public val privateLinkFastPathEnabled: Output? = null,
    public val resourceGroupName: Output? = null,
    public val routingWeight: Output? = null,
    public val sharedKey: Output? = null,
    public val tags: Output>? = null,
    public val trafficSelectorPolicy:
    Output? = null,
    public val type: Output? = null,
    public val usePolicyBasedTrafficSelectors: Output? = null,
    public val virtualNetworkGatewayId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.network.VirtualNetworkGatewayConnectionArgs =
        com.pulumi.azure.network.VirtualNetworkGatewayConnectionArgs.builder()
            .authorizationKey(authorizationKey?.applyValue({ args0 -> args0 }))
            .connectionMode(connectionMode?.applyValue({ args0 -> args0 }))
            .connectionProtocol(connectionProtocol?.applyValue({ args0 -> args0 }))
            .customBgpAddresses(
                customBgpAddresses?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .dpdTimeoutSeconds(dpdTimeoutSeconds?.applyValue({ args0 -> args0 }))
            .egressNatRuleIds(egressNatRuleIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .enableBgp(enableBgp?.applyValue({ args0 -> args0 }))
            .expressRouteCircuitId(expressRouteCircuitId?.applyValue({ args0 -> args0 }))
            .expressRouteGatewayBypass(expressRouteGatewayBypass?.applyValue({ args0 -> args0 }))
            .ingressNatRuleIds(ingressNatRuleIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .ipsecPolicy(ipsecPolicy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .localAzureIpAddressEnabled(localAzureIpAddressEnabled?.applyValue({ args0 -> args0 }))
            .localNetworkGatewayId(localNetworkGatewayId?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .peerVirtualNetworkGatewayId(peerVirtualNetworkGatewayId?.applyValue({ args0 -> args0 }))
            .privateLinkFastPathEnabled(privateLinkFastPathEnabled?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .routingWeight(routingWeight?.applyValue({ args0 -> args0 }))
            .sharedKey(sharedKey?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .trafficSelectorPolicy(
                trafficSelectorPolicy?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .type(type?.applyValue({ args0 -> args0 }))
            .usePolicyBasedTrafficSelectors(usePolicyBasedTrafficSelectors?.applyValue({ args0 -> args0 }))
            .virtualNetworkGatewayId(virtualNetworkGatewayId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [VirtualNetworkGatewayConnectionArgs].
 */
@PulumiTagMarker
public class VirtualNetworkGatewayConnectionArgsBuilder internal constructor() {
    private var authorizationKey: Output? = null

    private var connectionMode: Output? = null

    private var connectionProtocol: Output? = null

    private var customBgpAddresses: Output? =
        null

    private var dpdTimeoutSeconds: Output? = null

    private var egressNatRuleIds: Output>? = null

    private var enableBgp: Output? = null

    private var expressRouteCircuitId: Output? = null

    private var expressRouteGatewayBypass: Output? = null

    private var ingressNatRuleIds: Output>? = null

    private var ipsecPolicy: Output? = null

    private var localAzureIpAddressEnabled: Output? = null

    private var localNetworkGatewayId: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var peerVirtualNetworkGatewayId: Output? = null

    private var privateLinkFastPathEnabled: Output? = null

    private var resourceGroupName: Output? = null

    private var routingWeight: Output? = null

    private var sharedKey: Output? = null

    private var tags: Output>? = null

    private var trafficSelectorPolicy:
        Output? = null

    private var type: Output? = null

    private var usePolicyBasedTrafficSelectors: Output? = null

    private var virtualNetworkGatewayId: Output? = null

    /**
     * @param value The authorization key associated with the Express Route Circuit. This field is required only if the type is an ExpressRoute connection.
     */
    @JvmName("mbkypmrpnwbimwhw")
    public suspend fun authorizationKey(`value`: Output) {
        this.authorizationKey = value
    }

    /**
     * @param value Connection mode to use. Possible values are `Default`, `InitiatorOnly` and `ResponderOnly`. Defaults to `Default`. Changing this value will force a resource to be created.
     */
    @JvmName("hcqhtokbamnmwjaw")
    public suspend fun connectionMode(`value`: Output) {
        this.connectionMode = value
    }

    /**
     * @param value The IKE protocol version to use. Possible values are `IKEv1` and `IKEv2`, values are `IKEv1` and `IKEv2`. Defaults to `IKEv2`. Changing this forces a new resource to be created.
     * > **Note:** Only valid for `IPSec` connections on virtual network gateways with SKU `VpnGw1`, `VpnGw2`, `VpnGw3`, `VpnGw1AZ`, `VpnGw2AZ` or `VpnGw3AZ`.
     */
    @JvmName("faymcwsnaukhmksa")
    public suspend fun connectionProtocol(`value`: Output) {
        this.connectionProtocol = value
    }

    /**
     * @param value A `custom_bgp_addresses` block which is documented below.
     * The block can only be used on `IPSec` / `activeactive` connections,
     * For details about see [the relevant section in the Azure documentation](https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-aws-bgp).
     */
    @JvmName("mtqkeekvcckajjss")
    public suspend
    fun customBgpAddresses(`value`: Output) {
        this.customBgpAddresses = value
    }

    /**
     * @param value The dead peer detection timeout of this connection in seconds. Changing this forces a new resource to be created.
     */
    @JvmName("xfeurflnkebpbkme")
    public suspend fun dpdTimeoutSeconds(`value`: Output) {
        this.dpdTimeoutSeconds = value
    }

    /**
     * @param value A list of the egress NAT Rule Ids.
     */
    @JvmName("abygaftvprxoycwp")
    public suspend fun egressNatRuleIds(`value`: Output>) {
        this.egressNatRuleIds = value
    }

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

    /**
     * @param values A list of the egress NAT Rule Ids.
     */
    @JvmName("fpgbnllvnxgwmkqa")
    public suspend fun egressNatRuleIds(values: List>) {
        this.egressNatRuleIds = Output.all(values)
    }

    /**
     * @param value If `true`, BGP (Border Gateway Protocol) is enabled for this connection. Defaults to `false`.
     */
    @JvmName("hgiwwnyefolwkdbr")
    public suspend fun enableBgp(`value`: Output) {
        this.enableBgp = value
    }

    /**
     * @param value The ID of the Express Route Circuit when creating an ExpressRoute connection (i.e. when `type` is `ExpressRoute`). The Express Route Circuit can be in the same or in a different subscription. Changing this forces a new resource to be created.
     */
    @JvmName("fvhcbrjoqxcyawlu")
    public suspend fun expressRouteCircuitId(`value`: Output) {
        this.expressRouteCircuitId = value
    }

    /**
     * @param value If `true`, data packets will bypass ExpressRoute Gateway for data forwarding This is only valid for ExpressRoute connections.
     */
    @JvmName("qphbpficnhlrdejx")
    public suspend fun expressRouteGatewayBypass(`value`: Output) {
        this.expressRouteGatewayBypass = value
    }

    /**
     * @param value A list of the ingress NAT Rule Ids.
     */
    @JvmName("aoohxkdgubucjnah")
    public suspend fun ingressNatRuleIds(`value`: Output>) {
        this.ingressNatRuleIds = value
    }

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

    /**
     * @param values A list of the ingress NAT Rule Ids.
     */
    @JvmName("sptcqjnhrpikvlkg")
    public suspend fun ingressNatRuleIds(values: List>) {
        this.ingressNatRuleIds = Output.all(values)
    }

    /**
     * @param value A `ipsec_policy` block which is documented below.
     * Only a single policy can be defined for a connection. For details on
     * custom policies refer to [the relevant section in the Azure documentation](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-ipsecikepolicy-rm-powershell).
     */
    @JvmName("tpaqtnoldivrvnhg")
    public suspend fun ipsecPolicy(`value`: Output) {
        this.ipsecPolicy = value
    }

    /**
     * @param value Use private local Azure IP for the connection. Changing this forces a new resource to be created.
     */
    @JvmName("pdkutyhflsgekdai")
    public suspend fun localAzureIpAddressEnabled(`value`: Output) {
        this.localAzureIpAddressEnabled = value
    }

    /**
     * @param value The ID of the local network gateway when creating Site-to-Site connection (i.e. when `type` is `IPsec`).
     */
    @JvmName("nniyhwyytibefqdv")
    public suspend fun localNetworkGatewayId(`value`: Output) {
        this.localNetworkGatewayId = value
    }

    /**
     * @param value The location/region where the connection is located. Changing this forces a new resource to be created.
     */
    @JvmName("sxpiuwvlihycueiq")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The name of the connection. Changing the name forces a new resource to be created.
     */
    @JvmName("ucsoxakgguctynrn")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The ID of the peer virtual network gateway when creating a VNet-to-VNet connection (i.e. when `type` is `Vnet2Vnet`). The peer Virtual Network Gateway can be in the same or in a different subscription. Changing this forces a new resource to be created.
     */
    @JvmName("bbnoswxuyaionbps")
    public suspend fun peerVirtualNetworkGatewayId(`value`: Output) {
        this.peerVirtualNetworkGatewayId = value
    }

    /**
     * @param value Bypass the Express Route gateway when accessing private-links. When enabled `express_route_gateway_bypass` must be set to `true`. Defaults to `false`.
     */
    @JvmName("tomdcddboryowtav")
    public suspend fun privateLinkFastPathEnabled(`value`: Output) {
        this.privateLinkFastPathEnabled = value
    }

    /**
     * @param value The name of the resource group in which to create the connection Changing this forces a new resource to be created.
     */
    @JvmName("hlubcqdesyfyiiqw")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The routing weight. Defaults to `10`.
     */
    @JvmName("gkchnpaeflffdaid")
    public suspend fun routingWeight(`value`: Output) {
        this.routingWeight = value
    }

    /**
     * @param value The shared IPSec key. A key could be provided if a Site-to-Site, VNet-to-VNet or ExpressRoute connection is created.
     */
    @JvmName("xfgjqymvisnieboa")
    public suspend fun sharedKey(`value`: Output) {
        this.sharedKey = value
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("nixhtfvbdfcsquha")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value One or more `traffic_selector_policy` blocks which are documented below.
     * A `traffic_selector_policy` allows to specify a traffic selector policy proposal to be used in a virtual network gateway connection.
     * For details about traffic selectors refer to [the relevant section in the Azure documentation](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-connect-multiple-policybased-rm-ps).
     */
    @JvmName("cjeacvmkaxqvysca")
    public suspend
    fun trafficSelectorPolicy(`value`: Output) {
        this.trafficSelectorPolicy = value
    }

    /**
     * @param value The type of connection. Valid options are `IPsec` (Site-to-Site), `ExpressRoute` (ExpressRoute), and `Vnet2Vnet` (VNet-to-VNet). Each connection type requires different mandatory arguments (refer to the examples above). Changing this forces a new resource to be created.
     */
    @JvmName("vvtfgaexytfcnsor")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value If `true`, policy-based traffic selectors are enabled for this connection. Enabling policy-based traffic selectors requires an `ipsec_policy` block. Defaults to `false`.
     */
    @JvmName("odwhxyhvrtdpwyxc")
    public suspend fun usePolicyBasedTrafficSelectors(`value`: Output) {
        this.usePolicyBasedTrafficSelectors = value
    }

    /**
     * @param value The ID of the Virtual Network Gateway in which the connection will be created. Changing this forces a new resource to be created.
     */
    @JvmName("bpevuebsfbabwryb")
    public suspend fun virtualNetworkGatewayId(`value`: Output) {
        this.virtualNetworkGatewayId = value
    }

    /**
     * @param value The authorization key associated with the Express Route Circuit. This field is required only if the type is an ExpressRoute connection.
     */
    @JvmName("atnbcgjbrbvjhuqb")
    public suspend fun authorizationKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authorizationKey = mapped
    }

    /**
     * @param value Connection mode to use. Possible values are `Default`, `InitiatorOnly` and `ResponderOnly`. Defaults to `Default`. Changing this value will force a resource to be created.
     */
    @JvmName("dsasrdgsidepbjsa")
    public suspend fun connectionMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.connectionMode = mapped
    }

    /**
     * @param value The IKE protocol version to use. Possible values are `IKEv1` and `IKEv2`, values are `IKEv1` and `IKEv2`. Defaults to `IKEv2`. Changing this forces a new resource to be created.
     * > **Note:** Only valid for `IPSec` connections on virtual network gateways with SKU `VpnGw1`, `VpnGw2`, `VpnGw3`, `VpnGw1AZ`, `VpnGw2AZ` or `VpnGw3AZ`.
     */
    @JvmName("sjtbffuaxhgogbir")
    public suspend fun connectionProtocol(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.connectionProtocol = mapped
    }

    /**
     * @param value A `custom_bgp_addresses` block which is documented below.
     * The block can only be used on `IPSec` / `activeactive` connections,
     * For details about see [the relevant section in the Azure documentation](https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-aws-bgp).
     */
    @JvmName("klqwytfobdoaclwd")
    public suspend
    fun customBgpAddresses(`value`: VirtualNetworkGatewayConnectionCustomBgpAddressesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customBgpAddresses = mapped
    }

    /**
     * @param argument A `custom_bgp_addresses` block which is documented below.
     * The block can only be used on `IPSec` / `activeactive` connections,
     * For details about see [the relevant section in the Azure documentation](https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-aws-bgp).
     */
    @JvmName("onvsnjstujcgsbbb")
    public suspend
    fun customBgpAddresses(argument: suspend VirtualNetworkGatewayConnectionCustomBgpAddressesArgsBuilder.() -> Unit) {
        val toBeMapped = VirtualNetworkGatewayConnectionCustomBgpAddressesArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.customBgpAddresses = mapped
    }

    /**
     * @param value The dead peer detection timeout of this connection in seconds. Changing this forces a new resource to be created.
     */
    @JvmName("rhqdqwpcnyoqnosi")
    public suspend fun dpdTimeoutSeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dpdTimeoutSeconds = mapped
    }

    /**
     * @param value A list of the egress NAT Rule Ids.
     */
    @JvmName("qfqfagcqktdafpxg")
    public suspend fun egressNatRuleIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.egressNatRuleIds = mapped
    }

    /**
     * @param values A list of the egress NAT Rule Ids.
     */
    @JvmName("aworpfjwrwmxfafb")
    public suspend fun egressNatRuleIds(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.egressNatRuleIds = mapped
    }

    /**
     * @param value If `true`, BGP (Border Gateway Protocol) is enabled for this connection. Defaults to `false`.
     */
    @JvmName("khdkcrruebuorlli")
    public suspend fun enableBgp(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableBgp = mapped
    }

    /**
     * @param value The ID of the Express Route Circuit when creating an ExpressRoute connection (i.e. when `type` is `ExpressRoute`). The Express Route Circuit can be in the same or in a different subscription. Changing this forces a new resource to be created.
     */
    @JvmName("rufyrqecnhdytfkq")
    public suspend fun expressRouteCircuitId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.expressRouteCircuitId = mapped
    }

    /**
     * @param value If `true`, data packets will bypass ExpressRoute Gateway for data forwarding This is only valid for ExpressRoute connections.
     */
    @JvmName("wncakdrcjuotlvkn")
    public suspend fun expressRouteGatewayBypass(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.expressRouteGatewayBypass = mapped
    }

    /**
     * @param value A list of the ingress NAT Rule Ids.
     */
    @JvmName("qgdnvgplxwtrbjbi")
    public suspend fun ingressNatRuleIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ingressNatRuleIds = mapped
    }

    /**
     * @param values A list of the ingress NAT Rule Ids.
     */
    @JvmName("sbgpxwxhtwynlvss")
    public suspend fun ingressNatRuleIds(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ingressNatRuleIds = mapped
    }

    /**
     * @param value A `ipsec_policy` block which is documented below.
     * Only a single policy can be defined for a connection. For details on
     * custom policies refer to [the relevant section in the Azure documentation](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-ipsecikepolicy-rm-powershell).
     */
    @JvmName("xcgcwaxwktqvlitc")
    public suspend fun ipsecPolicy(`value`: VirtualNetworkGatewayConnectionIpsecPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipsecPolicy = mapped
    }

    /**
     * @param argument A `ipsec_policy` block which is documented below.
     * Only a single policy can be defined for a connection. For details on
     * custom policies refer to [the relevant section in the Azure documentation](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-ipsecikepolicy-rm-powershell).
     */
    @JvmName("ahnniyhqhytujasa")
    public suspend
    fun ipsecPolicy(argument: suspend VirtualNetworkGatewayConnectionIpsecPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = VirtualNetworkGatewayConnectionIpsecPolicyArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.ipsecPolicy = mapped
    }

    /**
     * @param value Use private local Azure IP for the connection. Changing this forces a new resource to be created.
     */
    @JvmName("sicymlndywpykssj")
    public suspend fun localAzureIpAddressEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.localAzureIpAddressEnabled = mapped
    }

    /**
     * @param value The ID of the local network gateway when creating Site-to-Site connection (i.e. when `type` is `IPsec`).
     */
    @JvmName("ptnkivluvylqacly")
    public suspend fun localNetworkGatewayId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.localNetworkGatewayId = mapped
    }

    /**
     * @param value The location/region where the connection is located. Changing this forces a new resource to be created.
     */
    @JvmName("ogqpurroyveiqcud")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value The name of the connection. Changing the name forces a new resource to be created.
     */
    @JvmName("pqjjijgkfeeccstl")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The ID of the peer virtual network gateway when creating a VNet-to-VNet connection (i.e. when `type` is `Vnet2Vnet`). The peer Virtual Network Gateway can be in the same or in a different subscription. Changing this forces a new resource to be created.
     */
    @JvmName("yyctxsoppqdbiwvw")
    public suspend fun peerVirtualNetworkGatewayId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.peerVirtualNetworkGatewayId = mapped
    }

    /**
     * @param value Bypass the Express Route gateway when accessing private-links. When enabled `express_route_gateway_bypass` must be set to `true`. Defaults to `false`.
     */
    @JvmName("qbhnkscvghatacca")
    public suspend fun privateLinkFastPathEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.privateLinkFastPathEnabled = mapped
    }

    /**
     * @param value The name of the resource group in which to create the connection Changing this forces a new resource to be created.
     */
    @JvmName("vfbhsyofvbpydtft")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value The routing weight. Defaults to `10`.
     */
    @JvmName("qjdttbkyofavwrrl")
    public suspend fun routingWeight(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.routingWeight = mapped
    }

    /**
     * @param value The shared IPSec key. A key could be provided if a Site-to-Site, VNet-to-VNet or ExpressRoute connection is created.
     */
    @JvmName("rulhmqhlmlaxnqpn")
    public suspend fun sharedKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sharedKey = mapped
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("rapihtsfwfkhgfhf")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags to assign to the resource.
     */
    @JvmName("grrcnudkwqvysaje")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value One or more `traffic_selector_policy` blocks which are documented below.
     * A `traffic_selector_policy` allows to specify a traffic selector policy proposal to be used in a virtual network gateway connection.
     * For details about traffic selectors refer to [the relevant section in the Azure documentation](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-connect-multiple-policybased-rm-ps).
     */
    @JvmName("bdkkcnffsxunbgjo")
    public suspend
    fun trafficSelectorPolicy(`value`: VirtualNetworkGatewayConnectionTrafficSelectorPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.trafficSelectorPolicy = mapped
    }

    /**
     * @param argument One or more `traffic_selector_policy` blocks which are documented below.
     * A `traffic_selector_policy` allows to specify a traffic selector policy proposal to be used in a virtual network gateway connection.
     * For details about traffic selectors refer to [the relevant section in the Azure documentation](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-connect-multiple-policybased-rm-ps).
     */
    @JvmName("tyjvrlhgvodljuon")
    public suspend
    fun trafficSelectorPolicy(argument: suspend VirtualNetworkGatewayConnectionTrafficSelectorPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = VirtualNetworkGatewayConnectionTrafficSelectorPolicyArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.trafficSelectorPolicy = mapped
    }

    /**
     * @param value The type of connection. Valid options are `IPsec` (Site-to-Site), `ExpressRoute` (ExpressRoute), and `Vnet2Vnet` (VNet-to-VNet). Each connection type requires different mandatory arguments (refer to the examples above). Changing this forces a new resource to be created.
     */
    @JvmName("mqvynfvxxeebtrwm")
    public suspend fun type(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value If `true`, policy-based traffic selectors are enabled for this connection. Enabling policy-based traffic selectors requires an `ipsec_policy` block. Defaults to `false`.
     */
    @JvmName("ygogrubrwfootvxv")
    public suspend fun usePolicyBasedTrafficSelectors(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.usePolicyBasedTrafficSelectors = mapped
    }

    /**
     * @param value The ID of the Virtual Network Gateway in which the connection will be created. Changing this forces a new resource to be created.
     */
    @JvmName("trnmiqdkiqjuoatf")
    public suspend fun virtualNetworkGatewayId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.virtualNetworkGatewayId = mapped
    }

    internal fun build(): VirtualNetworkGatewayConnectionArgs = VirtualNetworkGatewayConnectionArgs(
        authorizationKey = authorizationKey,
        connectionMode = connectionMode,
        connectionProtocol = connectionProtocol,
        customBgpAddresses = customBgpAddresses,
        dpdTimeoutSeconds = dpdTimeoutSeconds,
        egressNatRuleIds = egressNatRuleIds,
        enableBgp = enableBgp,
        expressRouteCircuitId = expressRouteCircuitId,
        expressRouteGatewayBypass = expressRouteGatewayBypass,
        ingressNatRuleIds = ingressNatRuleIds,
        ipsecPolicy = ipsecPolicy,
        localAzureIpAddressEnabled = localAzureIpAddressEnabled,
        localNetworkGatewayId = localNetworkGatewayId,
        location = location,
        name = name,
        peerVirtualNetworkGatewayId = peerVirtualNetworkGatewayId,
        privateLinkFastPathEnabled = privateLinkFastPathEnabled,
        resourceGroupName = resourceGroupName,
        routingWeight = routingWeight,
        sharedKey = sharedKey,
        tags = tags,
        trafficSelectorPolicy = trafficSelectorPolicy,
        type = type,
        usePolicyBasedTrafficSelectors = usePolicyBasedTrafficSelectors,
        virtualNetworkGatewayId = virtualNetworkGatewayId,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy