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

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

package com.pulumi.aws.ec2.kotlin

import com.pulumi.aws.ec2.NetworkInterfaceArgs.builder
import com.pulumi.aws.ec2.kotlin.inputs.NetworkInterfaceAttachmentArgs
import com.pulumi.aws.ec2.kotlin.inputs.NetworkInterfaceAttachmentArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Provides an Elastic network interface (ENI) resource.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const test = new aws.ec2.NetworkInterface("test", {
 *     subnetId: publicA.id,
 *     privateIps: ["10.0.0.50"],
 *     securityGroups: [web.id],
 *     attachments: [{
 *         instance: testAwsInstance.id,
 *         deviceIndex: 1,
 *     }],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * test = aws.ec2.NetworkInterface("test",
 *     subnet_id=public_a["id"],
 *     private_ips=["10.0.0.50"],
 *     security_groups=[web["id"]],
 *     attachments=[{
 *         "instance": test_aws_instance["id"],
 *         "device_index": 1,
 *     }])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var test = new Aws.Ec2.NetworkInterface("test", new()
 *     {
 *         SubnetId = publicA.Id,
 *         PrivateIps = new[]
 *         {
 *             "10.0.0.50",
 *         },
 *         SecurityGroups = new[]
 *         {
 *             web.Id,
 *         },
 *         Attachments = new[]
 *         {
 *             new Aws.Ec2.Inputs.NetworkInterfaceAttachmentArgs
 *             {
 *                 Instance = testAwsInstance.Id,
 *                 DeviceIndex = 1,
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := ec2.NewNetworkInterface(ctx, "test", &ec2.NetworkInterfaceArgs{
 * 			SubnetId: pulumi.Any(publicA.Id),
 * 			PrivateIps: pulumi.StringArray{
 * 				pulumi.String("10.0.0.50"),
 * 			},
 * 			SecurityGroups: pulumi.StringArray{
 * 				web.Id,
 * 			},
 * 			Attachments: ec2.NetworkInterfaceAttachmentTypeArray{
 * 				&ec2.NetworkInterfaceAttachmentTypeArgs{
 * 					Instance:    pulumi.Any(testAwsInstance.Id),
 * 					DeviceIndex: pulumi.Int(1),
 * 				},
 * 			},
 * 		})
 * 		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.aws.ec2.NetworkInterface;
 * import com.pulumi.aws.ec2.NetworkInterfaceArgs;
 * import com.pulumi.aws.ec2.inputs.NetworkInterfaceAttachmentArgs;
 * 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 test = new NetworkInterface("test", NetworkInterfaceArgs.builder()
 *             .subnetId(publicA.id())
 *             .privateIps("10.0.0.50")
 *             .securityGroups(web.id())
 *             .attachments(NetworkInterfaceAttachmentArgs.builder()
 *                 .instance(testAwsInstance.id())
 *                 .deviceIndex(1)
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   test:
 *     type: aws:ec2:NetworkInterface
 *     properties:
 *       subnetId: ${publicA.id}
 *       privateIps:
 *         - 10.0.0.50
 *       securityGroups:
 *         - ${web.id}
 *       attachments:
 *         - instance: ${testAwsInstance.id}
 *           deviceIndex: 1
 * ```
 * 
 * ### Example of Managing Multiple IPs on a Network Interface
 * By default, private IPs are managed through the `private_ips` and `private_ips_count` arguments which manage IPs as a set of IPs that are configured without regard to order. For a new network interface, the same primary IP address is consistently selected from a given set of addresses, regardless of the order provided. However, modifications of the set of addresses of an existing interface will not alter the current primary IP address unless it has been removed from the set.
 * In order to manage the private IPs as a sequentially ordered list, configure `private_ip_list_enabled` to `true` and use `private_ip_list` to manage the IPs. This will disable the `private_ips` and `private_ips_count` settings, which must be removed from the config file but are still exported. Note that changing the first address of `private_ip_list`, which is the primary, always requires a new interface.
 * If you are managing a specific set or list of IPs, instead of just using `private_ips_count`, this is a potential workflow for also leveraging `private_ips_count` to have AWS automatically assign additional IP addresses:
 * 1. Comment out `private_ips`, `private_ip_list`, `private_ip_list_enabled` in your configuration
 * 2. Set the desired `private_ips_count` (count of the number of secondaries, the primary is not included)
 * 3. Apply to assign the extra IPs
 * 4. Remove `private_ips_count` and restore your settings from the first step
 * 5. Add the new IPs to your current settings
 * 6. Apply again to update the stored state
 * This process can also be used to remove IP addresses in addition to the option of manually removing them. Adding IP addresses in a manually is more difficult because it requires knowledge of which addresses are available.
 * ## Import
 * Using `pulumi import`, import Network Interfaces using the `id`. For example:
 * ```sh
 * $ pulumi import aws:ec2/networkInterface:NetworkInterface test eni-e5aa89a3
 * ```
 * @property attachments Configuration block to define the attachment of the ENI. See Attachment below for more details!
 * @property description Description for the network interface.
 * @property interfaceType Type of network interface to create. Set to `efa` for Elastic Fabric Adapter. Changing `interface_type` will cause the resource to be destroyed and re-created.
 * @property ipv4PrefixCount Number of IPv4 prefixes that AWS automatically assigns to the network interface.
 * @property ipv4Prefixes One or more IPv4 prefixes assigned to the network interface.
 * @property ipv6AddressCount Number of IPv6 addresses to assign to a network interface. You can't use this option if specifying specific `ipv6_addresses`. If your subnet has the AssignIpv6AddressOnCreation attribute set to `true`, you can specify `0` to override this setting.
 * @property ipv6AddressListEnabled Whether `ipv6_address_list` is allowed and controls the IPs to assign to the ENI and `ipv6_addresses` and `ipv6_address_count` become read-only. Default false.
 * @property ipv6AddressLists List of private IPs to assign to the ENI in sequential order.
 * @property ipv6Addresses One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Addresses are assigned without regard to order. You can't use this option if you're specifying `ipv6_address_count`.
 * @property ipv6PrefixCount Number of IPv6 prefixes that AWS automatically assigns to the network interface.
 * @property ipv6Prefixes One or more IPv6 prefixes assigned to the network interface.
 * @property privateIp
 * @property privateIpListEnabled Whether `private_ip_list` is allowed and controls the IPs to assign to the ENI and `private_ips` and `private_ips_count` become read-only. Default false.
 * @property privateIpLists List of private IPs to assign to the ENI in sequential order. Requires setting `private_ip_list_enabled` to `true`.
 * @property privateIps List of private IPs to assign to the ENI without regard to order.
 * @property privateIpsCount Number of secondary private IPs to assign to the ENI. The total number of private IPs will be 1 + `private_ips_count`, as a primary private IP will be assiged to an ENI by default.
 * @property securityGroups List of security group IDs to assign to the ENI.
 * @property sourceDestCheck Whether to enable source destination checking for the ENI. Default true.
 * @property subnetId Subnet ID to create the ENI in.
 * The following arguments are optional:
 * @property tags Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
 */
public data class NetworkInterfaceArgs(
    public val attachments: Output>? = null,
    public val description: Output? = null,
    public val interfaceType: Output? = null,
    public val ipv4PrefixCount: Output? = null,
    public val ipv4Prefixes: Output>? = null,
    public val ipv6AddressCount: Output? = null,
    public val ipv6AddressListEnabled: Output? = null,
    public val ipv6AddressLists: Output>? = null,
    public val ipv6Addresses: Output>? = null,
    public val ipv6PrefixCount: Output? = null,
    public val ipv6Prefixes: Output>? = null,
    public val privateIp: Output? = null,
    public val privateIpListEnabled: Output? = null,
    public val privateIpLists: Output>? = null,
    public val privateIps: Output>? = null,
    public val privateIpsCount: Output? = null,
    public val securityGroups: Output>? = null,
    public val sourceDestCheck: Output? = null,
    public val subnetId: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.ec2.NetworkInterfaceArgs =
        com.pulumi.aws.ec2.NetworkInterfaceArgs.builder()
            .attachments(
                attachments?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .description(description?.applyValue({ args0 -> args0 }))
            .interfaceType(interfaceType?.applyValue({ args0 -> args0 }))
            .ipv4PrefixCount(ipv4PrefixCount?.applyValue({ args0 -> args0 }))
            .ipv4Prefixes(ipv4Prefixes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .ipv6AddressCount(ipv6AddressCount?.applyValue({ args0 -> args0 }))
            .ipv6AddressListEnabled(ipv6AddressListEnabled?.applyValue({ args0 -> args0 }))
            .ipv6AddressLists(ipv6AddressLists?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .ipv6Addresses(ipv6Addresses?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .ipv6PrefixCount(ipv6PrefixCount?.applyValue({ args0 -> args0 }))
            .ipv6Prefixes(ipv6Prefixes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .privateIp(privateIp?.applyValue({ args0 -> args0 }))
            .privateIpListEnabled(privateIpListEnabled?.applyValue({ args0 -> args0 }))
            .privateIpLists(privateIpLists?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .privateIps(privateIps?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .privateIpsCount(privateIpsCount?.applyValue({ args0 -> args0 }))
            .securityGroups(securityGroups?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .sourceDestCheck(sourceDestCheck?.applyValue({ args0 -> args0 }))
            .subnetId(subnetId?.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 attachments: Output>? = null

    private var description: Output? = null

    private var interfaceType: Output? = null

    private var ipv4PrefixCount: Output? = null

    private var ipv4Prefixes: Output>? = null

    private var ipv6AddressCount: Output? = null

    private var ipv6AddressListEnabled: Output? = null

    private var ipv6AddressLists: Output>? = null

    private var ipv6Addresses: Output>? = null

    private var ipv6PrefixCount: Output? = null

    private var ipv6Prefixes: Output>? = null

    private var privateIp: Output? = null

    private var privateIpListEnabled: Output? = null

    private var privateIpLists: Output>? = null

    private var privateIps: Output>? = null

    private var privateIpsCount: Output? = null

    private var securityGroups: Output>? = null

    private var sourceDestCheck: Output? = null

    private var subnetId: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Configuration block to define the attachment of the ENI. See Attachment below for more details!
     */
    @JvmName("qukklpykgredsklq")
    public suspend fun attachments(`value`: Output>) {
        this.attachments = value
    }

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

    /**
     * @param values Configuration block to define the attachment of the ENI. See Attachment below for more details!
     */
    @JvmName("ideiigygsmaryqil")
    public suspend fun attachments(values: List>) {
        this.attachments = Output.all(values)
    }

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

    /**
     * @param value Type of network interface to create. Set to `efa` for Elastic Fabric Adapter. Changing `interface_type` will cause the resource to be destroyed and re-created.
     */
    @JvmName("xyvpxxqfjjngebrd")
    public suspend fun interfaceType(`value`: Output) {
        this.interfaceType = value
    }

    /**
     * @param value Number of IPv4 prefixes that AWS automatically assigns to the network interface.
     */
    @JvmName("sgphitbkbutmdcuq")
    public suspend fun ipv4PrefixCount(`value`: Output) {
        this.ipv4PrefixCount = value
    }

    /**
     * @param value One or more IPv4 prefixes assigned to the network interface.
     */
    @JvmName("wxifwydnulqqibph")
    public suspend fun ipv4Prefixes(`value`: Output>) {
        this.ipv4Prefixes = value
    }

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

    /**
     * @param values One or more IPv4 prefixes assigned to the network interface.
     */
    @JvmName("ggqsbfbltmggxjdh")
    public suspend fun ipv4Prefixes(values: List>) {
        this.ipv4Prefixes = Output.all(values)
    }

    /**
     * @param value Number of IPv6 addresses to assign to a network interface. You can't use this option if specifying specific `ipv6_addresses`. If your subnet has the AssignIpv6AddressOnCreation attribute set to `true`, you can specify `0` to override this setting.
     */
    @JvmName("ywkopsihmfbobcus")
    public suspend fun ipv6AddressCount(`value`: Output) {
        this.ipv6AddressCount = value
    }

    /**
     * @param value Whether `ipv6_address_list` is allowed and controls the IPs to assign to the ENI and `ipv6_addresses` and `ipv6_address_count` become read-only. Default false.
     */
    @JvmName("nxlghneugtptosda")
    public suspend fun ipv6AddressListEnabled(`value`: Output) {
        this.ipv6AddressListEnabled = value
    }

    /**
     * @param value List of private IPs to assign to the ENI in sequential order.
     */
    @JvmName("okafpdxqcdxgddnh")
    public suspend fun ipv6AddressLists(`value`: Output>) {
        this.ipv6AddressLists = value
    }

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

    /**
     * @param values List of private IPs to assign to the ENI in sequential order.
     */
    @JvmName("pgnelrxecjelsjum")
    public suspend fun ipv6AddressLists(values: List>) {
        this.ipv6AddressLists = Output.all(values)
    }

    /**
     * @param value One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Addresses are assigned without regard to order. You can't use this option if you're specifying `ipv6_address_count`.
     */
    @JvmName("bkpgafomphkekxkf")
    public suspend fun ipv6Addresses(`value`: Output>) {
        this.ipv6Addresses = value
    }

    @JvmName("jtehmrmrqvfjvqyv")
    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. Addresses are assigned without regard to order. You can't use this option if you're specifying `ipv6_address_count`.
     */
    @JvmName("hvbsrhiyuwgyhewf")
    public suspend fun ipv6Addresses(values: List>) {
        this.ipv6Addresses = Output.all(values)
    }

    /**
     * @param value Number of IPv6 prefixes that AWS automatically assigns to the network interface.
     */
    @JvmName("frkudounvvrfrloa")
    public suspend fun ipv6PrefixCount(`value`: Output) {
        this.ipv6PrefixCount = value
    }

    /**
     * @param value One or more IPv6 prefixes assigned to the network interface.
     */
    @JvmName("jpojnurcarhuxcpv")
    public suspend fun ipv6Prefixes(`value`: Output>) {
        this.ipv6Prefixes = value
    }

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

    /**
     * @param values One or more IPv6 prefixes assigned to the network interface.
     */
    @JvmName("ioronkxtrtgjjhit")
    public suspend fun ipv6Prefixes(values: List>) {
        this.ipv6Prefixes = Output.all(values)
    }

    /**
     * @param value
     */
    @JvmName("cxokachodibkolit")
    public suspend fun privateIp(`value`: Output) {
        this.privateIp = value
    }

    /**
     * @param value Whether `private_ip_list` is allowed and controls the IPs to assign to the ENI and `private_ips` and `private_ips_count` become read-only. Default false.
     */
    @JvmName("magdlnpiorwmvvwy")
    public suspend fun privateIpListEnabled(`value`: Output) {
        this.privateIpListEnabled = value
    }

    /**
     * @param value List of private IPs to assign to the ENI in sequential order. Requires setting `private_ip_list_enabled` to `true`.
     */
    @JvmName("equjsqyduhlmldgw")
    public suspend fun privateIpLists(`value`: Output>) {
        this.privateIpLists = value
    }

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

    /**
     * @param values List of private IPs to assign to the ENI in sequential order. Requires setting `private_ip_list_enabled` to `true`.
     */
    @JvmName("ytcpqraevdcsnbru")
    public suspend fun privateIpLists(values: List>) {
        this.privateIpLists = Output.all(values)
    }

    /**
     * @param value List of private IPs to assign to the ENI without regard to order.
     */
    @JvmName("hjnvkvwlrfnfhrxl")
    public suspend fun privateIps(`value`: Output>) {
        this.privateIps = value
    }

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

    /**
     * @param values List of private IPs to assign to the ENI without regard to order.
     */
    @JvmName("pgtgeruswcaorbjj")
    public suspend fun privateIps(values: List>) {
        this.privateIps = Output.all(values)
    }

    /**
     * @param value Number of secondary private IPs to assign to the ENI. The total number of private IPs will be 1 + `private_ips_count`, as a primary private IP will be assiged to an ENI by default.
     */
    @JvmName("tnqgdeslpcljbfea")
    public suspend fun privateIpsCount(`value`: Output) {
        this.privateIpsCount = value
    }

    /**
     * @param value List of security group IDs to assign to the ENI.
     */
    @JvmName("jifqiymykgiwnnga")
    public suspend fun securityGroups(`value`: Output>) {
        this.securityGroups = value
    }

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

    /**
     * @param values List of security group IDs to assign to the ENI.
     */
    @JvmName("vwksceqpjgjekcln")
    public suspend fun securityGroups(values: List>) {
        this.securityGroups = Output.all(values)
    }

    /**
     * @param value Whether to enable source destination checking for the ENI. Default true.
     */
    @JvmName("jlxlblfvskceoadh")
    public suspend fun sourceDestCheck(`value`: Output) {
        this.sourceDestCheck = value
    }

    /**
     * @param value Subnet ID to create the ENI in.
     * The following arguments are optional:
     */
    @JvmName("gejldggospdmkgbt")
    public suspend fun subnetId(`value`: Output) {
        this.subnetId = value
    }

    /**
     * @param value Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("fsbvpcqxtcevnufk")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Configuration block to define the attachment of the ENI. See Attachment below for more details!
     */
    @JvmName("gvypwfboflrwxnep")
    public suspend fun attachments(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.attachments = mapped
    }

    /**
     * @param argument Configuration block to define the attachment of the ENI. See Attachment below for more details!
     */
    @JvmName("cixmgedicuusalpi")
    public suspend fun attachments(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            NetworkInterfaceAttachmentArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.attachments = mapped
    }

    /**
     * @param argument Configuration block to define the attachment of the ENI. See Attachment below for more details!
     */
    @JvmName("lpfdjbxvblosriuh")
    public suspend fun attachments(vararg argument: suspend NetworkInterfaceAttachmentArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            NetworkInterfaceAttachmentArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.attachments = mapped
    }

    /**
     * @param argument Configuration block to define the attachment of the ENI. See Attachment below for more details!
     */
    @JvmName("gdewfaguqtawakpw")
    public suspend fun attachments(argument: suspend NetworkInterfaceAttachmentArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            NetworkInterfaceAttachmentArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.attachments = mapped
    }

    /**
     * @param values Configuration block to define the attachment of the ENI. See Attachment below for more details!
     */
    @JvmName("sfvbagpwgcjgcesi")
    public suspend fun attachments(vararg values: NetworkInterfaceAttachmentArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.attachments = mapped
    }

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

    /**
     * @param value Type of network interface to create. Set to `efa` for Elastic Fabric Adapter. Changing `interface_type` will cause the resource to be destroyed and re-created.
     */
    @JvmName("iwylyjidpclwfxqw")
    public suspend fun interfaceType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.interfaceType = mapped
    }

    /**
     * @param value Number of IPv4 prefixes that AWS automatically assigns to the network interface.
     */
    @JvmName("qisvxgjuiptkscqy")
    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 assigned to the network interface.
     */
    @JvmName("qptdvudugxxtriys")
    public suspend fun ipv4Prefixes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipv4Prefixes = mapped
    }

    /**
     * @param values One or more IPv4 prefixes assigned to the network interface.
     */
    @JvmName("xcqdahvrijumcngn")
    public suspend fun ipv4Prefixes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipv4Prefixes = mapped
    }

    /**
     * @param value Number of IPv6 addresses to assign to a network interface. You can't use this option if specifying specific `ipv6_addresses`. If your subnet has the AssignIpv6AddressOnCreation attribute set to `true`, you can specify `0` to override this setting.
     */
    @JvmName("vjernutkajsaapmq")
    public suspend fun ipv6AddressCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipv6AddressCount = mapped
    }

    /**
     * @param value Whether `ipv6_address_list` is allowed and controls the IPs to assign to the ENI and `ipv6_addresses` and `ipv6_address_count` become read-only. Default false.
     */
    @JvmName("yyjinuqlkdhyciid")
    public suspend fun ipv6AddressListEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipv6AddressListEnabled = mapped
    }

    /**
     * @param value List of private IPs to assign to the ENI in sequential order.
     */
    @JvmName("oprtrtqftbyosmui")
    public suspend fun ipv6AddressLists(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipv6AddressLists = mapped
    }

    /**
     * @param values List of private IPs to assign to the ENI in sequential order.
     */
    @JvmName("ualiitpggryrbxnw")
    public suspend fun ipv6AddressLists(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipv6AddressLists = mapped
    }

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

    /**
     * @param values One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Addresses are assigned without regard to order. You can't use this option if you're specifying `ipv6_address_count`.
     */
    @JvmName("niggxgfdqxmripii")
    public suspend fun ipv6Addresses(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipv6Addresses = mapped
    }

    /**
     * @param value Number of IPv6 prefixes that AWS automatically assigns to the network interface.
     */
    @JvmName("xgjgumhxllxqukxj")
    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 assigned to the network interface.
     */
    @JvmName("tcgjqfyfdtdkthpn")
    public suspend fun ipv6Prefixes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipv6Prefixes = mapped
    }

    /**
     * @param values One or more IPv6 prefixes assigned to the network interface.
     */
    @JvmName("yehrrisuikbssusr")
    public suspend fun ipv6Prefixes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipv6Prefixes = mapped
    }

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

    /**
     * @param value Whether `private_ip_list` is allowed and controls the IPs to assign to the ENI and `private_ips` and `private_ips_count` become read-only. Default false.
     */
    @JvmName("btfinkwyuwujfvdl")
    public suspend fun privateIpListEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.privateIpListEnabled = mapped
    }

    /**
     * @param value List of private IPs to assign to the ENI in sequential order. Requires setting `private_ip_list_enabled` to `true`.
     */
    @JvmName("hgdycbusdgsbqgly")
    public suspend fun privateIpLists(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.privateIpLists = mapped
    }

    /**
     * @param values List of private IPs to assign to the ENI in sequential order. Requires setting `private_ip_list_enabled` to `true`.
     */
    @JvmName("rsgrytvxjpwtskin")
    public suspend fun privateIpLists(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.privateIpLists = mapped
    }

    /**
     * @param value List of private IPs to assign to the ENI without regard to order.
     */
    @JvmName("nyvidgqwyqatityd")
    public suspend fun privateIps(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.privateIps = mapped
    }

    /**
     * @param values List of private IPs to assign to the ENI without regard to order.
     */
    @JvmName("juakcjqqoamvobfd")
    public suspend fun privateIps(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.privateIps = mapped
    }

    /**
     * @param value Number of secondary private IPs to assign to the ENI. The total number of private IPs will be 1 + `private_ips_count`, as a primary private IP will be assiged to an ENI by default.
     */
    @JvmName("kwcuyxyahgahsxqm")
    public suspend fun privateIpsCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.privateIpsCount = mapped
    }

    /**
     * @param value List of security group IDs to assign to the ENI.
     */
    @JvmName("rqdphmbphfjyrilk")
    public suspend fun securityGroups(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.securityGroups = mapped
    }

    /**
     * @param values List of security group IDs to assign to the ENI.
     */
    @JvmName("virhpkpxshiqdiyi")
    public suspend fun securityGroups(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.securityGroups = mapped
    }

    /**
     * @param value Whether to enable source destination checking for the ENI. Default true.
     */
    @JvmName("axjotuwjdtdpowtx")
    public suspend fun sourceDestCheck(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceDestCheck = mapped
    }

    /**
     * @param value Subnet ID to create the ENI in.
     * The following arguments are optional:
     */
    @JvmName("vaitanyqsorwgtpu")
    public suspend fun subnetId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subnetId = mapped
    }

    /**
     * @param value Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("nvckycmsmwoqlyyi")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("lbnqhkngmblhykbv")
    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(
        attachments = attachments,
        description = description,
        interfaceType = interfaceType,
        ipv4PrefixCount = ipv4PrefixCount,
        ipv4Prefixes = ipv4Prefixes,
        ipv6AddressCount = ipv6AddressCount,
        ipv6AddressListEnabled = ipv6AddressListEnabled,
        ipv6AddressLists = ipv6AddressLists,
        ipv6Addresses = ipv6Addresses,
        ipv6PrefixCount = ipv6PrefixCount,
        ipv6Prefixes = ipv6Prefixes,
        privateIp = privateIp,
        privateIpListEnabled = privateIpListEnabled,
        privateIpLists = privateIpLists,
        privateIps = privateIps,
        privateIpsCount = privateIpsCount,
        securityGroups = securityGroups,
        sourceDestCheck = sourceDestCheck,
        subnetId = subnetId,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy