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

com.pulumi.awsnative.ec2.kotlin.EipArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.ec2.kotlin

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

/**
 * Specifies an Elastic IP (EIP) address and can, optionally, associate it with an Amazon EC2 instance.
 *  You can allocate an Elastic IP address from an address pool owned by AWS or from an address pool created from a public IPv4 address range that you have brought to AWS for use with your AWS resources using bring your own IP addresses (BYOIP). For more information, see [Bring Your Own IP Addresses (BYOIP)](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html) in the *Amazon EC2 User Guide*.
 *  For more information, see [Elastic IP Addresses](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) in the *Amazon EC2 User Guide*.
 * @property domain The network (``vpc``).
 *  If you define an Elastic IP address and associate it with a VPC that is defined in the same template, you must declare a dependency on the VPC-gateway attachment by using the [DependsOn Attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html) on this resource.
 * @property instanceId The ID of the instance.
 *   Updates to the ``InstanceId`` property may require *some interruptions*. Updates on an EIP reassociates the address on its associated resource.
 * @property networkBorderGroup A unique set of Availability Zones, Local Zones, or Wavelength Zones from which AWS advertises IP addresses. Use this parameter to limit the IP address to this location. IP addresses cannot move between network border groups.
 *  Use [DescribeAvailabilityZones](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAvailabilityZones.html) to view the network border groups.
 * @property publicIpv4Pool The ID of an address pool that you own. Use this parameter to let Amazon EC2 select an address from the address pool.
 *   Updates to the ``PublicIpv4Pool`` property may require *some interruptions*. Updates on an EIP reassociates the address on its associated resource.
 * @property tags Any tags assigned to the Elastic IP address.
 *   Updates to the ``Tags`` property may require *some interruptions*. Updates on an EIP reassociates the address on its associated resource.
 * @property transferAddress The Elastic IP address you are accepting for transfer. You can only accept one transferred address. For more information on Elastic IP address transfers, see [Transfer Elastic IP addresses](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#transfer-EIPs-intro) in the *Amazon Virtual Private Cloud User Guide*.
 */
public data class EipArgs(
    public val domain: Output? = null,
    public val instanceId: Output? = null,
    public val networkBorderGroup: Output? = null,
    public val publicIpv4Pool: Output? = null,
    public val tags: Output>? = null,
    public val transferAddress: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.ec2.EipArgs =
        com.pulumi.awsnative.ec2.EipArgs.builder()
            .domain(domain?.applyValue({ args0 -> args0 }))
            .instanceId(instanceId?.applyValue({ args0 -> args0 }))
            .networkBorderGroup(networkBorderGroup?.applyValue({ args0 -> args0 }))
            .publicIpv4Pool(publicIpv4Pool?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .transferAddress(transferAddress?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [EipArgs].
 */
@PulumiTagMarker
public class EipArgsBuilder internal constructor() {
    private var domain: Output? = null

    private var instanceId: Output? = null

    private var networkBorderGroup: Output? = null

    private var publicIpv4Pool: Output? = null

    private var tags: Output>? = null

    private var transferAddress: Output? = null

    /**
     * @param value The network (``vpc``).
     *  If you define an Elastic IP address and associate it with a VPC that is defined in the same template, you must declare a dependency on the VPC-gateway attachment by using the [DependsOn Attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html) on this resource.
     */
    @JvmName("qjfydobusxknbitr")
    public suspend fun domain(`value`: Output) {
        this.domain = value
    }

    /**
     * @param value The ID of the instance.
     *   Updates to the ``InstanceId`` property may require *some interruptions*. Updates on an EIP reassociates the address on its associated resource.
     */
    @JvmName("ofohmpyyihdfhdih")
    public suspend fun instanceId(`value`: Output) {
        this.instanceId = value
    }

    /**
     * @param value A unique set of Availability Zones, Local Zones, or Wavelength Zones from which AWS advertises IP addresses. Use this parameter to limit the IP address to this location. IP addresses cannot move between network border groups.
     *  Use [DescribeAvailabilityZones](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAvailabilityZones.html) to view the network border groups.
     */
    @JvmName("hvsajhltshpypxxe")
    public suspend fun networkBorderGroup(`value`: Output) {
        this.networkBorderGroup = value
    }

    /**
     * @param value The ID of an address pool that you own. Use this parameter to let Amazon EC2 select an address from the address pool.
     *   Updates to the ``PublicIpv4Pool`` property may require *some interruptions*. Updates on an EIP reassociates the address on its associated resource.
     */
    @JvmName("wcjdbqhcjgjfhsxf")
    public suspend fun publicIpv4Pool(`value`: Output) {
        this.publicIpv4Pool = value
    }

    /**
     * @param value Any tags assigned to the Elastic IP address.
     *   Updates to the ``Tags`` property may require *some interruptions*. Updates on an EIP reassociates the address on its associated resource.
     */
    @JvmName("ypyjjhowqejnempv")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values Any tags assigned to the Elastic IP address.
     *   Updates to the ``Tags`` property may require *some interruptions*. Updates on an EIP reassociates the address on its associated resource.
     */
    @JvmName("wqxvafpajtwflxer")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value The Elastic IP address you are accepting for transfer. You can only accept one transferred address. For more information on Elastic IP address transfers, see [Transfer Elastic IP addresses](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#transfer-EIPs-intro) in the *Amazon Virtual Private Cloud User Guide*.
     */
    @JvmName("lrcmomxqemdqrefb")
    public suspend fun transferAddress(`value`: Output) {
        this.transferAddress = value
    }

    /**
     * @param value The network (``vpc``).
     *  If you define an Elastic IP address and associate it with a VPC that is defined in the same template, you must declare a dependency on the VPC-gateway attachment by using the [DependsOn Attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html) on this resource.
     */
    @JvmName("jqmcyiftqtmpiiew")
    public suspend fun domain(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.domain = mapped
    }

    /**
     * @param value The ID of the instance.
     *   Updates to the ``InstanceId`` property may require *some interruptions*. Updates on an EIP reassociates the address on its associated resource.
     */
    @JvmName("gqrvuolpexsqjygg")
    public suspend fun instanceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceId = mapped
    }

    /**
     * @param value A unique set of Availability Zones, Local Zones, or Wavelength Zones from which AWS advertises IP addresses. Use this parameter to limit the IP address to this location. IP addresses cannot move between network border groups.
     *  Use [DescribeAvailabilityZones](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAvailabilityZones.html) to view the network border groups.
     */
    @JvmName("xcedscpvjvfkyuhe")
    public suspend fun networkBorderGroup(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkBorderGroup = mapped
    }

    /**
     * @param value The ID of an address pool that you own. Use this parameter to let Amazon EC2 select an address from the address pool.
     *   Updates to the ``PublicIpv4Pool`` property may require *some interruptions*. Updates on an EIP reassociates the address on its associated resource.
     */
    @JvmName("ekffuwxetfdkioqw")
    public suspend fun publicIpv4Pool(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicIpv4Pool = mapped
    }

    /**
     * @param value Any tags assigned to the Elastic IP address.
     *   Updates to the ``Tags`` property may require *some interruptions*. Updates on an EIP reassociates the address on its associated resource.
     */
    @JvmName("hduahwbjrtuvfago")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument Any tags assigned to the Elastic IP address.
     *   Updates to the ``Tags`` property may require *some interruptions*. Updates on an EIP reassociates the address on its associated resource.
     */
    @JvmName("oebjiyvvedgrpfik")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument Any tags assigned to the Elastic IP address.
     *   Updates to the ``Tags`` property may require *some interruptions*. Updates on an EIP reassociates the address on its associated resource.
     */
    @JvmName("utagkvmjmuphrdte")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument Any tags assigned to the Elastic IP address.
     *   Updates to the ``Tags`` property may require *some interruptions*. Updates on an EIP reassociates the address on its associated resource.
     */
    @JvmName("bkngqdchxqpydnbw")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values Any tags assigned to the Elastic IP address.
     *   Updates to the ``Tags`` property may require *some interruptions*. Updates on an EIP reassociates the address on its associated resource.
     */
    @JvmName("dqqwolkkkxiotdlw")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The Elastic IP address you are accepting for transfer. You can only accept one transferred address. For more information on Elastic IP address transfers, see [Transfer Elastic IP addresses](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#transfer-EIPs-intro) in the *Amazon Virtual Private Cloud User Guide*.
     */
    @JvmName("rocjjelincvsqaif")
    public suspend fun transferAddress(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.transferAddress = mapped
    }

    internal fun build(): EipArgs = EipArgs(
        domain = domain,
        instanceId = instanceId,
        networkBorderGroup = networkBorderGroup,
        publicIpv4Pool = publicIpv4Pool,
        tags = tags,
        transferAddress = transferAddress,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy