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

com.pulumi.aws.ec2.kotlin.inputs.InstanceNetworkInterfaceArgs.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.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.ec2.kotlin.inputs

import com.pulumi.aws.ec2.inputs.InstanceNetworkInterfaceArgs.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 kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 *
 * @property deleteOnTermination Whether or not to delete the network interface on instance termination. Defaults to `false`. Currently, the only valid value is `false`, as this is only supported when creating new network interfaces when launching an instance.
 * @property deviceIndex Integer index of the network interface attachment. Limited by instance type.
 * @property networkCardIndex Integer index of the network card. Limited by instance type. The default index is `0`.
 * @property networkInterfaceId ID of the network interface to attach.
 */
public data class InstanceNetworkInterfaceArgs(
    public val deleteOnTermination: Output? = null,
    public val deviceIndex: Output,
    public val networkCardIndex: Output? = null,
    public val networkInterfaceId: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.ec2.inputs.InstanceNetworkInterfaceArgs =
        com.pulumi.aws.ec2.inputs.InstanceNetworkInterfaceArgs.builder()
            .deleteOnTermination(deleteOnTermination?.applyValue({ args0 -> args0 }))
            .deviceIndex(deviceIndex.applyValue({ args0 -> args0 }))
            .networkCardIndex(networkCardIndex?.applyValue({ args0 -> args0 }))
            .networkInterfaceId(networkInterfaceId.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [InstanceNetworkInterfaceArgs].
 */
@PulumiTagMarker
public class InstanceNetworkInterfaceArgsBuilder internal constructor() {
    private var deleteOnTermination: Output? = null

    private var deviceIndex: Output? = null

    private var networkCardIndex: Output? = null

    private var networkInterfaceId: Output? = null

    /**
     * @param value Whether or not to delete the network interface on instance termination. Defaults to `false`. Currently, the only valid value is `false`, as this is only supported when creating new network interfaces when launching an instance.
     */
    @JvmName("epyvnvmknessflck")
    public suspend fun deleteOnTermination(`value`: Output) {
        this.deleteOnTermination = value
    }

    /**
     * @param value Integer index of the network interface attachment. Limited by instance type.
     */
    @JvmName("gnhrcsenixsmjfaf")
    public suspend fun deviceIndex(`value`: Output) {
        this.deviceIndex = value
    }

    /**
     * @param value Integer index of the network card. Limited by instance type. The default index is `0`.
     */
    @JvmName("ycrpvliyxomaxovl")
    public suspend fun networkCardIndex(`value`: Output) {
        this.networkCardIndex = value
    }

    /**
     * @param value ID of the network interface to attach.
     */
    @JvmName("qcaprcmuvfdrcvwd")
    public suspend fun networkInterfaceId(`value`: Output) {
        this.networkInterfaceId = value
    }

    /**
     * @param value Whether or not to delete the network interface on instance termination. Defaults to `false`. Currently, the only valid value is `false`, as this is only supported when creating new network interfaces when launching an instance.
     */
    @JvmName("kdqnbsanetsdnpve")
    public suspend fun deleteOnTermination(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deleteOnTermination = mapped
    }

    /**
     * @param value Integer index of the network interface attachment. Limited by instance type.
     */
    @JvmName("ndxfjcxnrflqgfso")
    public suspend fun deviceIndex(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.deviceIndex = mapped
    }

    /**
     * @param value Integer index of the network card. Limited by instance type. The default index is `0`.
     */
    @JvmName("fvddvfkqqrtuytac")
    public suspend fun networkCardIndex(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkCardIndex = mapped
    }

    /**
     * @param value ID of the network interface to attach.
     */
    @JvmName("nmjwbtyrvvxghtmy")
    public suspend fun networkInterfaceId(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.networkInterfaceId = mapped
    }

    internal fun build(): InstanceNetworkInterfaceArgs = InstanceNetworkInterfaceArgs(
        deleteOnTermination = deleteOnTermination,
        deviceIndex = deviceIndex ?: throw PulumiNullFieldException("deviceIndex"),
        networkCardIndex = networkCardIndex,
        networkInterfaceId = networkInterfaceId ?: throw PulumiNullFieldException("networkInterfaceId"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy