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

com.pulumi.azurenative.containerinstance.kotlin.inputs.IpAddressArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.containerinstance.kotlin.inputs

import com.pulumi.azurenative.containerinstance.inputs.IpAddressArgs.builder
import com.pulumi.azurenative.containerinstance.kotlin.enums.ContainerGroupIpAddressType
import com.pulumi.azurenative.containerinstance.kotlin.enums.DnsNameLabelReusePolicy
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
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

/**
 * IP address for the container group.
 * @property autoGeneratedDomainNameLabelScope The value representing the security enum. The 'Unsecure' value is the default value if not selected and means the object's domain name label is not secured against subdomain takeover. The 'TenantReuse' value is the default value if selected and means the object's domain name label can be reused within the same tenant. The 'SubscriptionReuse' value means the object's domain name label can be reused within the same subscription. The 'ResourceGroupReuse' value means the object's domain name label can be reused within the same resource group. The 'NoReuse' value means the object's domain name label cannot be reused within the same resource group, subscription, or tenant.
 * @property dnsNameLabel The Dns name label for the IP.
 * @property ip The IP exposed to the public internet.
 * @property ports The list of ports exposed on the container group.
 * @property type Specifies if the IP is exposed to the public internet or private VNET.
 */
public data class IpAddressArgs(
    public val autoGeneratedDomainNameLabelScope: Output>? =
        null,
    public val dnsNameLabel: Output? = null,
    public val ip: Output? = null,
    public val ports: Output>,
    public val type: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.containerinstance.inputs.IpAddressArgs =
        com.pulumi.azurenative.containerinstance.inputs.IpAddressArgs.builder()
            .autoGeneratedDomainNameLabelScope(
                autoGeneratedDomainNameLabelScope?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            )
            .dnsNameLabel(dnsNameLabel?.applyValue({ args0 -> args0 }))
            .ip(ip?.applyValue({ args0 -> args0 }))
            .ports(ports.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .type(
                type.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [IpAddressArgs].
 */
@PulumiTagMarker
public class IpAddressArgsBuilder internal constructor() {
    private var autoGeneratedDomainNameLabelScope: Output>? =
        null

    private var dnsNameLabel: Output? = null

    private var ip: Output? = null

    private var ports: Output>? = null

    private var type: Output>? = null

    /**
     * @param value The value representing the security enum. The 'Unsecure' value is the default value if not selected and means the object's domain name label is not secured against subdomain takeover. The 'TenantReuse' value is the default value if selected and means the object's domain name label can be reused within the same tenant. The 'SubscriptionReuse' value means the object's domain name label can be reused within the same subscription. The 'ResourceGroupReuse' value means the object's domain name label can be reused within the same resource group. The 'NoReuse' value means the object's domain name label cannot be reused within the same resource group, subscription, or tenant.
     */
    @JvmName("mrmetonjjersfhga")
    public suspend fun autoGeneratedDomainNameLabelScope(`value`: Output>) {
        this.autoGeneratedDomainNameLabelScope = value
    }

    /**
     * @param value The Dns name label for the IP.
     */
    @JvmName("puccsdbjpmjfefcv")
    public suspend fun dnsNameLabel(`value`: Output) {
        this.dnsNameLabel = value
    }

    /**
     * @param value The IP exposed to the public internet.
     */
    @JvmName("jppqdsgumamfccnm")
    public suspend fun ip(`value`: Output) {
        this.ip = value
    }

    /**
     * @param value The list of ports exposed on the container group.
     */
    @JvmName("aolldbmxpgxucxee")
    public suspend fun ports(`value`: Output>) {
        this.ports = value
    }

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

    /**
     * @param values The list of ports exposed on the container group.
     */
    @JvmName("wbftvwwrmtttjafg")
    public suspend fun ports(values: List>) {
        this.ports = Output.all(values)
    }

    /**
     * @param value Specifies if the IP is exposed to the public internet or private VNET.
     */
    @JvmName("nlfeqxbwrqmmpqln")
    public suspend fun type(`value`: Output>) {
        this.type = value
    }

    /**
     * @param value The value representing the security enum. The 'Unsecure' value is the default value if not selected and means the object's domain name label is not secured against subdomain takeover. The 'TenantReuse' value is the default value if selected and means the object's domain name label can be reused within the same tenant. The 'SubscriptionReuse' value means the object's domain name label can be reused within the same subscription. The 'ResourceGroupReuse' value means the object's domain name label can be reused within the same resource group. The 'NoReuse' value means the object's domain name label cannot be reused within the same resource group, subscription, or tenant.
     */
    @JvmName("wpuwjjttrxrduwog")
    public suspend fun autoGeneratedDomainNameLabelScope(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoGeneratedDomainNameLabelScope = mapped
    }

    /**
     * @param value The value representing the security enum. The 'Unsecure' value is the default value if not selected and means the object's domain name label is not secured against subdomain takeover. The 'TenantReuse' value is the default value if selected and means the object's domain name label can be reused within the same tenant. The 'SubscriptionReuse' value means the object's domain name label can be reused within the same subscription. The 'ResourceGroupReuse' value means the object's domain name label can be reused within the same resource group. The 'NoReuse' value means the object's domain name label cannot be reused within the same resource group, subscription, or tenant.
     */
    @JvmName("awymjqhtoghxfund")
    public fun autoGeneratedDomainNameLabelScope(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.autoGeneratedDomainNameLabelScope = mapped
    }

    /**
     * @param value The value representing the security enum. The 'Unsecure' value is the default value if not selected and means the object's domain name label is not secured against subdomain takeover. The 'TenantReuse' value is the default value if selected and means the object's domain name label can be reused within the same tenant. The 'SubscriptionReuse' value means the object's domain name label can be reused within the same subscription. The 'ResourceGroupReuse' value means the object's domain name label can be reused within the same resource group. The 'NoReuse' value means the object's domain name label cannot be reused within the same resource group, subscription, or tenant.
     */
    @JvmName("ugflvbcwpbjtgnrc")
    public fun autoGeneratedDomainNameLabelScope(`value`: DnsNameLabelReusePolicy) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.autoGeneratedDomainNameLabelScope = mapped
    }

    /**
     * @param value The Dns name label for the IP.
     */
    @JvmName("uguacdfiltaibenf")
    public suspend fun dnsNameLabel(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dnsNameLabel = mapped
    }

    /**
     * @param value The IP exposed to the public internet.
     */
    @JvmName("jlmkltslnsogdxlo")
    public suspend fun ip(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ip = mapped
    }

    /**
     * @param value The list of ports exposed on the container group.
     */
    @JvmName("pgpuryhvvpdmaqqs")
    public suspend fun ports(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ports = mapped
    }

    /**
     * @param argument The list of ports exposed on the container group.
     */
    @JvmName("svlkertrjtnixnju")
    public suspend fun ports(argument: List Unit>) {
        val toBeMapped = argument.toList().map { PortArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.ports = mapped
    }

    /**
     * @param argument The list of ports exposed on the container group.
     */
    @JvmName("smgfjvsmietvygjr")
    public suspend fun ports(vararg argument: suspend PortArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { PortArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.ports = mapped
    }

    /**
     * @param argument The list of ports exposed on the container group.
     */
    @JvmName("gcxaqeoncifpkdfl")
    public suspend fun ports(argument: suspend PortArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(PortArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.ports = mapped
    }

    /**
     * @param values The list of ports exposed on the container group.
     */
    @JvmName("ljsymkthdspesogh")
    public suspend fun ports(vararg values: PortArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ports = mapped
    }

    /**
     * @param value Specifies if the IP is exposed to the public internet or private VNET.
     */
    @JvmName("vpevbnsxagviwjkq")
    public suspend fun type(`value`: Either) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value Specifies if the IP is exposed to the public internet or private VNET.
     */
    @JvmName("uttrogrfkglgveac")
    public fun type(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value Specifies if the IP is exposed to the public internet or private VNET.
     */
    @JvmName("gqqnvkwfwieetbbj")
    public fun type(`value`: ContainerGroupIpAddressType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): IpAddressArgs = IpAddressArgs(
        autoGeneratedDomainNameLabelScope = autoGeneratedDomainNameLabelScope,
        dnsNameLabel = dnsNameLabel,
        ip = ip,
        ports = ports ?: throw PulumiNullFieldException("ports"),
        type = type ?: throw PulumiNullFieldException("type"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy