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

com.pulumi.cloudflare.kotlin.inputs.TunnelConfigConfigArgs.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: 5.40.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.cloudflare.kotlin.inputs

import com.pulumi.cloudflare.inputs.TunnelConfigConfigArgs.builder
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.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property ingressRules Each incoming request received by cloudflared causes cloudflared to send a request to a local service. This section configures the rules that determine which requests are sent to which local services. Last rule must match all requests, e.g `service = "http_status:503"`. [Read more](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/local/local-management/ingress/).
 * @property originRequest
 * @property warpRouting If you're exposing a [private network](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/private-net/), you need to add the `warp-routing` key and set it to `true`.
 */
public data class TunnelConfigConfigArgs(
    public val ingressRules: Output>,
    public val originRequest: Output? = null,
    public val warpRouting: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.inputs.TunnelConfigConfigArgs =
        com.pulumi.cloudflare.inputs.TunnelConfigConfigArgs.builder()
            .ingressRules(
                ingressRules.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .originRequest(originRequest?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .warpRouting(warpRouting?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

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

    private var originRequest: Output? = null

    private var warpRouting: Output? = null

    /**
     * @param value Each incoming request received by cloudflared causes cloudflared to send a request to a local service. This section configures the rules that determine which requests are sent to which local services. Last rule must match all requests, e.g `service = "http_status:503"`. [Read more](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/local/local-management/ingress/).
     */
    @JvmName("lfxpbmuajfioyghk")
    public suspend fun ingressRules(`value`: Output>) {
        this.ingressRules = value
    }

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

    /**
     * @param values Each incoming request received by cloudflared causes cloudflared to send a request to a local service. This section configures the rules that determine which requests are sent to which local services. Last rule must match all requests, e.g `service = "http_status:503"`. [Read more](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/local/local-management/ingress/).
     */
    @JvmName("sbgkrykfdrkccfpo")
    public suspend fun ingressRules(values: List>) {
        this.ingressRules = Output.all(values)
    }

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

    /**
     * @param value If you're exposing a [private network](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/private-net/), you need to add the `warp-routing` key and set it to `true`.
     */
    @JvmName("ggfsohncabrnqdxa")
    public suspend fun warpRouting(`value`: Output) {
        this.warpRouting = value
    }

    /**
     * @param value Each incoming request received by cloudflared causes cloudflared to send a request to a local service. This section configures the rules that determine which requests are sent to which local services. Last rule must match all requests, e.g `service = "http_status:503"`. [Read more](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/local/local-management/ingress/).
     */
    @JvmName("apwnbycpblsrjlup")
    public suspend fun ingressRules(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ingressRules = mapped
    }

    /**
     * @param argument Each incoming request received by cloudflared causes cloudflared to send a request to a local service. This section configures the rules that determine which requests are sent to which local services. Last rule must match all requests, e.g `service = "http_status:503"`. [Read more](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/local/local-management/ingress/).
     */
    @JvmName("ahdqnrdnsusxdvbw")
    public suspend fun ingressRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TunnelConfigConfigIngressRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.ingressRules = mapped
    }

    /**
     * @param argument Each incoming request received by cloudflared causes cloudflared to send a request to a local service. This section configures the rules that determine which requests are sent to which local services. Last rule must match all requests, e.g `service = "http_status:503"`. [Read more](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/local/local-management/ingress/).
     */
    @JvmName("xkvvxcsleelvigwg")
    public suspend fun ingressRules(vararg argument: suspend TunnelConfigConfigIngressRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TunnelConfigConfigIngressRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.ingressRules = mapped
    }

    /**
     * @param argument Each incoming request received by cloudflared causes cloudflared to send a request to a local service. This section configures the rules that determine which requests are sent to which local services. Last rule must match all requests, e.g `service = "http_status:503"`. [Read more](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/local/local-management/ingress/).
     */
    @JvmName("cgomeqsrbmurnekn")
    public suspend fun ingressRules(argument: suspend TunnelConfigConfigIngressRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            TunnelConfigConfigIngressRuleArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.ingressRules = mapped
    }

    /**
     * @param values Each incoming request received by cloudflared causes cloudflared to send a request to a local service. This section configures the rules that determine which requests are sent to which local services. Last rule must match all requests, e.g `service = "http_status:503"`. [Read more](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/local/local-management/ingress/).
     */
    @JvmName("qrihxvpxeyxlenam")
    public suspend fun ingressRules(vararg values: TunnelConfigConfigIngressRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ingressRules = mapped
    }

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

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

    /**
     * @param value If you're exposing a [private network](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/private-net/), you need to add the `warp-routing` key and set it to `true`.
     */
    @JvmName("kfgtxmfiqyejqvmk")
    public suspend fun warpRouting(`value`: TunnelConfigConfigWarpRoutingArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.warpRouting = mapped
    }

    /**
     * @param argument If you're exposing a [private network](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/private-net/), you need to add the `warp-routing` key and set it to `true`.
     */
    @JvmName("tevsvsxqahycjjiq")
    public suspend fun warpRouting(argument: suspend TunnelConfigConfigWarpRoutingArgsBuilder.() -> Unit) {
        val toBeMapped = TunnelConfigConfigWarpRoutingArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.warpRouting = mapped
    }

    internal fun build(): TunnelConfigConfigArgs = TunnelConfigConfigArgs(
        ingressRules = ingressRules ?: throw PulumiNullFieldException("ingressRules"),
        originRequest = originRequest,
        warpRouting = warpRouting,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy