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

com.pulumi.kubernetes.extensions.v1beta1.kotlin.inputs.IngressSpecPatchArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.kubernetes.extensions.v1beta1.kotlin.inputs

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 com.pulumi.kubernetes.extensions.v1beta1.inputs.IngressSpecPatchArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * IngressSpec describes the Ingress the user wishes to exist.
 * @property backend A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.
 * @property ingressClassName IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.
 * @property rules A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.
 * @property tls TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.
 */
public data class IngressSpecPatchArgs(
    public val backend: Output? = null,
    public val ingressClassName: Output? = null,
    public val rules: Output>? = null,
    public val tls: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.extensions.v1beta1.inputs.IngressSpecPatchArgs =
        com.pulumi.kubernetes.extensions.v1beta1.inputs.IngressSpecPatchArgs.builder()
            .backend(backend?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .ingressClassName(ingressClassName?.applyValue({ args0 -> args0 }))
            .rules(rules?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .tls(
                tls?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [IngressSpecPatchArgs].
 */
@PulumiTagMarker
public class IngressSpecPatchArgsBuilder internal constructor() {
    private var backend: Output? = null

    private var ingressClassName: Output? = null

    private var rules: Output>? = null

    private var tls: Output>? = null

    /**
     * @param value A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.
     */
    @JvmName("wpuimjxvismnnjqx")
    public suspend fun backend(`value`: Output) {
        this.backend = value
    }

    /**
     * @param value IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.
     */
    @JvmName("xvtjgksdqtoqcteg")
    public suspend fun ingressClassName(`value`: Output) {
        this.ingressClassName = value
    }

    /**
     * @param value A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.
     */
    @JvmName("upccxddagawrehaf")
    public suspend fun rules(`value`: Output>) {
        this.rules = value
    }

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

    /**
     * @param values A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.
     */
    @JvmName("pycebaoqmsrhcxjh")
    public suspend fun rules(values: List>) {
        this.rules = Output.all(values)
    }

    /**
     * @param value TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.
     */
    @JvmName("vmmcrpephqckweid")
    public suspend fun tls(`value`: Output>) {
        this.tls = value
    }

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

    /**
     * @param values TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.
     */
    @JvmName("nouinugltptldlqm")
    public suspend fun tls(values: List>) {
        this.tls = Output.all(values)
    }

    /**
     * @param value A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.
     */
    @JvmName("noweusdyvlsedqcy")
    public suspend fun backend(`value`: IngressBackendPatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.backend = mapped
    }

    /**
     * @param argument A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.
     */
    @JvmName("mvgugthudwtolaex")
    public suspend fun backend(argument: suspend IngressBackendPatchArgsBuilder.() -> Unit) {
        val toBeMapped = IngressBackendPatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.backend = mapped
    }

    /**
     * @param value IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.
     */
    @JvmName("rnedwaoxouaydyxn")
    public suspend fun ingressClassName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ingressClassName = mapped
    }

    /**
     * @param value A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.
     */
    @JvmName("wphkebmcjhabtfwa")
    public suspend fun rules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    /**
     * @param argument A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.
     */
    @JvmName("rrggnpldmtlqhgnb")
    public suspend fun rules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            IngressRulePatchArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.
     */
    @JvmName("ghdcxwtvidubxknh")
    public suspend fun rules(vararg argument: suspend IngressRulePatchArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            IngressRulePatchArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.
     */
    @JvmName("fheffjobkyeaggvm")
    public suspend fun rules(argument: suspend IngressRulePatchArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(IngressRulePatchArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param values A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.
     */
    @JvmName("wdpkxkatnvvjovry")
    public suspend fun rules(vararg values: IngressRulePatchArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    /**
     * @param value TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.
     */
    @JvmName("qnxvnfsqtpedceej")
    public suspend fun tls(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tls = mapped
    }

    /**
     * @param argument TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.
     */
    @JvmName("krfkkwascpeshqwt")
    public suspend fun tls(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            IngressTLSPatchArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.tls = mapped
    }

    /**
     * @param argument TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.
     */
    @JvmName("ayrmbwuimkdptcuy")
    public suspend fun tls(vararg argument: suspend IngressTLSPatchArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            IngressTLSPatchArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.tls = mapped
    }

    /**
     * @param argument TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.
     */
    @JvmName("smlnoqehgqafohno")
    public suspend fun tls(argument: suspend IngressTLSPatchArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(IngressTLSPatchArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tls = mapped
    }

    /**
     * @param values TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.
     */
    @JvmName("ffavkyiqsysedabq")
    public suspend fun tls(vararg values: IngressTLSPatchArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tls = mapped
    }

    internal fun build(): IngressSpecPatchArgs = IngressSpecPatchArgs(
        backend = backend,
        ingressClassName = ingressClassName,
        rules = rules,
        tls = tls,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy