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

com.pulumi.azure.compute.kotlin.inputs.LinuxVirtualMachineScaleSetNetworkInterfaceArgs.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.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.compute.kotlin.inputs

import com.pulumi.azure.compute.inputs.LinuxVirtualMachineScaleSetNetworkInterfaceArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property dnsServers A list of IP Addresses of DNS Servers which should be assigned to the Network Interface.
 * @property enableAcceleratedNetworking Does this Network Interface support Accelerated Networking? Defaults to `false`.
 * @property enableIpForwarding Does this Network Interface support IP Forwarding? Defaults to `false`.
 * @property ipConfigurations One or more `ip_configuration` blocks as defined above.
 * @property name The Name which should be used for this Network Interface. Changing this forces a new resource to be created.
 * @property networkSecurityGroupId The ID of a Network Security Group which should be assigned to this Network Interface.
 * @property primary Is this the Primary IP Configuration?
 * > **Note:** If multiple `network_interface` blocks are specified, one must be set to `primary`.
 */
public data class LinuxVirtualMachineScaleSetNetworkInterfaceArgs(
    public val dnsServers: Output>? = null,
    public val enableAcceleratedNetworking: Output? = null,
    public val enableIpForwarding: Output? = null,
    public val ipConfigurations: Output>,
    public val name: Output,
    public val networkSecurityGroupId: Output? = null,
    public val primary: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.compute.inputs.LinuxVirtualMachineScaleSetNetworkInterfaceArgs =
        com.pulumi.azure.compute.inputs.LinuxVirtualMachineScaleSetNetworkInterfaceArgs.builder()
            .dnsServers(dnsServers?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .enableAcceleratedNetworking(enableAcceleratedNetworking?.applyValue({ args0 -> args0 }))
            .enableIpForwarding(enableIpForwarding?.applyValue({ args0 -> args0 }))
            .ipConfigurations(
                ipConfigurations.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .name(name.applyValue({ args0 -> args0 }))
            .networkSecurityGroupId(networkSecurityGroupId?.applyValue({ args0 -> args0 }))
            .primary(primary?.applyValue({ args0 -> args0 })).build()
}

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

    private var enableAcceleratedNetworking: Output? = null

    private var enableIpForwarding: Output? = null

    private var ipConfigurations:
        Output>? = null

    private var name: Output? = null

    private var networkSecurityGroupId: Output? = null

    private var primary: Output? = null

    /**
     * @param value A list of IP Addresses of DNS Servers which should be assigned to the Network Interface.
     */
    @JvmName("yxwobxosxylflvlt")
    public suspend fun dnsServers(`value`: Output>) {
        this.dnsServers = value
    }

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

    /**
     * @param values A list of IP Addresses of DNS Servers which should be assigned to the Network Interface.
     */
    @JvmName("mwrqsijgfmuojoua")
    public suspend fun dnsServers(values: List>) {
        this.dnsServers = Output.all(values)
    }

    /**
     * @param value Does this Network Interface support Accelerated Networking? Defaults to `false`.
     */
    @JvmName("jlfogymqtoqokioy")
    public suspend fun enableAcceleratedNetworking(`value`: Output) {
        this.enableAcceleratedNetworking = value
    }

    /**
     * @param value Does this Network Interface support IP Forwarding? Defaults to `false`.
     */
    @JvmName("evqmcauaaggfeoxn")
    public suspend fun enableIpForwarding(`value`: Output) {
        this.enableIpForwarding = value
    }

    /**
     * @param value One or more `ip_configuration` blocks as defined above.
     */
    @JvmName("wtrejcepbqoscdrg")
    public suspend fun ipConfigurations(`value`: Output>) {
        this.ipConfigurations = value
    }

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

    /**
     * @param values One or more `ip_configuration` blocks as defined above.
     */
    @JvmName("fntpyvcoefnesyav")
    public suspend fun ipConfigurations(values: List>) {
        this.ipConfigurations = Output.all(values)
    }

    /**
     * @param value The Name which should be used for this Network Interface. Changing this forces a new resource to be created.
     */
    @JvmName("tlnonctheavjhxet")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The ID of a Network Security Group which should be assigned to this Network Interface.
     */
    @JvmName("klfyjxijualbudwl")
    public suspend fun networkSecurityGroupId(`value`: Output) {
        this.networkSecurityGroupId = value
    }

    /**
     * @param value Is this the Primary IP Configuration?
     * > **Note:** If multiple `network_interface` blocks are specified, one must be set to `primary`.
     */
    @JvmName("smlbtbnwwxicejwc")
    public suspend fun primary(`value`: Output) {
        this.primary = value
    }

    /**
     * @param value A list of IP Addresses of DNS Servers which should be assigned to the Network Interface.
     */
    @JvmName("utqeunbnsmmynaoi")
    public suspend fun dnsServers(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dnsServers = mapped
    }

    /**
     * @param values A list of IP Addresses of DNS Servers which should be assigned to the Network Interface.
     */
    @JvmName("ofxqbryfjevohmhn")
    public suspend fun dnsServers(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.dnsServers = mapped
    }

    /**
     * @param value Does this Network Interface support Accelerated Networking? Defaults to `false`.
     */
    @JvmName("bwfdtbpsdtgfccod")
    public suspend fun enableAcceleratedNetworking(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableAcceleratedNetworking = mapped
    }

    /**
     * @param value Does this Network Interface support IP Forwarding? Defaults to `false`.
     */
    @JvmName("kvugjxaocfuayhfq")
    public suspend fun enableIpForwarding(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableIpForwarding = mapped
    }

    /**
     * @param value One or more `ip_configuration` blocks as defined above.
     */
    @JvmName("liwqskvavoknajby")
    public suspend fun ipConfigurations(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipConfigurations = mapped
    }

    /**
     * @param argument One or more `ip_configuration` blocks as defined above.
     */
    @JvmName("jspvhmglgoxxmief")
    public suspend fun ipConfigurations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.ipConfigurations = mapped
    }

    /**
     * @param argument One or more `ip_configuration` blocks as defined above.
     */
    @JvmName("rcbysjaevgkofbmc")
    public suspend fun ipConfigurations(vararg argument: suspend LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.ipConfigurations = mapped
    }

    /**
     * @param argument One or more `ip_configuration` blocks as defined above.
     */
    @JvmName("apftnlueujdrvtah")
    public suspend fun ipConfigurations(argument: suspend LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgsBuilder().applySuspend
                    { argument() }.build(),
            )
        val mapped = of(toBeMapped)
        this.ipConfigurations = mapped
    }

    /**
     * @param values One or more `ip_configuration` blocks as defined above.
     */
    @JvmName("crgwowxnpnfiftko")
    public suspend fun ipConfigurations(vararg values: LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipConfigurations = mapped
    }

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

    /**
     * @param value The ID of a Network Security Group which should be assigned to this Network Interface.
     */
    @JvmName("kbmgarktaymmbpuy")
    public suspend fun networkSecurityGroupId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkSecurityGroupId = mapped
    }

    /**
     * @param value Is this the Primary IP Configuration?
     * > **Note:** If multiple `network_interface` blocks are specified, one must be set to `primary`.
     */
    @JvmName("abefhxwqlcdarrtj")
    public suspend fun primary(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.primary = mapped
    }

    internal fun build(): LinuxVirtualMachineScaleSetNetworkInterfaceArgs =
        LinuxVirtualMachineScaleSetNetworkInterfaceArgs(
            dnsServers = dnsServers,
            enableAcceleratedNetworking = enableAcceleratedNetworking,
            enableIpForwarding = enableIpForwarding,
            ipConfigurations = ipConfigurations ?: throw PulumiNullFieldException("ipConfigurations"),
            name = name ?: throw PulumiNullFieldException("name"),
            networkSecurityGroupId = networkSecurityGroupId,
            primary = primary,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy