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

com.pulumi.awsnative.ec2.kotlin.inputs.LaunchTemplateNetworkInterfaceArgs.kt Maven / Gradle / Ivy

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

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

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

/**
 * Specifies the parameters for a network interface.
 *   ``NetworkInterface`` is a property of [AWS::EC2::LaunchTemplate LaunchTemplateData](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata.html).
 * @property associateCarrierIpAddress Associates a Carrier IP address with eth0 for a new network interface.
 *  Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see [Carrier IP addresses](https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#provider-owned-ip) in the *Developer Guide*.
 * @property associatePublicIpAddress Associates a public IPv4 address with eth0 for a new network interface.
 *   AWS charges for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the *Public IPv4 Address* tab on the [Amazon VPC pricing page](https://docs.aws.amazon.com/vpc/pricing/).
 * @property connectionTrackingSpecification A connection tracking specification for the network interface.
 * @property deleteOnTermination Indicates whether the network interface is deleted when the instance is terminated.
 * @property description A description for the network interface.
 * @property deviceIndex The device index for the network interface attachment. Each network interface requires a device index. If you create a launch template that includes secondary network interfaces but not a primary network interface, then you must add a primary network interface as a launch parameter when you launch an instance from the template.
 * @property enaSrdSpecification The ENA Express configuration for the network interface.
 * @property groups The IDs of one or more security groups.
 * @property interfaceType The type of network interface. To create an Elastic Fabric Adapter (EFA), specify ``efa``. For more information, see [Elastic Fabric Adapter](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html) in the *Amazon EC2 User Guide*.
 *  If you are not creating an EFA, specify ``interface`` or omit this parameter.
 *  Valid values: ``interface`` | ``efa``
 * @property ipv4PrefixCount The number of IPv4 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the ``Ipv4Prefix`` option.
 * @property ipv4Prefixes One or more IPv4 prefixes to be assigned to the network interface. You cannot use this option if you use the ``Ipv4PrefixCount`` option.
 * @property ipv6AddressCount The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.
 * @property ipv6Addresses One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.
 * @property ipv6PrefixCount The number of IPv6 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the ``Ipv6Prefix`` option.
 * @property ipv6Prefixes One or more IPv6 prefixes to be assigned to the network interface. You cannot use this option if you use the ``Ipv6PrefixCount`` option.
 * @property networkCardIndex The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.
 * @property networkInterfaceId The ID of the network interface.
 * @property primaryIpv6 The primary IPv6 address of the network interface. When you enable an IPv6 GUA address to be a primary IPv6, the first IPv6 GUA will be made the primary IPv6 address until the instance is terminated or the network interface is detached. For more information about primary IPv6 addresses, see [RunInstances](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html).
 * @property privateIpAddress The primary private IPv4 address of the network interface.
 * @property privateIpAddresses One or more private IPv4 addresses.
 * @property secondaryPrivateIpAddressCount The number of secondary private IPv4 addresses to assign to a network interface.
 * @property subnetId The ID of the subnet for the network interface.
 */
public data class LaunchTemplateNetworkInterfaceArgs(
    public val associateCarrierIpAddress: Output? = null,
    public val associatePublicIpAddress: Output? = null,
    public val connectionTrackingSpecification: Output? = null,
    public val deleteOnTermination: Output? = null,
    public val description: Output? = null,
    public val deviceIndex: Output? = null,
    public val enaSrdSpecification: Output? = null,
    public val groups: Output>? = null,
    public val interfaceType: Output? = null,
    public val ipv4PrefixCount: Output? = null,
    public val ipv4Prefixes: Output>? = null,
    public val ipv6AddressCount: Output? = null,
    public val ipv6Addresses: Output>? = null,
    public val ipv6PrefixCount: Output? = null,
    public val ipv6Prefixes: Output>? = null,
    public val networkCardIndex: Output? = null,
    public val networkInterfaceId: Output? = null,
    public val primaryIpv6: 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.LaunchTemplateNetworkInterfaceArgs =
        com.pulumi.awsnative.ec2.inputs.LaunchTemplateNetworkInterfaceArgs.builder()
            .associateCarrierIpAddress(associateCarrierIpAddress?.applyValue({ args0 -> args0 }))
            .associatePublicIpAddress(associatePublicIpAddress?.applyValue({ args0 -> args0 }))
            .connectionTrackingSpecification(
                connectionTrackingSpecification?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .deleteOnTermination(deleteOnTermination?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .deviceIndex(deviceIndex?.applyValue({ args0 -> args0 }))
            .enaSrdSpecification(
                enaSrdSpecification?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .groups(groups?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .interfaceType(interfaceType?.applyValue({ args0 -> args0 }))
            .ipv4PrefixCount(ipv4PrefixCount?.applyValue({ args0 -> args0 }))
            .ipv4Prefixes(
                ipv4Prefixes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .ipv6AddressCount(ipv6AddressCount?.applyValue({ args0 -> args0 }))
            .ipv6Addresses(
                ipv6Addresses?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .ipv6PrefixCount(ipv6PrefixCount?.applyValue({ args0 -> args0 }))
            .ipv6Prefixes(
                ipv6Prefixes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .networkCardIndex(networkCardIndex?.applyValue({ args0 -> args0 }))
            .networkInterfaceId(networkInterfaceId?.applyValue({ args0 -> args0 }))
            .primaryIpv6(primaryIpv6?.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 [LaunchTemplateNetworkInterfaceArgs].
 */
@PulumiTagMarker
public class LaunchTemplateNetworkInterfaceArgsBuilder internal constructor() {
    private var associateCarrierIpAddress: Output? = null

    private var associatePublicIpAddress: Output? = null

    private var connectionTrackingSpecification:
        Output? = null

    private var deleteOnTermination: Output? = null

    private var description: Output? = null

    private var deviceIndex: Output? = null

    private var enaSrdSpecification: Output? = null

    private var groups: Output>? = null

    private var interfaceType: Output? = null

    private var ipv4PrefixCount: Output? = null

    private var ipv4Prefixes: Output>? = null

    private var ipv6AddressCount: Output? = null

    private var ipv6Addresses: Output>? = null

    private var ipv6PrefixCount: Output? = null

    private var ipv6Prefixes: Output>? = null

    private var networkCardIndex: Output? = null

    private var networkInterfaceId: Output? = null

    private var primaryIpv6: Output? = null

    private var privateIpAddress: Output? = null

    private var privateIpAddresses: Output>? = null

    private var secondaryPrivateIpAddressCount: Output? = null

    private var subnetId: Output? = null

    /**
     * @param value Associates a Carrier IP address with eth0 for a new network interface.
     *  Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see [Carrier IP addresses](https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#provider-owned-ip) in the *Developer Guide*.
     */
    @JvmName("qjvwxckbhvnmhmks")
    public suspend fun associateCarrierIpAddress(`value`: Output) {
        this.associateCarrierIpAddress = value
    }

    /**
     * @param value Associates a public IPv4 address with eth0 for a new network interface.
     *   AWS charges for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the *Public IPv4 Address* tab on the [Amazon VPC pricing page](https://docs.aws.amazon.com/vpc/pricing/).
     */
    @JvmName("fvldifommedbsjqx")
    public suspend fun associatePublicIpAddress(`value`: Output) {
        this.associatePublicIpAddress = value
    }

    /**
     * @param value A connection tracking specification for the network interface.
     */
    @JvmName("yqhfjrftqhbodayx")
    public suspend fun connectionTrackingSpecification(`value`: Output) {
        this.connectionTrackingSpecification = value
    }

    /**
     * @param value Indicates whether the network interface is deleted when the instance is terminated.
     */
    @JvmName("lnjnsxthqpsmtrrw")
    public suspend fun deleteOnTermination(`value`: Output) {
        this.deleteOnTermination = value
    }

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

    /**
     * @param value The device index for the network interface attachment. Each network interface requires a device index. If you create a launch template that includes secondary network interfaces but not a primary network interface, then you must add a primary network interface as a launch parameter when you launch an instance from the template.
     */
    @JvmName("bwjfqejgxafppxcp")
    public suspend fun deviceIndex(`value`: Output) {
        this.deviceIndex = value
    }

    /**
     * @param value The ENA Express configuration for the network interface.
     */
    @JvmName("jsppsvnupeuadojx")
    public suspend fun enaSrdSpecification(`value`: Output) {
        this.enaSrdSpecification = value
    }

    /**
     * @param value The IDs of one or more security groups.
     */
    @JvmName("vsdonnuhculbrpox")
    public suspend fun groups(`value`: Output>) {
        this.groups = value
    }

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

    /**
     * @param values The IDs of one or more security groups.
     */
    @JvmName("hfmfsgnyvhlgncmr")
    public suspend fun groups(values: List>) {
        this.groups = Output.all(values)
    }

    /**
     * @param value The type of network interface. To create an Elastic Fabric Adapter (EFA), specify ``efa``. For more information, see [Elastic Fabric Adapter](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html) in the *Amazon EC2 User Guide*.
     *  If you are not creating an EFA, specify ``interface`` or omit this parameter.
     *  Valid values: ``interface`` | ``efa``
     */
    @JvmName("wckwonsnbgaoqgya")
    public suspend fun interfaceType(`value`: Output) {
        this.interfaceType = value
    }

    /**
     * @param value The number of IPv4 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the ``Ipv4Prefix`` option.
     */
    @JvmName("aovoxbhgmoghoune")
    public suspend fun ipv4PrefixCount(`value`: Output) {
        this.ipv4PrefixCount = value
    }

    /**
     * @param value One or more IPv4 prefixes to be assigned to the network interface. You cannot use this option if you use the ``Ipv4PrefixCount`` option.
     */
    @JvmName("nivfhpnumlybhaqo")
    public suspend fun ipv4Prefixes(`value`: Output>) {
        this.ipv4Prefixes = value
    }

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

    /**
     * @param values One or more IPv4 prefixes to be assigned to the network interface. You cannot use this option if you use the ``Ipv4PrefixCount`` option.
     */
    @JvmName("kmydjgnnknbjthft")
    public suspend fun ipv4Prefixes(values: List>) {
        this.ipv4Prefixes = Output.all(values)
    }

    /**
     * @param value The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.
     */
    @JvmName("nmdgyvastycuxtcr")
    public suspend fun ipv6AddressCount(`value`: Output) {
        this.ipv6AddressCount = value
    }

    /**
     * @param value One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.
     */
    @JvmName("mufatxkrncanrbur")
    public suspend fun ipv6Addresses(`value`: Output>) {
        this.ipv6Addresses = value
    }

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

    /**
     * @param values One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.
     */
    @JvmName("pjulgggkdhnbbkel")
    public suspend fun ipv6Addresses(values: List>) {
        this.ipv6Addresses = Output.all(values)
    }

    /**
     * @param value The number of IPv6 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the ``Ipv6Prefix`` option.
     */
    @JvmName("wuqcjaqyighmbhwa")
    public suspend fun ipv6PrefixCount(`value`: Output) {
        this.ipv6PrefixCount = value
    }

    /**
     * @param value One or more IPv6 prefixes to be assigned to the network interface. You cannot use this option if you use the ``Ipv6PrefixCount`` option.
     */
    @JvmName("kennafmquwormhyo")
    public suspend fun ipv6Prefixes(`value`: Output>) {
        this.ipv6Prefixes = value
    }

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

    /**
     * @param values One or more IPv6 prefixes to be assigned to the network interface. You cannot use this option if you use the ``Ipv6PrefixCount`` option.
     */
    @JvmName("vsetgjvaifwwvory")
    public suspend fun ipv6Prefixes(values: List>) {
        this.ipv6Prefixes = Output.all(values)
    }

    /**
     * @param value The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.
     */
    @JvmName("msdqdiymdyuiqwjo")
    public suspend fun networkCardIndex(`value`: Output) {
        this.networkCardIndex = value
    }

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

    /**
     * @param value The primary IPv6 address of the network interface. When you enable an IPv6 GUA address to be a primary IPv6, the first IPv6 GUA will be made the primary IPv6 address until the instance is terminated or the network interface is detached. For more information about primary IPv6 addresses, see [RunInstances](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html).
     */
    @JvmName("nhokehekgijdbrbx")
    public suspend fun primaryIpv6(`value`: Output) {
        this.primaryIpv6 = value
    }

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

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

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

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

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

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

    /**
     * @param value Associates a Carrier IP address with eth0 for a new network interface.
     *  Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see [Carrier IP addresses](https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#provider-owned-ip) in the *Developer Guide*.
     */
    @JvmName("piiefxjuyfhoqyih")
    public suspend fun associateCarrierIpAddress(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.associateCarrierIpAddress = mapped
    }

    /**
     * @param value Associates a public IPv4 address with eth0 for a new network interface.
     *   AWS charges for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the *Public IPv4 Address* tab on the [Amazon VPC pricing page](https://docs.aws.amazon.com/vpc/pricing/).
     */
    @JvmName("hlyrabgtciqmkwtf")
    public suspend fun associatePublicIpAddress(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.associatePublicIpAddress = mapped
    }

    /**
     * @param value A connection tracking specification for the network interface.
     */
    @JvmName("hxjooyfarfdceyjf")
    public suspend fun connectionTrackingSpecification(`value`: LaunchTemplateConnectionTrackingSpecificationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.connectionTrackingSpecification = mapped
    }

    /**
     * @param argument A connection tracking specification for the network interface.
     */
    @JvmName("ytgfrgrifngtlqgp")
    public suspend fun connectionTrackingSpecification(argument: suspend LaunchTemplateConnectionTrackingSpecificationArgsBuilder.() -> Unit) {
        val toBeMapped = LaunchTemplateConnectionTrackingSpecificationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.connectionTrackingSpecification = mapped
    }

    /**
     * @param value Indicates whether the network interface is deleted when the instance is terminated.
     */
    @JvmName("wqtvgdttpeykllsk")
    public suspend fun deleteOnTermination(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deleteOnTermination = mapped
    }

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

    /**
     * @param value The device index for the network interface attachment. Each network interface requires a device index. If you create a launch template that includes secondary network interfaces but not a primary network interface, then you must add a primary network interface as a launch parameter when you launch an instance from the template.
     */
    @JvmName("jwwwyoratlgmkjot")
    public suspend fun deviceIndex(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deviceIndex = mapped
    }

    /**
     * @param value The ENA Express configuration for the network interface.
     */
    @JvmName("usjruhxihponqmnh")
    public suspend fun enaSrdSpecification(`value`: LaunchTemplateEnaSrdSpecificationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enaSrdSpecification = mapped
    }

    /**
     * @param argument The ENA Express configuration for the network interface.
     */
    @JvmName("eyilscvlyqbkfixg")
    public suspend fun enaSrdSpecification(argument: suspend LaunchTemplateEnaSrdSpecificationArgsBuilder.() -> Unit) {
        val toBeMapped = LaunchTemplateEnaSrdSpecificationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.enaSrdSpecification = mapped
    }

    /**
     * @param value The IDs of one or more security groups.
     */
    @JvmName("mptkoobvitpglmyn")
    public suspend fun groups(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.groups = mapped
    }

    /**
     * @param values The IDs of one or more security groups.
     */
    @JvmName("outsfkmnsvrvjgig")
    public suspend fun groups(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.groups = mapped
    }

    /**
     * @param value The type of network interface. To create an Elastic Fabric Adapter (EFA), specify ``efa``. For more information, see [Elastic Fabric Adapter](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html) in the *Amazon EC2 User Guide*.
     *  If you are not creating an EFA, specify ``interface`` or omit this parameter.
     *  Valid values: ``interface`` | ``efa``
     */
    @JvmName("gkwqrvolattcmidh")
    public suspend fun interfaceType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.interfaceType = mapped
    }

    /**
     * @param value The number of IPv4 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the ``Ipv4Prefix`` option.
     */
    @JvmName("iwpwlellmfthfeen")
    public suspend fun ipv4PrefixCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipv4PrefixCount = mapped
    }

    /**
     * @param value One or more IPv4 prefixes to be assigned to the network interface. You cannot use this option if you use the ``Ipv4PrefixCount`` option.
     */
    @JvmName("hpydufsotussgqcx")
    public suspend fun ipv4Prefixes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipv4Prefixes = mapped
    }

    /**
     * @param argument One or more IPv4 prefixes to be assigned to the network interface. You cannot use this option if you use the ``Ipv4PrefixCount`` option.
     */
    @JvmName("nkxdcedtntsgkjyd")
    public suspend fun ipv4Prefixes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            LaunchTemplateIpv4PrefixSpecificationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.ipv4Prefixes = mapped
    }

    /**
     * @param argument One or more IPv4 prefixes to be assigned to the network interface. You cannot use this option if you use the ``Ipv4PrefixCount`` option.
     */
    @JvmName("irnpmlirambgsuep")
    public suspend fun ipv4Prefixes(vararg argument: suspend LaunchTemplateIpv4PrefixSpecificationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            LaunchTemplateIpv4PrefixSpecificationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.ipv4Prefixes = mapped
    }

    /**
     * @param argument One or more IPv4 prefixes to be assigned to the network interface. You cannot use this option if you use the ``Ipv4PrefixCount`` option.
     */
    @JvmName("btlmkvhtptflyoku")
    public suspend fun ipv4Prefixes(argument: suspend LaunchTemplateIpv4PrefixSpecificationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            LaunchTemplateIpv4PrefixSpecificationArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.ipv4Prefixes = mapped
    }

    /**
     * @param values One or more IPv4 prefixes to be assigned to the network interface. You cannot use this option if you use the ``Ipv4PrefixCount`` option.
     */
    @JvmName("nhgmklolyubbjgsm")
    public suspend fun ipv4Prefixes(vararg values: LaunchTemplateIpv4PrefixSpecificationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipv4Prefixes = mapped
    }

    /**
     * @param value The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.
     */
    @JvmName("indrxfosrsrvikbi")
    public suspend fun ipv6AddressCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipv6AddressCount = mapped
    }

    /**
     * @param value One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.
     */
    @JvmName("uylrwwhxharrqwvk")
    public suspend fun ipv6Addresses(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipv6Addresses = mapped
    }

    /**
     * @param argument One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.
     */
    @JvmName("jhyjhuvlbcmmxodp")
    public suspend fun ipv6Addresses(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            LaunchTemplateIpv6AddArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.ipv6Addresses = mapped
    }

    /**
     * @param argument One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.
     */
    @JvmName("edufhgkdoslskosv")
    public suspend fun ipv6Addresses(vararg argument: suspend LaunchTemplateIpv6AddArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            LaunchTemplateIpv6AddArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.ipv6Addresses = mapped
    }

    /**
     * @param argument One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.
     */
    @JvmName("tqhpdmqjlnxrqley")
    public suspend fun ipv6Addresses(argument: suspend LaunchTemplateIpv6AddArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(LaunchTemplateIpv6AddArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.ipv6Addresses = mapped
    }

    /**
     * @param values One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.
     */
    @JvmName("thgssprxwuixfkib")
    public suspend fun ipv6Addresses(vararg values: LaunchTemplateIpv6AddArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipv6Addresses = mapped
    }

    /**
     * @param value The number of IPv6 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the ``Ipv6Prefix`` option.
     */
    @JvmName("hdccrvvneeprqoan")
    public suspend fun ipv6PrefixCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipv6PrefixCount = mapped
    }

    /**
     * @param value One or more IPv6 prefixes to be assigned to the network interface. You cannot use this option if you use the ``Ipv6PrefixCount`` option.
     */
    @JvmName("skgmqdjftfxensbe")
    public suspend fun ipv6Prefixes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipv6Prefixes = mapped
    }

    /**
     * @param argument One or more IPv6 prefixes to be assigned to the network interface. You cannot use this option if you use the ``Ipv6PrefixCount`` option.
     */
    @JvmName("xucoodeghrnxbvjd")
    public suspend fun ipv6Prefixes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            LaunchTemplateIpv6PrefixSpecificationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.ipv6Prefixes = mapped
    }

    /**
     * @param argument One or more IPv6 prefixes to be assigned to the network interface. You cannot use this option if you use the ``Ipv6PrefixCount`` option.
     */
    @JvmName("aetklfomoynmwksy")
    public suspend fun ipv6Prefixes(vararg argument: suspend LaunchTemplateIpv6PrefixSpecificationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            LaunchTemplateIpv6PrefixSpecificationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.ipv6Prefixes = mapped
    }

    /**
     * @param argument One or more IPv6 prefixes to be assigned to the network interface. You cannot use this option if you use the ``Ipv6PrefixCount`` option.
     */
    @JvmName("fonsxyatijcstpeb")
    public suspend fun ipv6Prefixes(argument: suspend LaunchTemplateIpv6PrefixSpecificationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            LaunchTemplateIpv6PrefixSpecificationArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.ipv6Prefixes = mapped
    }

    /**
     * @param values One or more IPv6 prefixes to be assigned to the network interface. You cannot use this option if you use the ``Ipv6PrefixCount`` option.
     */
    @JvmName("viratrlmctsvsevc")
    public suspend fun ipv6Prefixes(vararg values: LaunchTemplateIpv6PrefixSpecificationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipv6Prefixes = mapped
    }

    /**
     * @param value The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.
     */
    @JvmName("mnmmgnabpbldgylr")
    public suspend fun networkCardIndex(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkCardIndex = mapped
    }

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

    /**
     * @param value The primary IPv6 address of the network interface. When you enable an IPv6 GUA address to be a primary IPv6, the first IPv6 GUA will be made the primary IPv6 address until the instance is terminated or the network interface is detached. For more information about primary IPv6 addresses, see [RunInstances](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html).
     */
    @JvmName("jnhishqfsmthrymf")
    public suspend fun primaryIpv6(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.primaryIpv6 = mapped
    }

    /**
     * @param value The primary private IPv4 address of the network interface.
     */
    @JvmName("chxffcdpuffixfog")
    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.
     */
    @JvmName("tmmhlewlbrkrspeh")
    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.
     */
    @JvmName("iygpmeknctnleohm")
    public suspend fun privateIpAddresses(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            LaunchTemplatePrivateIpAddArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.privateIpAddresses = mapped
    }

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

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

    /**
     * @param values One or more private IPv4 addresses.
     */
    @JvmName("yqhkhcciticghdmu")
    public suspend fun privateIpAddresses(vararg values: LaunchTemplatePrivateIpAddArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.privateIpAddresses = mapped
    }

    /**
     * @param value The number of secondary private IPv4 addresses to assign to a network interface.
     */
    @JvmName("qylpqkfvxamtgxoc")
    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 for the network interface.
     */
    @JvmName("afvdwxutfjagvcjw")
    public suspend fun subnetId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subnetId = mapped
    }

    internal fun build(): LaunchTemplateNetworkInterfaceArgs = LaunchTemplateNetworkInterfaceArgs(
        associateCarrierIpAddress = associateCarrierIpAddress,
        associatePublicIpAddress = associatePublicIpAddress,
        connectionTrackingSpecification = connectionTrackingSpecification,
        deleteOnTermination = deleteOnTermination,
        description = description,
        deviceIndex = deviceIndex,
        enaSrdSpecification = enaSrdSpecification,
        groups = groups,
        interfaceType = interfaceType,
        ipv4PrefixCount = ipv4PrefixCount,
        ipv4Prefixes = ipv4Prefixes,
        ipv6AddressCount = ipv6AddressCount,
        ipv6Addresses = ipv6Addresses,
        ipv6PrefixCount = ipv6PrefixCount,
        ipv6Prefixes = ipv6Prefixes,
        networkCardIndex = networkCardIndex,
        networkInterfaceId = networkInterfaceId,
        primaryIpv6 = primaryIpv6,
        privateIpAddress = privateIpAddress,
        privateIpAddresses = privateIpAddresses,
        secondaryPrivateIpAddressCount = secondaryPrivateIpAddressCount,
        subnetId = subnetId,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy