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

com.pulumi.azurenative.azurestackhci.kotlin.NetworkInterfaceArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.azurestackhci.kotlin

import com.pulumi.azurenative.azurestackhci.NetworkInterfaceArgs.builder
import com.pulumi.azurenative.azurestackhci.kotlin.inputs.ExtendedLocationArgs
import com.pulumi.azurenative.azurestackhci.kotlin.inputs.ExtendedLocationArgsBuilder
import com.pulumi.azurenative.azurestackhci.kotlin.inputs.IPConfigurationArgs
import com.pulumi.azurenative.azurestackhci.kotlin.inputs.IPConfigurationArgsBuilder
import com.pulumi.azurenative.azurestackhci.kotlin.inputs.InterfaceDNSSettingsArgs
import com.pulumi.azurenative.azurestackhci.kotlin.inputs.InterfaceDNSSettingsArgsBuilder
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.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * The network interface resource definition.
 * Azure REST API version: 2022-12-15-preview.
 * Other available API versions: 2023-07-01-preview, 2023-09-01-preview, 2024-01-01, 2024-02-01-preview, 2024-05-01-preview.
 * ## Example Usage
 * ### PutNetworkInterface
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var networkInterface = new AzureNative.AzureStackHCI.NetworkInterface("networkInterface", new()
 *     {
 *         ExtendedLocation = new AzureNative.AzureStackHCI.Inputs.ExtendedLocationArgs
 *         {
 *             Name = "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location",
 *             Type = AzureNative.AzureStackHCI.ExtendedLocationTypes.CustomLocation,
 *         },
 *         IpConfigurations = new[]
 *         {
 *             new AzureNative.AzureStackHCI.Inputs.IPConfigurationArgs
 *             {
 *                 Name = "ipconfig-sample",
 *                 Properties = new AzureNative.AzureStackHCI.Inputs.IPConfigurationPropertiesArgs
 *                 {
 *                     Subnet = new AzureNative.AzureStackHCI.Inputs.IPConfigurationSubnetArgs
 *                     {
 *                         Id = "test-vnet",
 *                     },
 *                 },
 *             },
 *         },
 *         Location = "West US2",
 *         NetworkInterfaceName = "test-nic",
 *         ResourceGroupName = "test-rg",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	azurestackhci "github.com/pulumi/pulumi-azure-native-sdk/azurestackhci/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := azurestackhci.NewNetworkInterface(ctx, "networkInterface", &azurestackhci.NetworkInterfaceArgs{
 * 			ExtendedLocation: &azurestackhci.ExtendedLocationArgs{
 * 				Name: pulumi.String("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"),
 * 				Type: pulumi.String(azurestackhci.ExtendedLocationTypesCustomLocation),
 * 			},
 * 			IpConfigurations: azurestackhci.IPConfigurationArray{
 * 				&azurestackhci.IPConfigurationArgs{
 * 					Name: pulumi.String("ipconfig-sample"),
 * 					Properties: &azurestackhci.IPConfigurationPropertiesArgs{
 * 						Subnet: &azurestackhci.IPConfigurationSubnetArgs{
 * 							Id: pulumi.String("test-vnet"),
 * 						},
 * 					},
 * 				},
 * 			},
 * 			Location:             pulumi.String("West US2"),
 * 			NetworkInterfaceName: pulumi.String("test-nic"),
 * 			ResourceGroupName:    pulumi.String("test-rg"),
 * 		})
 * 		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.azurestackhci.NetworkInterface;
 * import com.pulumi.azurenative.azurestackhci.NetworkInterfaceArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.ExtendedLocationArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.IPConfigurationArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.IPConfigurationPropertiesArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.IPConfigurationSubnetArgs;
 * 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 networkInterface = new NetworkInterface("networkInterface", NetworkInterfaceArgs.builder()
 *             .extendedLocation(ExtendedLocationArgs.builder()
 *                 .name("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location")
 *                 .type("CustomLocation")
 *                 .build())
 *             .ipConfigurations(IPConfigurationArgs.builder()
 *                 .name("ipconfig-sample")
 *                 .properties(IPConfigurationPropertiesArgs.builder()
 *                     .subnet(IPConfigurationSubnetArgs.builder()
 *                         .id("test-vnet")
 *                         .build())
 *                     .build())
 *                 .build())
 *             .location("West US2")
 *             .networkInterfaceName("test-nic")
 *             .resourceGroupName("test-rg")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:azurestackhci:NetworkInterface test-nic /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkInterfaces/{networkInterfaceName}
 * ```
 * @property dnsSettings DNS Settings for the interface
 * @property extendedLocation The extendedLocation of the resource.
 * @property ipConfigurations IPConfigurations - A list of IPConfigurations of the network interface.
 * @property location The geo-location where the resource lives
 * @property macAddress MacAddress - The MAC address of the network interface.
 * @property networkInterfaceName Name of the network interface
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property tags Resource tags.
 */
public data class NetworkInterfaceArgs(
    public val dnsSettings: Output? = null,
    public val extendedLocation: Output? = null,
    public val ipConfigurations: Output>? = null,
    public val location: Output? = null,
    public val macAddress: Output? = null,
    public val networkInterfaceName: Output? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.azurestackhci.NetworkInterfaceArgs =
        com.pulumi.azurenative.azurestackhci.NetworkInterfaceArgs.builder()
            .dnsSettings(dnsSettings?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .extendedLocation(extendedLocation?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .ipConfigurations(
                ipConfigurations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .location(location?.applyValue({ args0 -> args0 }))
            .macAddress(macAddress?.applyValue({ args0 -> args0 }))
            .networkInterfaceName(networkInterfaceName?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [NetworkInterfaceArgs].
 */
@PulumiTagMarker
public class NetworkInterfaceArgsBuilder internal constructor() {
    private var dnsSettings: Output? = null

    private var extendedLocation: Output? = null

    private var ipConfigurations: Output>? = null

    private var location: Output? = null

    private var macAddress: Output? = null

    private var networkInterfaceName: Output? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    /**
     * @param value DNS Settings for the interface
     */
    @JvmName("bckaohfxlxmawixk")
    public suspend fun dnsSettings(`value`: Output) {
        this.dnsSettings = value
    }

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

    /**
     * @param value IPConfigurations - A list of IPConfigurations of the network interface.
     */
    @JvmName("hjmlmtawkmnsxlem")
    public suspend fun ipConfigurations(`value`: Output>) {
        this.ipConfigurations = value
    }

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

    /**
     * @param values IPConfigurations - A list of IPConfigurations of the network interface.
     */
    @JvmName("fpuoupdmfeyhrlvo")
    public suspend fun ipConfigurations(values: List>) {
        this.ipConfigurations = Output.all(values)
    }

    /**
     * @param value The geo-location where the resource lives
     */
    @JvmName("hkpfcawospicwrlt")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value MacAddress - The MAC address of the network interface.
     */
    @JvmName("wwiabnwisejurwsv")
    public suspend fun macAddress(`value`: Output) {
        this.macAddress = value
    }

    /**
     * @param value Name of the network interface
     */
    @JvmName("fmnhqpkfjpsrspra")
    public suspend fun networkInterfaceName(`value`: Output) {
        this.networkInterfaceName = value
    }

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

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

    /**
     * @param value DNS Settings for the interface
     */
    @JvmName("pxvdbncxaxvfonar")
    public suspend fun dnsSettings(`value`: InterfaceDNSSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dnsSettings = mapped
    }

    /**
     * @param argument DNS Settings for the interface
     */
    @JvmName("dsxloihvvwnsjkcq")
    public suspend fun dnsSettings(argument: suspend InterfaceDNSSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = InterfaceDNSSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.dnsSettings = mapped
    }

    /**
     * @param value The extendedLocation of the resource.
     */
    @JvmName("jypqljtwqstgijng")
    public suspend fun extendedLocation(`value`: ExtendedLocationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.extendedLocation = mapped
    }

    /**
     * @param argument The extendedLocation of the resource.
     */
    @JvmName("nviquibfmksrtupd")
    public suspend fun extendedLocation(argument: suspend ExtendedLocationArgsBuilder.() -> Unit) {
        val toBeMapped = ExtendedLocationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.extendedLocation = mapped
    }

    /**
     * @param value IPConfigurations - A list of IPConfigurations of the network interface.
     */
    @JvmName("efjlkjvmkqotxigu")
    public suspend fun ipConfigurations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipConfigurations = mapped
    }

    /**
     * @param argument IPConfigurations - A list of IPConfigurations of the network interface.
     */
    @JvmName("pkefbliitswacvcm")
    public suspend fun ipConfigurations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            IPConfigurationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.ipConfigurations = mapped
    }

    /**
     * @param argument IPConfigurations - A list of IPConfigurations of the network interface.
     */
    @JvmName("vtlgvhdnacpsrhie")
    public suspend fun ipConfigurations(vararg argument: suspend IPConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            IPConfigurationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.ipConfigurations = mapped
    }

    /**
     * @param argument IPConfigurations - A list of IPConfigurations of the network interface.
     */
    @JvmName("rkcmrhwlsgmcliuq")
    public suspend fun ipConfigurations(argument: suspend IPConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(IPConfigurationArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.ipConfigurations = mapped
    }

    /**
     * @param values IPConfigurations - A list of IPConfigurations of the network interface.
     */
    @JvmName("cbbapedxnrxucamy")
    public suspend fun ipConfigurations(vararg values: IPConfigurationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipConfigurations = mapped
    }

    /**
     * @param value The geo-location where the resource lives
     */
    @JvmName("tlhsohrjqnswitkx")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value MacAddress - The MAC address of the network interface.
     */
    @JvmName("nynbctjilbgocdpa")
    public suspend fun macAddress(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.macAddress = mapped
    }

    /**
     * @param value Name of the network interface
     */
    @JvmName("ogssxekobojryxkh")
    public suspend fun networkInterfaceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkInterfaceName = mapped
    }

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

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

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

    internal fun build(): NetworkInterfaceArgs = NetworkInterfaceArgs(
        dnsSettings = dnsSettings,
        extendedLocation = extendedLocation,
        ipConfigurations = ipConfigurations,
        location = location,
        macAddress = macAddress,
        networkInterfaceName = networkInterfaceName,
        resourceGroupName = resourceGroupName,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy