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

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

/**
 * IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.
 * @property host Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the "host" part of the URI as defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the
 * 	  IP in the Spec of the parent Ingress.
 * 2. The `:` delimiter is not respected because ports are not allowed.
 * 	  Currently the port of an Ingress is implicitly :80 for http and
 * 	  :443 for https.
 * Both these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.
 * @property http
 */
public data class IngressRuleArgs(
    public val host: Output? = null,
    public val http: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.extensions.v1beta1.inputs.IngressRuleArgs =
        com.pulumi.kubernetes.extensions.v1beta1.inputs.IngressRuleArgs.builder()
            .host(host?.applyValue({ args0 -> args0 }))
            .http(http?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [IngressRuleArgs].
 */
@PulumiTagMarker
public class IngressRuleArgsBuilder internal constructor() {
    private var host: Output? = null

    private var http: Output? = null

    /**
     * @param value Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the "host" part of the URI as defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the
     * 	  IP in the Spec of the parent Ingress.
     * 2. The `:` delimiter is not respected because ports are not allowed.
     * 	  Currently the port of an Ingress is implicitly :80 for http and
     * 	  :443 for https.
     * Both these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.
     */
    @JvmName("pesajnyxkumjbedj")
    public suspend fun host(`value`: Output) {
        this.host = value
    }

    /**
     * @param value
     */
    @JvmName("oufxybnlgfxenrna")
    public suspend fun http(`value`: Output) {
        this.http = value
    }

    /**
     * @param value Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the "host" part of the URI as defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the
     * 	  IP in the Spec of the parent Ingress.
     * 2. The `:` delimiter is not respected because ports are not allowed.
     * 	  Currently the port of an Ingress is implicitly :80 for http and
     * 	  :443 for https.
     * Both these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.
     */
    @JvmName("bpggwfutbvdsaxfu")
    public suspend fun host(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.host = mapped
    }

    /**
     * @param value
     */
    @JvmName("epmdayifvdamtjvq")
    public suspend fun http(`value`: HTTPIngressRuleValueArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.http = mapped
    }

    /**
     * @param argument
     */
    @JvmName("xuegwrcbmiyxwbvq")
    public suspend fun http(argument: suspend HTTPIngressRuleValueArgsBuilder.() -> Unit) {
        val toBeMapped = HTTPIngressRuleValueArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.http = mapped
    }

    internal fun build(): IngressRuleArgs = IngressRuleArgs(
        host = host,
        http = http,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy