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

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

package com.pulumi.azurenative.network.kotlin

import com.pulumi.azurenative.network.LocalNetworkGatewayArgs.builder
import com.pulumi.azurenative.network.kotlin.inputs.AddressSpaceArgs
import com.pulumi.azurenative.network.kotlin.inputs.AddressSpaceArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.BgpSettingsArgs
import com.pulumi.azurenative.network.kotlin.inputs.BgpSettingsArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * A common class for general resource information.
 * Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-11-01.
 * Other available API versions: 2016-06-01, 2016-09-01, 2019-08-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01.
 * ## Example Usage
 * ### CreateLocalNetworkGateway
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var localNetworkGateway = new AzureNative.Network.LocalNetworkGateway("localNetworkGateway", new()
 *     {
 *         Fqdn = "site1.contoso.com",
 *         GatewayIpAddress = "11.12.13.14",
 *         LocalNetworkAddressSpace = new AzureNative.Network.Inputs.AddressSpaceArgs
 *         {
 *             AddressPrefixes = new[]
 *             {
 *                 "10.1.0.0/16",
 *             },
 *         },
 *         LocalNetworkGatewayName = "localgw",
 *         Location = "Central US",
 *         ResourceGroupName = "rg1",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := network.NewLocalNetworkGateway(ctx, "localNetworkGateway", &network.LocalNetworkGatewayArgs{
 * 			Fqdn:             pulumi.String("site1.contoso.com"),
 * 			GatewayIpAddress: pulumi.String("11.12.13.14"),
 * 			LocalNetworkAddressSpace: &network.AddressSpaceArgs{
 * 				AddressPrefixes: pulumi.StringArray{
 * 					pulumi.String("10.1.0.0/16"),
 * 				},
 * 			},
 * 			LocalNetworkGatewayName: pulumi.String("localgw"),
 * 			Location:                pulumi.String("Central US"),
 * 			ResourceGroupName:       pulumi.String("rg1"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.network.LocalNetworkGateway;
 * import com.pulumi.azurenative.network.LocalNetworkGatewayArgs;
 * import com.pulumi.azurenative.network.inputs.AddressSpaceArgs;
 * 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 localNetworkGateway = new LocalNetworkGateway("localNetworkGateway", LocalNetworkGatewayArgs.builder()
 *             .fqdn("site1.contoso.com")
 *             .gatewayIpAddress("11.12.13.14")
 *             .localNetworkAddressSpace(AddressSpaceArgs.builder()
 *                 .addressPrefixes("10.1.0.0/16")
 *                 .build())
 *             .localNetworkGatewayName("localgw")
 *             .location("Central US")
 *             .resourceGroupName("rg1")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:network:LocalNetworkGateway localgw /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}
 * ```
 * @property bgpSettings Local network gateway's BGP speaker settings.
 * @property fqdn FQDN of local network gateway.
 * @property gatewayIpAddress IP address of local network gateway.
 * @property id Resource ID.
 * @property localNetworkAddressSpace Local network site address space.
 * @property localNetworkGatewayName The name of the local network gateway.
 * @property location Resource location.
 * @property resourceGroupName The name of the resource group.
 * @property tags Resource tags.
 */
public data class LocalNetworkGatewayArgs(
    public val bgpSettings: Output? = null,
    public val fqdn: Output? = null,
    public val gatewayIpAddress: Output? = null,
    public val id: Output? = null,
    public val localNetworkAddressSpace: Output? = null,
    public val localNetworkGatewayName: Output? = null,
    public val location: Output? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.network.LocalNetworkGatewayArgs =
        com.pulumi.azurenative.network.LocalNetworkGatewayArgs.builder()
            .bgpSettings(bgpSettings?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .fqdn(fqdn?.applyValue({ args0 -> args0 }))
            .gatewayIpAddress(gatewayIpAddress?.applyValue({ args0 -> args0 }))
            .id(id?.applyValue({ args0 -> args0 }))
            .localNetworkAddressSpace(
                localNetworkAddressSpace?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .localNetworkGatewayName(localNetworkGatewayName?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [LocalNetworkGatewayArgs].
 */
@PulumiTagMarker
public class LocalNetworkGatewayArgsBuilder internal constructor() {
    private var bgpSettings: Output? = null

    private var fqdn: Output? = null

    private var gatewayIpAddress: Output? = null

    private var id: Output? = null

    private var localNetworkAddressSpace: Output? = null

    private var localNetworkGatewayName: Output? = null

    private var location: Output? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Local network gateway's BGP speaker settings.
     */
    @JvmName("yaaernpsrbycqfdk")
    public suspend fun bgpSettings(`value`: Output) {
        this.bgpSettings = value
    }

    /**
     * @param value FQDN of local network gateway.
     */
    @JvmName("mhorulebjklmkylp")
    public suspend fun fqdn(`value`: Output) {
        this.fqdn = value
    }

    /**
     * @param value IP address of local network gateway.
     */
    @JvmName("lcqvchmbvsjjlojh")
    public suspend fun gatewayIpAddress(`value`: Output) {
        this.gatewayIpAddress = value
    }

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

    /**
     * @param value Local network site address space.
     */
    @JvmName("tgpjbqusygsifwdq")
    public suspend fun localNetworkAddressSpace(`value`: Output) {
        this.localNetworkAddressSpace = value
    }

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

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

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

    /**
     * @param value Resource tags.
     */
    @JvmName("vkxfahoxgdpowumb")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Local network gateway's BGP speaker settings.
     */
    @JvmName("nwfsssauyjuebdhx")
    public suspend fun bgpSettings(`value`: BgpSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bgpSettings = mapped
    }

    /**
     * @param argument Local network gateway's BGP speaker settings.
     */
    @JvmName("cqbclpvtvjdqgfbj")
    public suspend fun bgpSettings(argument: suspend BgpSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = BgpSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.bgpSettings = mapped
    }

    /**
     * @param value FQDN of local network gateway.
     */
    @JvmName("yjvtenqjcxkuqrar")
    public suspend fun fqdn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fqdn = mapped
    }

    /**
     * @param value IP address of local network gateway.
     */
    @JvmName("yuvlhvllfnfafcta")
    public suspend fun gatewayIpAddress(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.gatewayIpAddress = mapped
    }

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

    /**
     * @param value Local network site address space.
     */
    @JvmName("qpygtfatjbpxsaby")
    public suspend fun localNetworkAddressSpace(`value`: AddressSpaceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.localNetworkAddressSpace = mapped
    }

    /**
     * @param argument Local network site address space.
     */
    @JvmName("ryjaekoadgumnuca")
    public suspend fun localNetworkAddressSpace(argument: suspend AddressSpaceArgsBuilder.() -> Unit) {
        val toBeMapped = AddressSpaceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.localNetworkAddressSpace = mapped
    }

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

    /**
     * @param value Resource location.
     */
    @JvmName("eihngkdypehvhcpd")
    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 resource group.
     */
    @JvmName("chacniwdqrbbddht")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

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

    /**
     * @param values Resource tags.
     */
    @JvmName("fxytwblysxqxldjw")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): LocalNetworkGatewayArgs = LocalNetworkGatewayArgs(
        bgpSettings = bgpSettings,
        fqdn = fqdn,
        gatewayIpAddress = gatewayIpAddress,
        id = id,
        localNetworkAddressSpace = localNetworkAddressSpace,
        localNetworkGatewayName = localNetworkGatewayName,
        location = location,
        resourceGroupName = resourceGroupName,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy