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

com.pulumi.azure.network.kotlin.NatGatewayArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.network.kotlin

import com.pulumi.azure.network.NatGatewayArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages an Azure NAT Gateway.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "nat-gateway-example-rg",
 *     location: "West Europe",
 * });
 * const exampleNatGateway = new azure.network.NatGateway("example", {
 *     name: "nat-Gateway",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     skuName: "Standard",
 *     idleTimeoutInMinutes: 10,
 *     zones: ["1"],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="nat-gateway-example-rg",
 *     location="West Europe")
 * example_nat_gateway = azure.network.NatGateway("example",
 *     name="nat-Gateway",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     sku_name="Standard",
 *     idle_timeout_in_minutes=10,
 *     zones=["1"])
 * ```
 * ```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 = "nat-gateway-example-rg",
 *         Location = "West Europe",
 *     });
 *     var exampleNatGateway = new Azure.Network.NatGateway("example", new()
 *     {
 *         Name = "nat-Gateway",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         SkuName = "Standard",
 *         IdleTimeoutInMinutes = 10,
 *         Zones = new[]
 *         {
 *             "1",
 *         },
 *     });
 * });
 * ```
 * ```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("nat-gateway-example-rg"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = network.NewNatGateway(ctx, "example", &network.NatGatewayArgs{
 * 			Name:                 pulumi.String("nat-Gateway"),
 * 			Location:             example.Location,
 * 			ResourceGroupName:    example.Name,
 * 			SkuName:              pulumi.String("Standard"),
 * 			IdleTimeoutInMinutes: pulumi.Int(10),
 * 			Zones: pulumi.StringArray{
 * 				pulumi.String("1"),
 * 			},
 * 		})
 * 		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.NatGateway;
 * import com.pulumi.azure.network.NatGatewayArgs;
 * 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("nat-gateway-example-rg")
 *             .location("West Europe")
 *             .build());
 *         var exampleNatGateway = new NatGateway("exampleNatGateway", NatGatewayArgs.builder()
 *             .name("nat-Gateway")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .skuName("Standard")
 *             .idleTimeoutInMinutes(10)
 *             .zones("1")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: nat-gateway-example-rg
 *       location: West Europe
 *   exampleNatGateway:
 *     type: azure:network:NatGateway
 *     name: example
 *     properties:
 *       name: nat-Gateway
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       skuName: Standard
 *       idleTimeoutInMinutes: 10
 *       zones:
 *         - '1'
 * ```
 * 
 * For more complete examples, please see the azure.network.NatGatewayPublicIpAssociation and azure.network.NatGatewayPublicIpPrefixAssociation resources.
 * ## Import
 * NAT Gateway can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:network/natGateway:NatGateway test /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/natGateways/gateway1
 * ```
 * @property idleTimeoutInMinutes The idle timeout which should be used in minutes. Defaults to `4`.
 * @property location Specifies the supported Azure location where the NAT Gateway should exist. Changing this forces a new resource to be created.
 * @property name Specifies the name of the NAT Gateway. Changing this forces a new resource to be created.
 * @property resourceGroupName Specifies the name of the Resource Group in which the NAT Gateway should exist. Changing this forces a new resource to be created.
 * @property skuName The SKU which should be used. At this time the only supported value is `Standard`. Defaults to `Standard`.
 * @property tags A mapping of tags to assign to the resource.
 * @property zones A list of Availability Zones in which this NAT Gateway should be located. Changing this forces a new NAT Gateway to be created.
 * > **NOTE:** Only one Availability Zone can be defined. For more information, please check out the [Azure documentation](https://learn.microsoft.com/en-us/azure/nat-gateway/nat-overview#availability-zones)
 */
public data class NatGatewayArgs(
    public val idleTimeoutInMinutes: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
    public val skuName: Output? = null,
    public val tags: Output>? = null,
    public val zones: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.network.NatGatewayArgs =
        com.pulumi.azure.network.NatGatewayArgs.builder()
            .idleTimeoutInMinutes(idleTimeoutInMinutes?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .skuName(skuName?.applyValue({ args0 -> args0 }))
            .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 idleTimeoutInMinutes: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

    private var skuName: Output? = null

    private var tags: Output>? = null

    private var zones: Output>? = null

    /**
     * @param value The idle timeout which should be used in minutes. Defaults to `4`.
     */
    @JvmName("scwtgqdyraoqgbmi")
    public suspend fun idleTimeoutInMinutes(`value`: Output) {
        this.idleTimeoutInMinutes = value
    }

    /**
     * @param value Specifies the supported Azure location where the NAT Gateway should exist. Changing this forces a new resource to be created.
     */
    @JvmName("qftjacnpckmsvcip")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

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

    /**
     * @param value Specifies the name of the Resource Group in which the NAT Gateway should exist. Changing this forces a new resource to be created.
     */
    @JvmName("wtiltnavgpllvlxg")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The SKU which should be used. At this time the only supported value is `Standard`. Defaults to `Standard`.
     */
    @JvmName("lwueiaclmdockllr")
    public suspend fun skuName(`value`: Output) {
        this.skuName = value
    }

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

    /**
     * @param value A list of Availability Zones in which this NAT Gateway should be located. Changing this forces a new NAT Gateway to be created.
     * > **NOTE:** Only one Availability Zone can be defined. For more information, please check out the [Azure documentation](https://learn.microsoft.com/en-us/azure/nat-gateway/nat-overview#availability-zones)
     */
    @JvmName("osbbxicxnrsydgtp")
    public suspend fun zones(`value`: Output>) {
        this.zones = value
    }

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

    /**
     * @param values A list of Availability Zones in which this NAT Gateway should be located. Changing this forces a new NAT Gateway to be created.
     * > **NOTE:** Only one Availability Zone can be defined. For more information, please check out the [Azure documentation](https://learn.microsoft.com/en-us/azure/nat-gateway/nat-overview#availability-zones)
     */
    @JvmName("qamuuhnjaenwydkh")
    public suspend fun zones(values: List>) {
        this.zones = Output.all(values)
    }

    /**
     * @param value The idle timeout which should be used in minutes. Defaults to `4`.
     */
    @JvmName("rspwikqorcmmhxky")
    public suspend fun idleTimeoutInMinutes(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.idleTimeoutInMinutes = mapped
    }

    /**
     * @param value Specifies the supported Azure location where the NAT Gateway should exist. Changing this forces a new resource to be created.
     */
    @JvmName("fvexltwejvogkyxm")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

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

    /**
     * @param value Specifies the name of the Resource Group in which the NAT Gateway should exist. Changing this forces a new resource to be created.
     */
    @JvmName("cuerdqqwvbfknmhs")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value The SKU which should be used. At this time the only supported value is `Standard`. Defaults to `Standard`.
     */
    @JvmName("roabmpgvalvadrbw")
    public suspend fun skuName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.skuName = mapped
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("xplwejxsahxkxctr")
    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("ilhhjwtgqubyiyaf")
    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 in which this NAT Gateway should be located. Changing this forces a new NAT Gateway to be created.
     * > **NOTE:** Only one Availability Zone can be defined. For more information, please check out the [Azure documentation](https://learn.microsoft.com/en-us/azure/nat-gateway/nat-overview#availability-zones)
     */
    @JvmName("emrfrlloxbendlkc")
    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 in which this NAT Gateway should be located. Changing this forces a new NAT Gateway to be created.
     * > **NOTE:** Only one Availability Zone can be defined. For more information, please check out the [Azure documentation](https://learn.microsoft.com/en-us/azure/nat-gateway/nat-overview#availability-zones)
     */
    @JvmName("sxyjbbeksawolpbt")
    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(
        idleTimeoutInMinutes = idleTimeoutInMinutes,
        location = location,
        name = name,
        resourceGroupName = resourceGroupName,
        skuName = skuName,
        tags = tags,
        zones = zones,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy