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

com.pulumi.azurenative.app.kotlin.inputs.IngressArgs.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.app.kotlin.inputs

import com.pulumi.azurenative.app.inputs.IngressArgs.builder
import com.pulumi.azurenative.app.kotlin.enums.IngressClientCertificateMode
import com.pulumi.azurenative.app.kotlin.enums.IngressTransportMethod
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.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Container App Ingress configuration.
 * @property allowInsecure Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections
 * @property clientCertificateMode Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. Accept indicates server forwards client certificate but does not require a client certificate. Require indicates server requires a client certificate.
 * @property corsPolicy CORS policy for container app
 * @property customDomains custom domain bindings for Container Apps' hostnames.
 * @property exposedPort Exposed Port in containers for TCP traffic from ingress
 * @property external Bool indicating if app exposes an external http endpoint
 * @property ipSecurityRestrictions Rules to restrict incoming IP address.
 * @property targetPort Target Port in containers for traffic from ingress
 * @property traffic Traffic weights for app's revisions
 * @property transport Ingress transport protocol
 */
public data class IngressArgs(
    public val allowInsecure: Output? = null,
    public val clientCertificateMode: Output>? = null,
    public val corsPolicy: Output? = null,
    public val customDomains: Output>? = null,
    public val exposedPort: Output? = null,
    public val `external`: Output? = null,
    public val ipSecurityRestrictions: Output>? = null,
    public val targetPort: Output? = null,
    public val traffic: Output>? = null,
    public val transport: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.app.inputs.IngressArgs =
        com.pulumi.azurenative.app.inputs.IngressArgs.builder()
            .allowInsecure(allowInsecure?.applyValue({ args0 -> args0 }))
            .clientCertificateMode(
                clientCertificateMode?.applyValue({ args0 ->
                    args0.transform({ args0 ->
                        args0
                    }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            )
            .corsPolicy(corsPolicy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .customDomains(
                customDomains?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .exposedPort(exposedPort?.applyValue({ args0 -> args0 }))
            .`external`(`external`?.applyValue({ args0 -> args0 }))
            .ipSecurityRestrictions(
                ipSecurityRestrictions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .targetPort(targetPort?.applyValue({ args0 -> args0 }))
            .traffic(
                traffic?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .transport(
                transport?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            ).build()
}

/**
 * Builder for [IngressArgs].
 */
@PulumiTagMarker
public class IngressArgsBuilder internal constructor() {
    private var allowInsecure: Output? = null

    private var clientCertificateMode: Output>? = null

    private var corsPolicy: Output? = null

    private var customDomains: Output>? = null

    private var exposedPort: Output? = null

    private var `external`: Output? = null

    private var ipSecurityRestrictions: Output>? = null

    private var targetPort: Output? = null

    private var traffic: Output>? = null

    private var transport: Output>? = null

    /**
     * @param value Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections
     */
    @JvmName("hlpbkklemhexargd")
    public suspend fun allowInsecure(`value`: Output) {
        this.allowInsecure = value
    }

    /**
     * @param value Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. Accept indicates server forwards client certificate but does not require a client certificate. Require indicates server requires a client certificate.
     */
    @JvmName("widpbiwiyjovlqak")
    public suspend fun clientCertificateMode(`value`: Output>) {
        this.clientCertificateMode = value
    }

    /**
     * @param value CORS policy for container app
     */
    @JvmName("xctityctgespaqcv")
    public suspend fun corsPolicy(`value`: Output) {
        this.corsPolicy = value
    }

    /**
     * @param value custom domain bindings for Container Apps' hostnames.
     */
    @JvmName("vpcwqfgtgbuiswtx")
    public suspend fun customDomains(`value`: Output>) {
        this.customDomains = value
    }

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

    /**
     * @param values custom domain bindings for Container Apps' hostnames.
     */
    @JvmName("pjxitrfyxqkpexal")
    public suspend fun customDomains(values: List>) {
        this.customDomains = Output.all(values)
    }

    /**
     * @param value Exposed Port in containers for TCP traffic from ingress
     */
    @JvmName("vtgpfbeknwihtghc")
    public suspend fun exposedPort(`value`: Output) {
        this.exposedPort = value
    }

    /**
     * @param value Bool indicating if app exposes an external http endpoint
     */
    @JvmName("rtynwtcnnxlayndd")
    public suspend fun `external`(`value`: Output) {
        this.`external` = value
    }

    /**
     * @param value Rules to restrict incoming IP address.
     */
    @JvmName("rmgdiadimwfsraxp")
    public suspend fun ipSecurityRestrictions(`value`: Output>) {
        this.ipSecurityRestrictions = value
    }

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

    /**
     * @param values Rules to restrict incoming IP address.
     */
    @JvmName("jotbomtjecghoukh")
    public suspend fun ipSecurityRestrictions(values: List>) {
        this.ipSecurityRestrictions = Output.all(values)
    }

    /**
     * @param value Target Port in containers for traffic from ingress
     */
    @JvmName("bexsoipatprwowub")
    public suspend fun targetPort(`value`: Output) {
        this.targetPort = value
    }

    /**
     * @param value Traffic weights for app's revisions
     */
    @JvmName("dukcvdfatejmqbcu")
    public suspend fun traffic(`value`: Output>) {
        this.traffic = value
    }

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

    /**
     * @param values Traffic weights for app's revisions
     */
    @JvmName("pmclbddokcalepmh")
    public suspend fun traffic(values: List>) {
        this.traffic = Output.all(values)
    }

    /**
     * @param value Ingress transport protocol
     */
    @JvmName("tancfjbmovgkjhla")
    public suspend fun transport(`value`: Output>) {
        this.transport = value
    }

    /**
     * @param value Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections
     */
    @JvmName("ilymcybqejphyowv")
    public suspend fun allowInsecure(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowInsecure = mapped
    }

    /**
     * @param value Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. Accept indicates server forwards client certificate but does not require a client certificate. Require indicates server requires a client certificate.
     */
    @JvmName("xlanymwalcrcriyn")
    public suspend fun clientCertificateMode(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientCertificateMode = mapped
    }

    /**
     * @param value Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. Accept indicates server forwards client certificate but does not require a client certificate. Require indicates server requires a client certificate.
     */
    @JvmName("hdsxhtuayksymxfh")
    public fun clientCertificateMode(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.clientCertificateMode = mapped
    }

    /**
     * @param value Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. Accept indicates server forwards client certificate but does not require a client certificate. Require indicates server requires a client certificate.
     */
    @JvmName("sqeoifwaixlhpfpq")
    public fun clientCertificateMode(`value`: IngressClientCertificateMode) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.clientCertificateMode = mapped
    }

    /**
     * @param value CORS policy for container app
     */
    @JvmName("oqntgnupblkhajok")
    public suspend fun corsPolicy(`value`: CorsPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.corsPolicy = mapped
    }

    /**
     * @param argument CORS policy for container app
     */
    @JvmName("mscyjlwkivyfoawq")
    public suspend fun corsPolicy(argument: suspend CorsPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = CorsPolicyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.corsPolicy = mapped
    }

    /**
     * @param value custom domain bindings for Container Apps' hostnames.
     */
    @JvmName("seprkvcbmdbnirkn")
    public suspend fun customDomains(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customDomains = mapped
    }

    /**
     * @param argument custom domain bindings for Container Apps' hostnames.
     */
    @JvmName("wjjfuifiqdbgsqjl")
    public suspend fun customDomains(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CustomDomainArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.customDomains = mapped
    }

    /**
     * @param argument custom domain bindings for Container Apps' hostnames.
     */
    @JvmName("uhdmomxhkmebqvqh")
    public suspend fun customDomains(vararg argument: suspend CustomDomainArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CustomDomainArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.customDomains = mapped
    }

    /**
     * @param argument custom domain bindings for Container Apps' hostnames.
     */
    @JvmName("luuowttxbakniker")
    public suspend fun customDomains(argument: suspend CustomDomainArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(CustomDomainArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.customDomains = mapped
    }

    /**
     * @param values custom domain bindings for Container Apps' hostnames.
     */
    @JvmName("kgrtsihqhxaivlgn")
    public suspend fun customDomains(vararg values: CustomDomainArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.customDomains = mapped
    }

    /**
     * @param value Exposed Port in containers for TCP traffic from ingress
     */
    @JvmName("gloevgicbqduyxew")
    public suspend fun exposedPort(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.exposedPort = mapped
    }

    /**
     * @param value Bool indicating if app exposes an external http endpoint
     */
    @JvmName("toermondafjcrsge")
    public suspend fun `external`(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.`external` = mapped
    }

    /**
     * @param value Rules to restrict incoming IP address.
     */
    @JvmName("oeylouumegcfwjbw")
    public suspend fun ipSecurityRestrictions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipSecurityRestrictions = mapped
    }

    /**
     * @param argument Rules to restrict incoming IP address.
     */
    @JvmName("vyyarvmbangnvddn")
    public suspend fun ipSecurityRestrictions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            IpSecurityRestrictionRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.ipSecurityRestrictions = mapped
    }

    /**
     * @param argument Rules to restrict incoming IP address.
     */
    @JvmName("oesvnvvkhkrsmoej")
    public suspend fun ipSecurityRestrictions(vararg argument: suspend IpSecurityRestrictionRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            IpSecurityRestrictionRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.ipSecurityRestrictions = mapped
    }

    /**
     * @param argument Rules to restrict incoming IP address.
     */
    @JvmName("slpavtenbsbicmkg")
    public suspend fun ipSecurityRestrictions(argument: suspend IpSecurityRestrictionRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            IpSecurityRestrictionRuleArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.ipSecurityRestrictions = mapped
    }

    /**
     * @param values Rules to restrict incoming IP address.
     */
    @JvmName("ldpvwpyaryakncpj")
    public suspend fun ipSecurityRestrictions(vararg values: IpSecurityRestrictionRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipSecurityRestrictions = mapped
    }

    /**
     * @param value Target Port in containers for traffic from ingress
     */
    @JvmName("hnjqxeuxomubektt")
    public suspend fun targetPort(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetPort = mapped
    }

    /**
     * @param value Traffic weights for app's revisions
     */
    @JvmName("ftmhmpurnqwnwekx")
    public suspend fun traffic(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.traffic = mapped
    }

    /**
     * @param argument Traffic weights for app's revisions
     */
    @JvmName("jyjkxjaqvryvccpv")
    public suspend fun traffic(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TrafficWeightArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.traffic = mapped
    }

    /**
     * @param argument Traffic weights for app's revisions
     */
    @JvmName("uhxrjkoidcerysnp")
    public suspend fun traffic(vararg argument: suspend TrafficWeightArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TrafficWeightArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.traffic = mapped
    }

    /**
     * @param argument Traffic weights for app's revisions
     */
    @JvmName("cshwtqiruoagtdqh")
    public suspend fun traffic(argument: suspend TrafficWeightArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TrafficWeightArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.traffic = mapped
    }

    /**
     * @param values Traffic weights for app's revisions
     */
    @JvmName("gfdhjfewupsfunci")
    public suspend fun traffic(vararg values: TrafficWeightArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.traffic = mapped
    }

    /**
     * @param value Ingress transport protocol
     */
    @JvmName("qaeddrhenvvxjfcy")
    public suspend fun transport(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.transport = mapped
    }

    /**
     * @param value Ingress transport protocol
     */
    @JvmName("kmsxfgnlpjtfrecm")
    public fun transport(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.transport = mapped
    }

    /**
     * @param value Ingress transport protocol
     */
    @JvmName("ixywvqmplrinobip")
    public fun transport(`value`: IngressTransportMethod) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.transport = mapped
    }

    internal fun build(): IngressArgs = IngressArgs(
        allowInsecure = allowInsecure,
        clientCertificateMode = clientCertificateMode,
        corsPolicy = corsPolicy,
        customDomains = customDomains,
        exposedPort = exposedPort,
        `external` = `external`,
        ipSecurityRestrictions = ipSecurityRestrictions,
        targetPort = targetPort,
        traffic = traffic,
        transport = transport,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy