![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.ec2.kotlin.outputs.LaunchTemplateNetworkInterface.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.ec2.kotlin.outputs
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
/**
* 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 LaunchTemplateNetworkInterface(
public val associateCarrierIpAddress: Boolean? = null,
public val associatePublicIpAddress: Boolean? = null,
public val connectionTrackingSpecification: LaunchTemplateConnectionTrackingSpecification? = null,
public val deleteOnTermination: Boolean? = null,
public val description: String? = null,
public val deviceIndex: Int? = null,
public val enaSrdSpecification: LaunchTemplateEnaSrdSpecification? = null,
public val groups: List? = null,
public val interfaceType: String? = null,
public val ipv4PrefixCount: Int? = null,
public val ipv4Prefixes: List? = null,
public val ipv6AddressCount: Int? = null,
public val ipv6Addresses: List? = null,
public val ipv6PrefixCount: Int? = null,
public val ipv6Prefixes: List? = null,
public val networkCardIndex: Int? = null,
public val networkInterfaceId: String? = null,
public val primaryIpv6: Boolean? = null,
public val privateIpAddress: String? = null,
public val privateIpAddresses: List? = null,
public val secondaryPrivateIpAddressCount: Int? = null,
public val subnetId: String? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.awsnative.ec2.outputs.LaunchTemplateNetworkInterface): LaunchTemplateNetworkInterface = LaunchTemplateNetworkInterface(
associateCarrierIpAddress = javaType.associateCarrierIpAddress().map({ args0 ->
args0
}).orElse(null),
associatePublicIpAddress = javaType.associatePublicIpAddress().map({ args0 -> args0 }).orElse(null),
connectionTrackingSpecification = javaType.connectionTrackingSpecification().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.ec2.kotlin.outputs.LaunchTemplateConnectionTrackingSpecification.Companion.toKotlin(args0)
})
}).orElse(null),
deleteOnTermination = javaType.deleteOnTermination().map({ args0 -> args0 }).orElse(null),
description = javaType.description().map({ args0 -> args0 }).orElse(null),
deviceIndex = javaType.deviceIndex().map({ args0 -> args0 }).orElse(null),
enaSrdSpecification = javaType.enaSrdSpecification().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.ec2.kotlin.outputs.LaunchTemplateEnaSrdSpecification.Companion.toKotlin(args0)
})
}).orElse(null),
groups = javaType.groups().map({ args0 -> args0 }),
interfaceType = javaType.interfaceType().map({ args0 -> args0 }).orElse(null),
ipv4PrefixCount = javaType.ipv4PrefixCount().map({ args0 -> args0 }).orElse(null),
ipv4Prefixes = javaType.ipv4Prefixes().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.ec2.kotlin.outputs.LaunchTemplateIpv4PrefixSpecification.Companion.toKotlin(args0)
})
}),
ipv6AddressCount = javaType.ipv6AddressCount().map({ args0 -> args0 }).orElse(null),
ipv6Addresses = javaType.ipv6Addresses().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.ec2.kotlin.outputs.LaunchTemplateIpv6Add.Companion.toKotlin(args0)
})
}),
ipv6PrefixCount = javaType.ipv6PrefixCount().map({ args0 -> args0 }).orElse(null),
ipv6Prefixes = javaType.ipv6Prefixes().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.ec2.kotlin.outputs.LaunchTemplateIpv6PrefixSpecification.Companion.toKotlin(args0)
})
}),
networkCardIndex = javaType.networkCardIndex().map({ args0 -> args0 }).orElse(null),
networkInterfaceId = javaType.networkInterfaceId().map({ args0 -> args0 }).orElse(null),
primaryIpv6 = javaType.primaryIpv6().map({ args0 -> args0 }).orElse(null),
privateIpAddress = javaType.privateIpAddress().map({ args0 -> args0 }).orElse(null),
privateIpAddresses = javaType.privateIpAddresses().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.ec2.kotlin.outputs.LaunchTemplatePrivateIpAdd.Companion.toKotlin(args0)
})
}),
secondaryPrivateIpAddressCount = javaType.secondaryPrivateIpAddressCount().map({ args0 ->
args0
}).orElse(null),
subnetId = javaType.subnetId().map({ args0 -> args0 }).orElse(null),
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy