
com.pulumi.awsnative.ec2.kotlin.EipAssociationArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.ec2.kotlin
import com.pulumi.awsnative.ec2.EipAssociationArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Associates an Elastic IP address with an instance or a network interface. Before you can use an Elastic IP address, you must allocate it to your account. For more information about working with Elastic IP addresses, see [Elastic IP address concepts and rules](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#vpc-eip-overview).
* You must specify ``AllocationId`` and either ``InstanceId``, ``NetworkInterfaceId``, or ``PrivateIpAddress``.
* @property allocationId The allocation ID. This is required.
* @property eip
* @property instanceId The ID of the instance. The instance must have exactly one attached network interface. You can specify either the instance ID or the network interface ID, but not both.
* @property networkInterfaceId The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.
* You can specify either the instance ID or the network interface ID, but not both.
* @property privateIpAddress The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.
*/
public data class EipAssociationArgs(
public val allocationId: Output? = null,
public val eip: Output? = null,
public val instanceId: Output? = null,
public val networkInterfaceId: Output? = null,
public val privateIpAddress: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.ec2.EipAssociationArgs =
com.pulumi.awsnative.ec2.EipAssociationArgs.builder()
.allocationId(allocationId?.applyValue({ args0 -> args0 }))
.eip(eip?.applyValue({ args0 -> args0 }))
.instanceId(instanceId?.applyValue({ args0 -> args0 }))
.networkInterfaceId(networkInterfaceId?.applyValue({ args0 -> args0 }))
.privateIpAddress(privateIpAddress?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [EipAssociationArgs].
*/
@PulumiTagMarker
public class EipAssociationArgsBuilder internal constructor() {
private var allocationId: Output? = null
private var eip: Output? = null
private var instanceId: Output? = null
private var networkInterfaceId: Output? = null
private var privateIpAddress: Output? = null
/**
* @param value The allocation ID. This is required.
*/
@JvmName("baqykgdtgujxepvc")
public suspend fun allocationId(`value`: Output) {
this.allocationId = value
}
/**
* @param value
*/
@JvmName("hdplacfgjlldlwlj")
public suspend fun eip(`value`: Output) {
this.eip = value
}
/**
* @param value The ID of the instance. The instance must have exactly one attached network interface. You can specify either the instance ID or the network interface ID, but not both.
*/
@JvmName("lxalbjvubugihpqo")
public suspend fun instanceId(`value`: Output) {
this.instanceId = value
}
/**
* @param value The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.
* You can specify either the instance ID or the network interface ID, but not both.
*/
@JvmName("uummuymmynowvgrs")
public suspend fun networkInterfaceId(`value`: Output) {
this.networkInterfaceId = value
}
/**
* @param value The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.
*/
@JvmName("exicnamevnqemmpe")
public suspend fun privateIpAddress(`value`: Output) {
this.privateIpAddress = value
}
/**
* @param value The allocation ID. This is required.
*/
@JvmName("rbacwwshkdbdvedk")
public suspend fun allocationId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.allocationId = mapped
}
/**
* @param value
*/
@JvmName("cyojyhmkkuvxuvja")
public suspend fun eip(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.eip = mapped
}
/**
* @param value The ID of the instance. The instance must have exactly one attached network interface. You can specify either the instance ID or the network interface ID, but not both.
*/
@JvmName("qfdcutpgeoxljxtv")
public suspend fun instanceId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.instanceId = mapped
}
/**
* @param value The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.
* You can specify either the instance ID or the network interface ID, but not both.
*/
@JvmName("udlntvqiunacdcab")
public suspend fun networkInterfaceId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.networkInterfaceId = mapped
}
/**
* @param value The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.
*/
@JvmName("dmugkeowfegwdljr")
public suspend fun privateIpAddress(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.privateIpAddress = mapped
}
internal fun build(): EipAssociationArgs = EipAssociationArgs(
allocationId = allocationId,
eip = eip,
instanceId = instanceId,
networkInterfaceId = networkInterfaceId,
privateIpAddress = privateIpAddress,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy