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

com.pulumi.awsnative.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: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.ec2.kotlin.inputs

import com.pulumi.awsnative.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 com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property associateCarrierIpAddress Not currently supported by AWS CloudFormation.
 * @property associatePublicIpAddress Indicates whether to assign a public IPv4 address to an instance you launch in a VPC.
 * @property deleteOnTermination If set to true, the interface is deleted when the instance is terminated.
 * @property description The description of the network interface.
 * @property deviceIndex The position of the network interface in the attachment order. A primary network interface has a device index of 0.
 * @property groupSet The IDs of the security groups for the network interface.
 * @property ipv6AddressCount A number of IPv6 addresses to assign to the network interface.
 * @property ipv6Addresses The IPv6 addresses associated with the network interface.
 * @property networkInterfaceId The ID of the network interface.
 * @property privateIpAddress The private IPv4 address of the network interface.
 * @property privateIpAddresses One or more private IPv4 addresses to assign to the network interface.
 * @property secondaryPrivateIpAddressCount The number of secondary private IPv4 addresses.
 * @property subnetId The ID of the subnet.
 */
public data class InstanceNetworkInterfaceArgs(
    public val associateCarrierIpAddress: Output? = null,
    public val associatePublicIpAddress: Output? = null,
    public val deleteOnTermination: Output? = null,
    public val description: Output? = null,
    public val deviceIndex: Output,
    public val groupSet: Output>? = null,
    public val ipv6AddressCount: Output? = null,
    public val ipv6Addresses: Output>? = null,
    public val networkInterfaceId: Output? = null,
    public val privateIpAddress: Output? = null,
    public val privateIpAddresses: Output>? = null,
    public val secondaryPrivateIpAddressCount: Output? = null,
    public val subnetId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.ec2.inputs.InstanceNetworkInterfaceArgs =
        com.pulumi.awsnative.ec2.inputs.InstanceNetworkInterfaceArgs.builder()
            .associateCarrierIpAddress(associateCarrierIpAddress?.applyValue({ args0 -> args0 }))
            .associatePublicIpAddress(associatePublicIpAddress?.applyValue({ args0 -> args0 }))
            .deleteOnTermination(deleteOnTermination?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .deviceIndex(deviceIndex.applyValue({ args0 -> args0 }))
            .groupSet(groupSet?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .ipv6AddressCount(ipv6AddressCount?.applyValue({ args0 -> args0 }))
            .ipv6Addresses(
                ipv6Addresses?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .networkInterfaceId(networkInterfaceId?.applyValue({ args0 -> args0 }))
            .privateIpAddress(privateIpAddress?.applyValue({ args0 -> args0 }))
            .privateIpAddresses(
                privateIpAddresses?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .secondaryPrivateIpAddressCount(secondaryPrivateIpAddressCount?.applyValue({ args0 -> args0 }))
            .subnetId(subnetId?.applyValue({ args0 -> args0 })).build()
}

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

    private var associatePublicIpAddress: Output? = null

    private var deleteOnTermination: Output? = null

    private var description: Output? = null

    private var deviceIndex: Output? = null

    private var groupSet: Output>? = null

    private var ipv6AddressCount: Output? = null

    private var ipv6Addresses: Output>? = null

    private var networkInterfaceId: Output? = null

    private var privateIpAddress: Output? = null

    private var privateIpAddresses: Output>? = null

    private var secondaryPrivateIpAddressCount: Output? = null

    private var subnetId: Output? = null

    /**
     * @param value Not currently supported by AWS CloudFormation.
     */
    @JvmName("oxadwrtkmlwgxmib")
    public suspend fun associateCarrierIpAddress(`value`: Output) {
        this.associateCarrierIpAddress = value
    }

    /**
     * @param value Indicates whether to assign a public IPv4 address to an instance you launch in a VPC.
     */
    @JvmName("jqgtdhruwiuyplwy")
    public suspend fun associatePublicIpAddress(`value`: Output) {
        this.associatePublicIpAddress = value
    }

    /**
     * @param value If set to true, the interface is deleted when the instance is terminated.
     */
    @JvmName("tpnraktxsjngiujg")
    public suspend fun deleteOnTermination(`value`: Output) {
        this.deleteOnTermination = value
    }

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

    /**
     * @param value The position of the network interface in the attachment order. A primary network interface has a device index of 0.
     */
    @JvmName("xxmnwaaxxdltrxbo")
    public suspend fun deviceIndex(`value`: Output) {
        this.deviceIndex = value
    }

    /**
     * @param value The IDs of the security groups for the network interface.
     */
    @JvmName("xexbmnvvbeypwikd")
    public suspend fun groupSet(`value`: Output>) {
        this.groupSet = value
    }

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

    /**
     * @param values The IDs of the security groups for the network interface.
     */
    @JvmName("dyyrwbqrlygmkhpx")
    public suspend fun groupSet(values: List>) {
        this.groupSet = Output.all(values)
    }

    /**
     * @param value A number of IPv6 addresses to assign to the network interface.
     */
    @JvmName("aggjvjnxowqtyrtk")
    public suspend fun ipv6AddressCount(`value`: Output) {
        this.ipv6AddressCount = value
    }

    /**
     * @param value The IPv6 addresses associated with the network interface.
     */
    @JvmName("jgyyxomsmtsqdibi")
    public suspend fun ipv6Addresses(`value`: Output>) {
        this.ipv6Addresses = value
    }

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

    /**
     * @param values The IPv6 addresses associated with the network interface.
     */
    @JvmName("smfguhnmnqmblrdo")
    public suspend fun ipv6Addresses(values: List>) {
        this.ipv6Addresses = Output.all(values)
    }

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

    /**
     * @param value The private IPv4 address of the network interface.
     */
    @JvmName("admgwccfntlqwwme")
    public suspend fun privateIpAddress(`value`: Output) {
        this.privateIpAddress = value
    }

    /**
     * @param value One or more private IPv4 addresses to assign to the network interface.
     */
    @JvmName("ybjhdjyueomsdbcs")
    public suspend fun privateIpAddresses(`value`: Output>) {
        this.privateIpAddresses = value
    }

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

    /**
     * @param values One or more private IPv4 addresses to assign to the network interface.
     */
    @JvmName("wntaegognhmugvff")
    public suspend fun privateIpAddresses(values: List>) {
        this.privateIpAddresses = Output.all(values)
    }

    /**
     * @param value The number of secondary private IPv4 addresses.
     */
    @JvmName("vwmgtbnsqexhkwdk")
    public suspend fun secondaryPrivateIpAddressCount(`value`: Output) {
        this.secondaryPrivateIpAddressCount = value
    }

    /**
     * @param value The ID of the subnet.
     */
    @JvmName("vscqvllleyumxkrg")
    public suspend fun subnetId(`value`: Output) {
        this.subnetId = value
    }

    /**
     * @param value Not currently supported by AWS CloudFormation.
     */
    @JvmName("grohdbgokjrkkigp")
    public suspend fun associateCarrierIpAddress(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.associateCarrierIpAddress = mapped
    }

    /**
     * @param value Indicates whether to assign a public IPv4 address to an instance you launch in a VPC.
     */
    @JvmName("tyemlrmtaddyorjb")
    public suspend fun associatePublicIpAddress(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.associatePublicIpAddress = mapped
    }

    /**
     * @param value If set to true, the interface is deleted when the instance is terminated.
     */
    @JvmName("udpnwtqfwbhitxsd")
    public suspend fun deleteOnTermination(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deleteOnTermination = mapped
    }

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

    /**
     * @param value The position of the network interface in the attachment order. A primary network interface has a device index of 0.
     */
    @JvmName("hecyenvaiffatpye")
    public suspend fun deviceIndex(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.deviceIndex = mapped
    }

    /**
     * @param value The IDs of the security groups for the network interface.
     */
    @JvmName("nuqqbifbtbucppdb")
    public suspend fun groupSet(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.groupSet = mapped
    }

    /**
     * @param values The IDs of the security groups for the network interface.
     */
    @JvmName("ptudxqkiutghapsg")
    public suspend fun groupSet(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.groupSet = mapped
    }

    /**
     * @param value A number of IPv6 addresses to assign to the network interface.
     */
    @JvmName("vubxonilhcyhlthc")
    public suspend fun ipv6AddressCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipv6AddressCount = mapped
    }

    /**
     * @param value The IPv6 addresses associated with the network interface.
     */
    @JvmName("semoangifncqdglb")
    public suspend fun ipv6Addresses(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipv6Addresses = mapped
    }

    /**
     * @param argument The IPv6 addresses associated with the network interface.
     */
    @JvmName("ukuvimhnrbamcrat")
    public suspend fun ipv6Addresses(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            InstanceIpv6AddressArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.ipv6Addresses = mapped
    }

    /**
     * @param argument The IPv6 addresses associated with the network interface.
     */
    @JvmName("bqgyutcfwjyekpuv")
    public suspend fun ipv6Addresses(vararg argument: suspend InstanceIpv6AddressArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            InstanceIpv6AddressArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.ipv6Addresses = mapped
    }

    /**
     * @param argument The IPv6 addresses associated with the network interface.
     */
    @JvmName("aumuxqabggbijvlj")
    public suspend fun ipv6Addresses(argument: suspend InstanceIpv6AddressArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(InstanceIpv6AddressArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.ipv6Addresses = mapped
    }

    /**
     * @param values The IPv6 addresses associated with the network interface.
     */
    @JvmName("mcmasuuosyewtkif")
    public suspend fun ipv6Addresses(vararg values: InstanceIpv6AddressArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipv6Addresses = mapped
    }

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

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

    /**
     * @param value One or more private IPv4 addresses to assign to the network interface.
     */
    @JvmName("bdnqyhjauuihyieu")
    public suspend fun privateIpAddresses(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.privateIpAddresses = mapped
    }

    /**
     * @param argument One or more private IPv4 addresses to assign to the network interface.
     */
    @JvmName("giuyxsgyfvipqntd")
    public suspend fun privateIpAddresses(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            InstancePrivateIpAddressSpecificationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.privateIpAddresses = mapped
    }

    /**
     * @param argument One or more private IPv4 addresses to assign to the network interface.
     */
    @JvmName("uqgbrawxppkvuxhu")
    public suspend fun privateIpAddresses(vararg argument: suspend InstancePrivateIpAddressSpecificationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            InstancePrivateIpAddressSpecificationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.privateIpAddresses = mapped
    }

    /**
     * @param argument One or more private IPv4 addresses to assign to the network interface.
     */
    @JvmName("tuufqsmxfwfuybrb")
    public suspend fun privateIpAddresses(argument: suspend InstancePrivateIpAddressSpecificationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            InstancePrivateIpAddressSpecificationArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.privateIpAddresses = mapped
    }

    /**
     * @param values One or more private IPv4 addresses to assign to the network interface.
     */
    @JvmName("hillcijxbcutldps")
    public suspend fun privateIpAddresses(vararg values: InstancePrivateIpAddressSpecificationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.privateIpAddresses = mapped
    }

    /**
     * @param value The number of secondary private IPv4 addresses.
     */
    @JvmName("pqgcrtmotthnescf")
    public suspend fun secondaryPrivateIpAddressCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.secondaryPrivateIpAddressCount = mapped
    }

    /**
     * @param value The ID of the subnet.
     */
    @JvmName("epfginnvagmfdhga")
    public suspend fun subnetId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subnetId = mapped
    }

    internal fun build(): InstanceNetworkInterfaceArgs = InstanceNetworkInterfaceArgs(
        associateCarrierIpAddress = associateCarrierIpAddress,
        associatePublicIpAddress = associatePublicIpAddress,
        deleteOnTermination = deleteOnTermination,
        description = description,
        deviceIndex = deviceIndex ?: throw PulumiNullFieldException("deviceIndex"),
        groupSet = groupSet,
        ipv6AddressCount = ipv6AddressCount,
        ipv6Addresses = ipv6Addresses,
        networkInterfaceId = networkInterfaceId,
        privateIpAddress = privateIpAddress,
        privateIpAddresses = privateIpAddresses,
        secondaryPrivateIpAddressCount = secondaryPrivateIpAddressCount,
        subnetId = subnetId,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy