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

com.pulumi.azurenative.network.kotlin.NatGatewayArgs.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.NatGatewayArgs.builder
import com.pulumi.azurenative.network.kotlin.inputs.NatGatewaySkuArgs
import com.pulumi.azurenative.network.kotlin.inputs.NatGatewaySkuArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.SubResourceArgs
import com.pulumi.azurenative.network.kotlin.inputs.SubResourceArgsBuilder
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.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

/**
 * Nat Gateway resource.
 * Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-11-01.
 * Other available API versions: 2019-06-01, 2019-08-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01.
 * ## Example Usage
 * ### Create nat gateway
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var natGateway = new AzureNative.Network.NatGateway("natGateway", new()
 *     {
 *         Location = "westus",
 *         NatGatewayName = "test-natgateway",
 *         PublicIpAddresses = new[]
 *         {
 *             new AzureNative.Network.Inputs.SubResourceArgs
 *             {
 *                 Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1",
 *             },
 *         },
 *         PublicIpPrefixes = new[]
 *         {
 *             new AzureNative.Network.Inputs.SubResourceArgs
 *             {
 *                 Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1",
 *             },
 *         },
 *         ResourceGroupName = "rg1",
 *         Sku = new AzureNative.Network.Inputs.NatGatewaySkuArgs
 *         {
 *             Name = AzureNative.Network.NatGatewaySkuName.Standard,
 *         },
 *     });
 * });
 * ```
 * ```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.NewNatGateway(ctx, "natGateway", &network.NatGatewayArgs{
 * 			Location:       pulumi.String("westus"),
 * 			NatGatewayName: pulumi.String("test-natgateway"),
 * 			PublicIpAddresses: network.SubResourceArray{
 * 				&network.SubResourceArgs{
 * 					Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1"),
 * 				},
 * 			},
 * 			PublicIpPrefixes: network.SubResourceArray{
 * 				&network.SubResourceArgs{
 * 					Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1"),
 * 				},
 * 			},
 * 			ResourceGroupName: pulumi.String("rg1"),
 * 			Sku: &network.NatGatewaySkuArgs{
 * 				Name: pulumi.String(network.NatGatewaySkuNameStandard),
 * 			},
 * 		})
 * 		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.NatGateway;
 * import com.pulumi.azurenative.network.NatGatewayArgs;
 * import com.pulumi.azurenative.network.inputs.SubResourceArgs;
 * import com.pulumi.azurenative.network.inputs.NatGatewaySkuArgs;
 * 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 natGateway = new NatGateway("natGateway", NatGatewayArgs.builder()
 *             .location("westus")
 *             .natGatewayName("test-natgateway")
 *             .publicIpAddresses(SubResourceArgs.builder()
 *                 .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1")
 *                 .build())
 *             .publicIpPrefixes(SubResourceArgs.builder()
 *                 .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1")
 *                 .build())
 *             .resourceGroupName("rg1")
 *             .sku(NatGatewaySkuArgs.builder()
 *                 .name("Standard")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:network:NatGateway test-natGateway /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}
 * ```
 * @property id Resource ID.
 * @property idleTimeoutInMinutes The idle timeout of the nat gateway.
 * @property location Resource location.
 * @property natGatewayName The name of the nat gateway.
 * @property publicIpAddresses An array of public ip addresses associated with the nat gateway resource.
 * @property publicIpPrefixes An array of public ip prefixes associated with the nat gateway resource.
 * @property resourceGroupName The name of the resource group.
 * @property sku The nat gateway SKU.
 * @property tags Resource tags.
 * @property zones A list of availability zones denoting the zone in which Nat Gateway should be deployed.
 */
public data class NatGatewayArgs(
    public val id: Output? = null,
    public val idleTimeoutInMinutes: Output? = null,
    public val location: Output? = null,
    public val natGatewayName: Output? = null,
    public val publicIpAddresses: Output>? = null,
    public val publicIpPrefixes: Output>? = null,
    public val resourceGroupName: Output? = null,
    public val sku: Output? = null,
    public val tags: Output>? = null,
    public val zones: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.network.NatGatewayArgs =
        com.pulumi.azurenative.network.NatGatewayArgs.builder()
            .id(id?.applyValue({ args0 -> args0 }))
            .idleTimeoutInMinutes(idleTimeoutInMinutes?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .natGatewayName(natGatewayName?.applyValue({ args0 -> args0 }))
            .publicIpAddresses(
                publicIpAddresses?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .publicIpPrefixes(
                publicIpPrefixes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .sku(sku?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .zones(zones?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [NatGatewayArgs].
 */
@PulumiTagMarker
public class NatGatewayArgsBuilder internal constructor() {
    private var id: Output? = null

    private var idleTimeoutInMinutes: Output? = null

    private var location: Output? = null

    private var natGatewayName: Output? = null

    private var publicIpAddresses: Output>? = null

    private var publicIpPrefixes: Output>? = null

    private var resourceGroupName: Output? = null

    private var sku: Output? = null

    private var tags: Output>? = null

    private var zones: Output>? = null

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

    /**
     * @param value The idle timeout of the nat gateway.
     */
    @JvmName("cttwdqurampwdjmi")
    public suspend fun idleTimeoutInMinutes(`value`: Output) {
        this.idleTimeoutInMinutes = value
    }

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

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

    /**
     * @param value An array of public ip addresses associated with the nat gateway resource.
     */
    @JvmName("jxucqvxpskxvaopl")
    public suspend fun publicIpAddresses(`value`: Output>) {
        this.publicIpAddresses = value
    }

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

    /**
     * @param values An array of public ip addresses associated with the nat gateway resource.
     */
    @JvmName("galtuqyhlnicmvtl")
    public suspend fun publicIpAddresses(values: List>) {
        this.publicIpAddresses = Output.all(values)
    }

    /**
     * @param value An array of public ip prefixes associated with the nat gateway resource.
     */
    @JvmName("cdvthgtnstihtqel")
    public suspend fun publicIpPrefixes(`value`: Output>) {
        this.publicIpPrefixes = value
    }

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

    /**
     * @param values An array of public ip prefixes associated with the nat gateway resource.
     */
    @JvmName("dhxrxwocsrnpwtbk")
    public suspend fun publicIpPrefixes(values: List>) {
        this.publicIpPrefixes = Output.all(values)
    }

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

    /**
     * @param value The nat gateway SKU.
     */
    @JvmName("ppmkmkbqxwbsgsyy")
    public suspend fun sku(`value`: Output) {
        this.sku = value
    }

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

    /**
     * @param value A list of availability zones denoting the zone in which Nat Gateway should be deployed.
     */
    @JvmName("sphubrbaeyjahuoi")
    public suspend fun zones(`value`: Output>) {
        this.zones = value
    }

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

    /**
     * @param values A list of availability zones denoting the zone in which Nat Gateway should be deployed.
     */
    @JvmName("ehapdvwkgkgofmnr")
    public suspend fun zones(values: List>) {
        this.zones = Output.all(values)
    }

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

    /**
     * @param value The idle timeout of the nat gateway.
     */
    @JvmName("vcpcffsmkpatwckb")
    public suspend fun idleTimeoutInMinutes(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.idleTimeoutInMinutes = mapped
    }

    /**
     * @param value Resource location.
     */
    @JvmName("rtgrakynuolrnxxk")
    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 nat gateway.
     */
    @JvmName("knvsmsouhtxcflcl")
    public suspend fun natGatewayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.natGatewayName = mapped
    }

    /**
     * @param value An array of public ip addresses associated with the nat gateway resource.
     */
    @JvmName("todhgpyoskiuvygt")
    public suspend fun publicIpAddresses(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicIpAddresses = mapped
    }

    /**
     * @param argument An array of public ip addresses associated with the nat gateway resource.
     */
    @JvmName("uxqrwacdottptvky")
    public suspend fun publicIpAddresses(argument: List Unit>) {
        val toBeMapped = argument.toList().map { SubResourceArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.publicIpAddresses = mapped
    }

    /**
     * @param argument An array of public ip addresses associated with the nat gateway resource.
     */
    @JvmName("opfbrdkccojmmpam")
    public suspend fun publicIpAddresses(vararg argument: suspend SubResourceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { SubResourceArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.publicIpAddresses = mapped
    }

    /**
     * @param argument An array of public ip addresses associated with the nat gateway resource.
     */
    @JvmName("okryildnashepkbq")
    public suspend fun publicIpAddresses(argument: suspend SubResourceArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(SubResourceArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.publicIpAddresses = mapped
    }

    /**
     * @param values An array of public ip addresses associated with the nat gateway resource.
     */
    @JvmName("ooubqhedefyhjios")
    public suspend fun publicIpAddresses(vararg values: SubResourceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.publicIpAddresses = mapped
    }

    /**
     * @param value An array of public ip prefixes associated with the nat gateway resource.
     */
    @JvmName("bdddvttmpwlibvqt")
    public suspend fun publicIpPrefixes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicIpPrefixes = mapped
    }

    /**
     * @param argument An array of public ip prefixes associated with the nat gateway resource.
     */
    @JvmName("gbnexoilxfnvdeqt")
    public suspend fun publicIpPrefixes(argument: List Unit>) {
        val toBeMapped = argument.toList().map { SubResourceArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.publicIpPrefixes = mapped
    }

    /**
     * @param argument An array of public ip prefixes associated with the nat gateway resource.
     */
    @JvmName("eksimnyoryagulmb")
    public suspend fun publicIpPrefixes(vararg argument: suspend SubResourceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { SubResourceArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.publicIpPrefixes = mapped
    }

    /**
     * @param argument An array of public ip prefixes associated with the nat gateway resource.
     */
    @JvmName("befycjlupbsftpen")
    public suspend fun publicIpPrefixes(argument: suspend SubResourceArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(SubResourceArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.publicIpPrefixes = mapped
    }

    /**
     * @param values An array of public ip prefixes associated with the nat gateway resource.
     */
    @JvmName("jcgdqojlftjpieqf")
    public suspend fun publicIpPrefixes(vararg values: SubResourceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.publicIpPrefixes = mapped
    }

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

    /**
     * @param value The nat gateway SKU.
     */
    @JvmName("nftsusccxcwxicxd")
    public suspend fun sku(`value`: NatGatewaySkuArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sku = mapped
    }

    /**
     * @param argument The nat gateway SKU.
     */
    @JvmName("apglbeqmoydrdllr")
    public suspend fun sku(argument: suspend NatGatewaySkuArgsBuilder.() -> Unit) {
        val toBeMapped = NatGatewaySkuArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sku = mapped
    }

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

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

    /**
     * @param value A list of availability zones denoting the zone in which Nat Gateway should be deployed.
     */
    @JvmName("egyffyswyklrpyea")
    public suspend fun zones(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zones = mapped
    }

    /**
     * @param values A list of availability zones denoting the zone in which Nat Gateway should be deployed.
     */
    @JvmName("jnwyeqaqawxdngvq")
    public suspend fun zones(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.zones = mapped
    }

    internal fun build(): NatGatewayArgs = NatGatewayArgs(
        id = id,
        idleTimeoutInMinutes = idleTimeoutInMinutes,
        location = location,
        natGatewayName = natGatewayName,
        publicIpAddresses = publicIpAddresses,
        publicIpPrefixes = publicIpPrefixes,
        resourceGroupName = resourceGroupName,
        sku = sku,
        tags = tags,
        zones = zones,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy