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

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

package com.pulumi.azure.network.kotlin

import com.pulumi.azure.network.VnpGatewayNatRuleArgs.builder
import com.pulumi.azure.network.kotlin.inputs.VnpGatewayNatRuleExternalMappingArgs
import com.pulumi.azure.network.kotlin.inputs.VnpGatewayNatRuleExternalMappingArgsBuilder
import com.pulumi.azure.network.kotlin.inputs.VnpGatewayNatRuleInternalMappingArgs
import com.pulumi.azure.network.kotlin.inputs.VnpGatewayNatRuleInternalMappingArgsBuilder
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.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Manages a VPN Gateway NAT Rule.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleVirtualWan = new azure.network.VirtualWan("example", {
 *     name: "example-vwan",
 *     resourceGroupName: example.name,
 *     location: example.location,
 * });
 * const exampleVirtualHub = new azure.network.VirtualHub("example", {
 *     name: "example-vhub",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     addressPrefix: "10.0.1.0/24",
 *     virtualWanId: exampleVirtualWan.id,
 * });
 * const exampleVpnGateway = new azure.network.VpnGateway("example", {
 *     name: "example-vpngateway",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     virtualHubId: exampleVirtualHub.id,
 * });
 * const exampleVnpGatewayNatRule = new azure.network.VnpGatewayNatRule("example", {
 *     name: "example-vpngatewaynatrule",
 *     vpnGatewayId: exampleVpnGateway.id,
 *     externalMappings: [{
 *         addressSpace: "192.168.21.0/26",
 *     }],
 *     internalMappings: [{
 *         addressSpace: "10.4.0.0/26",
 *     }],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_virtual_wan = azure.network.VirtualWan("example",
 *     name="example-vwan",
 *     resource_group_name=example.name,
 *     location=example.location)
 * example_virtual_hub = azure.network.VirtualHub("example",
 *     name="example-vhub",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     address_prefix="10.0.1.0/24",
 *     virtual_wan_id=example_virtual_wan.id)
 * example_vpn_gateway = azure.network.VpnGateway("example",
 *     name="example-vpngateway",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     virtual_hub_id=example_virtual_hub.id)
 * example_vnp_gateway_nat_rule = azure.network.VnpGatewayNatRule("example",
 *     name="example-vpngatewaynatrule",
 *     vpn_gateway_id=example_vpn_gateway.id,
 *     external_mappings=[azure.network.VnpGatewayNatRuleExternalMappingArgs(
 *         address_space="192.168.21.0/26",
 *     )],
 *     internal_mappings=[azure.network.VnpGatewayNatRuleInternalMappingArgs(
 *         address_space="10.4.0.0/26",
 *     )])
 * ```
 * ```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 = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleVirtualWan = new Azure.Network.VirtualWan("example", new()
 *     {
 *         Name = "example-vwan",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *     });
 *     var exampleVirtualHub = new Azure.Network.VirtualHub("example", new()
 *     {
 *         Name = "example-vhub",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         AddressPrefix = "10.0.1.0/24",
 *         VirtualWanId = exampleVirtualWan.Id,
 *     });
 *     var exampleVpnGateway = new Azure.Network.VpnGateway("example", new()
 *     {
 *         Name = "example-vpngateway",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         VirtualHubId = exampleVirtualHub.Id,
 *     });
 *     var exampleVnpGatewayNatRule = new Azure.Network.VnpGatewayNatRule("example", new()
 *     {
 *         Name = "example-vpngatewaynatrule",
 *         VpnGatewayId = exampleVpnGateway.Id,
 *         ExternalMappings = new[]
 *         {
 *             new Azure.Network.Inputs.VnpGatewayNatRuleExternalMappingArgs
 *             {
 *                 AddressSpace = "192.168.21.0/26",
 *             },
 *         },
 *         InternalMappings = new[]
 *         {
 *             new Azure.Network.Inputs.VnpGatewayNatRuleInternalMappingArgs
 *             {
 *                 AddressSpace = "10.4.0.0/26",
 *             },
 *         },
 *     });
 * });
 * ```
 * ```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("example-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleVirtualWan, err := network.NewVirtualWan(ctx, "example", &network.VirtualWanArgs{
 * 			Name:              pulumi.String("example-vwan"),
 * 			ResourceGroupName: example.Name,
 * 			Location:          example.Location,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleVirtualHub, err := network.NewVirtualHub(ctx, "example", &network.VirtualHubArgs{
 * 			Name:              pulumi.String("example-vhub"),
 * 			ResourceGroupName: example.Name,
 * 			Location:          example.Location,
 * 			AddressPrefix:     pulumi.String("10.0.1.0/24"),
 * 			VirtualWanId:      exampleVirtualWan.ID(),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleVpnGateway, err := network.NewVpnGateway(ctx, "example", &network.VpnGatewayArgs{
 * 			Name:              pulumi.String("example-vpngateway"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			VirtualHubId:      exampleVirtualHub.ID(),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = network.NewVnpGatewayNatRule(ctx, "example", &network.VnpGatewayNatRuleArgs{
 * 			Name:         pulumi.String("example-vpngatewaynatrule"),
 * 			VpnGatewayId: exampleVpnGateway.ID(),
 * 			ExternalMappings: network.VnpGatewayNatRuleExternalMappingArray{
 * 				&network.VnpGatewayNatRuleExternalMappingArgs{
 * 					AddressSpace: pulumi.String("192.168.21.0/26"),
 * 				},
 * 			},
 * 			InternalMappings: network.VnpGatewayNatRuleInternalMappingArray{
 * 				&network.VnpGatewayNatRuleInternalMappingArgs{
 * 					AddressSpace: pulumi.String("10.4.0.0/26"),
 * 				},
 * 			},
 * 		})
 * 		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.VirtualWan;
 * import com.pulumi.azure.network.VirtualWanArgs;
 * import com.pulumi.azure.network.VirtualHub;
 * import com.pulumi.azure.network.VirtualHubArgs;
 * import com.pulumi.azure.network.VpnGateway;
 * import com.pulumi.azure.network.VpnGatewayArgs;
 * import com.pulumi.azure.network.VnpGatewayNatRule;
 * import com.pulumi.azure.network.VnpGatewayNatRuleArgs;
 * import com.pulumi.azure.network.inputs.VnpGatewayNatRuleExternalMappingArgs;
 * import com.pulumi.azure.network.inputs.VnpGatewayNatRuleInternalMappingArgs;
 * 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("example-resources")
 *             .location("West Europe")
 *             .build());
 *         var exampleVirtualWan = new VirtualWan("exampleVirtualWan", VirtualWanArgs.builder()
 *             .name("example-vwan")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .build());
 *         var exampleVirtualHub = new VirtualHub("exampleVirtualHub", VirtualHubArgs.builder()
 *             .name("example-vhub")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .addressPrefix("10.0.1.0/24")
 *             .virtualWanId(exampleVirtualWan.id())
 *             .build());
 *         var exampleVpnGateway = new VpnGateway("exampleVpnGateway", VpnGatewayArgs.builder()
 *             .name("example-vpngateway")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .virtualHubId(exampleVirtualHub.id())
 *             .build());
 *         var exampleVnpGatewayNatRule = new VnpGatewayNatRule("exampleVnpGatewayNatRule", VnpGatewayNatRuleArgs.builder()
 *             .name("example-vpngatewaynatrule")
 *             .vpnGatewayId(exampleVpnGateway.id())
 *             .externalMappings(VnpGatewayNatRuleExternalMappingArgs.builder()
 *                 .addressSpace("192.168.21.0/26")
 *                 .build())
 *             .internalMappings(VnpGatewayNatRuleInternalMappingArgs.builder()
 *                 .addressSpace("10.4.0.0/26")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleVirtualWan:
 *     type: azure:network:VirtualWan
 *     name: example
 *     properties:
 *       name: example-vwan
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *   exampleVirtualHub:
 *     type: azure:network:VirtualHub
 *     name: example
 *     properties:
 *       name: example-vhub
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       addressPrefix: 10.0.1.0/24
 *       virtualWanId: ${exampleVirtualWan.id}
 *   exampleVpnGateway:
 *     type: azure:network:VpnGateway
 *     name: example
 *     properties:
 *       name: example-vpngateway
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       virtualHubId: ${exampleVirtualHub.id}
 *   exampleVnpGatewayNatRule:
 *     type: azure:network:VnpGatewayNatRule
 *     name: example
 *     properties:
 *       name: example-vpngatewaynatrule
 *       vpnGatewayId: ${exampleVpnGateway.id}
 *       externalMappings:
 *         - addressSpace: 192.168.21.0/26
 *       internalMappings:
 *         - addressSpace: 10.4.0.0/26
 * ```
 * 
 * ## Import
 * VPN Gateway NAT Rules can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:network/vnpGatewayNatRule:VnpGatewayNatRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Network/vpnGateways/vpnGateway1/natRules/natRule1
 * ```
 * @property externalAddressSpaceMappings
 * @property externalMappings One of more `external_mapping` blocks as defined below.
 * @property internalAddressSpaceMappings
 * @property internalMappings One of more `internal_mapping` blocks as defined below.
 * @property ipConfigurationId The ID of the IP Configuration this VPN Gateway NAT Rule applies to. Possible values are `Instance0` and `Instance1`.
 * @property mode The source NAT direction of the VPN NAT. Possible values are `EgressSnat` and `IngressSnat`. Defaults to `EgressSnat`. Changing this forces a new resource to be created.
 * @property name The name which should be used for this VPN Gateway NAT Rule. Changing this forces a new resource to be created.
 * @property resourceGroupName
 * @property type The type of the VPN Gateway NAT Rule. Possible values are `Dynamic` and `Static`. Defaults to `Static`. Changing this forces a new resource to be created.
 * @property vpnGatewayId The ID of the VPN Gateway that this VPN Gateway NAT Rule belongs to. Changing this forces a new resource to be created.
 */
public data class VnpGatewayNatRuleArgs(
    @Deprecated(
        message = """
  `external_address_space_mappings` will be removed in favour of the property `external_mapping` in
      version 4.0 of the AzureRM Provider.
  """,
    )
    public val externalAddressSpaceMappings: Output>? = null,
    public val externalMappings: Output>? = null,
    @Deprecated(
        message = """
  `internal_address_space_mappings` will be removed in favour of the property `internal_mapping` in
      version 4.0 of the AzureRM Provider.
  """,
    )
    public val internalAddressSpaceMappings: Output>? = null,
    public val internalMappings: Output>? = null,
    public val ipConfigurationId: Output? = null,
    public val mode: Output? = null,
    public val name: Output? = null,
    @Deprecated(
        message = """
  The property `resource_group_name` has been superseded by `vpn_gateway_id` and will be removed in
      v4.0 of the AzureRM provider
  """,
    )
    public val resourceGroupName: Output? = null,
    public val type: Output? = null,
    public val vpnGatewayId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.network.VnpGatewayNatRuleArgs =
        com.pulumi.azure.network.VnpGatewayNatRuleArgs.builder()
            .externalAddressSpaceMappings(
                externalAddressSpaceMappings?.applyValue({ args0 ->
                    args0.map({ args0 -> args0 })
                }),
            )
            .externalMappings(
                externalMappings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .internalAddressSpaceMappings(
                internalAddressSpaceMappings?.applyValue({ args0 ->
                    args0.map({ args0 -> args0 })
                }),
            )
            .internalMappings(
                internalMappings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .ipConfigurationId(ipConfigurationId?.applyValue({ args0 -> args0 }))
            .mode(mode?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .type(type?.applyValue({ args0 -> args0 }))
            .vpnGatewayId(vpnGatewayId?.applyValue({ args0 -> args0 })).build()
}

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

    private var externalMappings: Output>? = null

    private var internalAddressSpaceMappings: Output>? = null

    private var internalMappings: Output>? = null

    private var ipConfigurationId: Output? = null

    private var mode: Output? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

    private var type: Output? = null

    private var vpnGatewayId: Output? = null

    /**
     * @param value
     */
    @Deprecated(
        message = """
  `external_address_space_mappings` will be removed in favour of the property `external_mapping` in
      version 4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("wiucpdsmrgumrwgi")
    public suspend fun externalAddressSpaceMappings(`value`: Output>) {
        this.externalAddressSpaceMappings = value
    }

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

    /**
     * @param values
     */
    @Deprecated(
        message = """
  `external_address_space_mappings` will be removed in favour of the property `external_mapping` in
      version 4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("suekqqnbnoensmlp")
    public suspend fun externalAddressSpaceMappings(values: List>) {
        this.externalAddressSpaceMappings = Output.all(values)
    }

    /**
     * @param value One of more `external_mapping` blocks as defined below.
     */
    @JvmName("rusxwwuidjgybusk")
    public suspend fun externalMappings(`value`: Output>) {
        this.externalMappings = value
    }

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

    /**
     * @param values One of more `external_mapping` blocks as defined below.
     */
    @JvmName("nbsyxbgibbscakmb")
    public suspend fun externalMappings(values: List>) {
        this.externalMappings = Output.all(values)
    }

    /**
     * @param value
     */
    @Deprecated(
        message = """
  `internal_address_space_mappings` will be removed in favour of the property `internal_mapping` in
      version 4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("hxyjkoocwbfjefka")
    public suspend fun internalAddressSpaceMappings(`value`: Output>) {
        this.internalAddressSpaceMappings = value
    }

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

    /**
     * @param values
     */
    @Deprecated(
        message = """
  `internal_address_space_mappings` will be removed in favour of the property `internal_mapping` in
      version 4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("uvnvwwuwdvbeqnuk")
    public suspend fun internalAddressSpaceMappings(values: List>) {
        this.internalAddressSpaceMappings = Output.all(values)
    }

    /**
     * @param value One of more `internal_mapping` blocks as defined below.
     */
    @JvmName("ymslupacqxumngan")
    public suspend fun internalMappings(`value`: Output>) {
        this.internalMappings = value
    }

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

    /**
     * @param values One of more `internal_mapping` blocks as defined below.
     */
    @JvmName("ctksgmehdefnutsg")
    public suspend fun internalMappings(values: List>) {
        this.internalMappings = Output.all(values)
    }

    /**
     * @param value The ID of the IP Configuration this VPN Gateway NAT Rule applies to. Possible values are `Instance0` and `Instance1`.
     */
    @JvmName("cqkrhrmoqwxqpafu")
    public suspend fun ipConfigurationId(`value`: Output) {
        this.ipConfigurationId = value
    }

    /**
     * @param value The source NAT direction of the VPN NAT. Possible values are `EgressSnat` and `IngressSnat`. Defaults to `EgressSnat`. Changing this forces a new resource to be created.
     */
    @JvmName("cktmhyofwkpygvhn")
    public suspend fun mode(`value`: Output) {
        this.mode = value
    }

    /**
     * @param value The name which should be used for this VPN Gateway NAT Rule. Changing this forces a new resource to be created.
     */
    @JvmName("sqdtcelpqwigxkbf")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value
     */
    @Deprecated(
        message = """
  The property `resource_group_name` has been superseded by `vpn_gateway_id` and will be removed in
      v4.0 of the AzureRM provider
  """,
    )
    @JvmName("ktipjorrdrahycho")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The type of the VPN Gateway NAT Rule. Possible values are `Dynamic` and `Static`. Defaults to `Static`. Changing this forces a new resource to be created.
     */
    @JvmName("obushstpewapjhdd")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value The ID of the VPN Gateway that this VPN Gateway NAT Rule belongs to. Changing this forces a new resource to be created.
     */
    @JvmName("glwpgxjgijndnnxg")
    public suspend fun vpnGatewayId(`value`: Output) {
        this.vpnGatewayId = value
    }

    /**
     * @param value
     */
    @Deprecated(
        message = """
  `external_address_space_mappings` will be removed in favour of the property `external_mapping` in
      version 4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("nolojwsrlqhsjlpf")
    public suspend fun externalAddressSpaceMappings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.externalAddressSpaceMappings = mapped
    }

    /**
     * @param values
     */
    @Deprecated(
        message = """
  `external_address_space_mappings` will be removed in favour of the property `external_mapping` in
      version 4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("rrjfixxlhxhcrhxi")
    public suspend fun externalAddressSpaceMappings(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.externalAddressSpaceMappings = mapped
    }

    /**
     * @param value One of more `external_mapping` blocks as defined below.
     */
    @JvmName("aucadeaylrhgilvo")
    public suspend fun externalMappings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.externalMappings = mapped
    }

    /**
     * @param argument One of more `external_mapping` blocks as defined below.
     */
    @JvmName("ukrmrmccyxjjaehl")
    public suspend
    fun externalMappings(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            VnpGatewayNatRuleExternalMappingArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.externalMappings = mapped
    }

    /**
     * @param argument One of more `external_mapping` blocks as defined below.
     */
    @JvmName("hetcuhkfavklwuju")
    public suspend fun externalMappings(
        vararg
        argument: suspend VnpGatewayNatRuleExternalMappingArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            VnpGatewayNatRuleExternalMappingArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.externalMappings = mapped
    }

    /**
     * @param argument One of more `external_mapping` blocks as defined below.
     */
    @JvmName("kinybydpofimuefp")
    public suspend
    fun externalMappings(argument: suspend VnpGatewayNatRuleExternalMappingArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            VnpGatewayNatRuleExternalMappingArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.externalMappings = mapped
    }

    /**
     * @param values One of more `external_mapping` blocks as defined below.
     */
    @JvmName("dcixbhygjhmmcwdi")
    public suspend fun externalMappings(vararg values: VnpGatewayNatRuleExternalMappingArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.externalMappings = mapped
    }

    /**
     * @param value
     */
    @Deprecated(
        message = """
  `internal_address_space_mappings` will be removed in favour of the property `internal_mapping` in
      version 4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("onpekferamyjsxna")
    public suspend fun internalAddressSpaceMappings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.internalAddressSpaceMappings = mapped
    }

    /**
     * @param values
     */
    @Deprecated(
        message = """
  `internal_address_space_mappings` will be removed in favour of the property `internal_mapping` in
      version 4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("cqytsfuvmlrqimxp")
    public suspend fun internalAddressSpaceMappings(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.internalAddressSpaceMappings = mapped
    }

    /**
     * @param value One of more `internal_mapping` blocks as defined below.
     */
    @JvmName("oyeuhibcjbtljciv")
    public suspend fun internalMappings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.internalMappings = mapped
    }

    /**
     * @param argument One of more `internal_mapping` blocks as defined below.
     */
    @JvmName("brrwsvnenqjuxajy")
    public suspend
    fun internalMappings(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            VnpGatewayNatRuleInternalMappingArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.internalMappings = mapped
    }

    /**
     * @param argument One of more `internal_mapping` blocks as defined below.
     */
    @JvmName("hohihkvpfysrhcoo")
    public suspend fun internalMappings(
        vararg
        argument: suspend VnpGatewayNatRuleInternalMappingArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            VnpGatewayNatRuleInternalMappingArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.internalMappings = mapped
    }

    /**
     * @param argument One of more `internal_mapping` blocks as defined below.
     */
    @JvmName("hkxiurhpyhtjsuog")
    public suspend
    fun internalMappings(argument: suspend VnpGatewayNatRuleInternalMappingArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            VnpGatewayNatRuleInternalMappingArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.internalMappings = mapped
    }

    /**
     * @param values One of more `internal_mapping` blocks as defined below.
     */
    @JvmName("jkhfyyaxorqxrwng")
    public suspend fun internalMappings(vararg values: VnpGatewayNatRuleInternalMappingArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.internalMappings = mapped
    }

    /**
     * @param value The ID of the IP Configuration this VPN Gateway NAT Rule applies to. Possible values are `Instance0` and `Instance1`.
     */
    @JvmName("waldmxcuskjgypar")
    public suspend fun ipConfigurationId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipConfigurationId = mapped
    }

    /**
     * @param value The source NAT direction of the VPN NAT. Possible values are `EgressSnat` and `IngressSnat`. Defaults to `EgressSnat`. Changing this forces a new resource to be created.
     */
    @JvmName("rxkkeprdrofqdgqr")
    public suspend fun mode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mode = mapped
    }

    /**
     * @param value The name which should be used for this VPN Gateway NAT Rule. Changing this forces a new resource to be created.
     */
    @JvmName("wgtvrvbkikdhehtt")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value
     */
    @Deprecated(
        message = """
  The property `resource_group_name` has been superseded by `vpn_gateway_id` and will be removed in
      v4.0 of the AzureRM provider
  """,
    )
    @JvmName("lqtlofeprimnpghp")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value The type of the VPN Gateway NAT Rule. Possible values are `Dynamic` and `Static`. Defaults to `Static`. Changing this forces a new resource to be created.
     */
    @JvmName("yhvejvmcteuaipiy")
    public suspend fun type(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value The ID of the VPN Gateway that this VPN Gateway NAT Rule belongs to. Changing this forces a new resource to be created.
     */
    @JvmName("qdhmrpwdvtnvunxl")
    public suspend fun vpnGatewayId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vpnGatewayId = mapped
    }

    internal fun build(): VnpGatewayNatRuleArgs = VnpGatewayNatRuleArgs(
        externalAddressSpaceMappings = externalAddressSpaceMappings,
        externalMappings = externalMappings,
        internalAddressSpaceMappings = internalAddressSpaceMappings,
        internalMappings = internalMappings,
        ipConfigurationId = ipConfigurationId,
        mode = mode,
        name = name,
        resourceGroupName = resourceGroupName,
        type = type,
        vpnGatewayId = vpnGatewayId,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy