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

com.pulumi.cloudflare.kotlin.inputs.ZeroTrustTunnelCloudflaredConfigConfigArgs.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.ZeroTrustTunnelCloudflaredConfigConfigArgs.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 ZeroTrustTunnelCloudflaredConfigConfigArgs(
    public val ingressRules: Output>,
    public val originRequest: Output? = null,
    public val warpRouting: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.inputs.ZeroTrustTunnelCloudflaredConfigConfigArgs =
        com.pulumi.cloudflare.inputs.ZeroTrustTunnelCloudflaredConfigConfigArgs.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 [ZeroTrustTunnelCloudflaredConfigConfigArgs].
 */
@PulumiTagMarker
public class ZeroTrustTunnelCloudflaredConfigConfigArgsBuilder 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("mbddigovkravmtux")
    public suspend fun ingressRules(`value`: Output>) {
        this.ingressRules = value
    }

    @JvmName("xsrmesoujysnpaqj")
    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("nufvksttarrtjirl")
    public suspend fun ingressRules(values: List>) {
        this.ingressRules = Output.all(values)
    }

    /**
     * @param value
     */
    @JvmName("uatfggcfyjteaqxi")
    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("ofsapfqcxxiyrtvs")
    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("iaybmdneaorspxuo")
    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("brjatppxhdvihbhd")
    public suspend fun ingressRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ZeroTrustTunnelCloudflaredConfigConfigIngressRuleArgsBuilder().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("wmfgqjslqmpnncvk")
    public suspend fun ingressRules(vararg argument: suspend ZeroTrustTunnelCloudflaredConfigConfigIngressRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ZeroTrustTunnelCloudflaredConfigConfigIngressRuleArgsBuilder().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("xcweogskxfyphkmn")
    public suspend fun ingressRules(argument: suspend ZeroTrustTunnelCloudflaredConfigConfigIngressRuleArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                ZeroTrustTunnelCloudflaredConfigConfigIngressRuleArgsBuilder().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("pccvfbqmjcnumxqr")
    public suspend fun ingressRules(vararg values: ZeroTrustTunnelCloudflaredConfigConfigIngressRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ingressRules = mapped
    }

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

    /**
     * @param argument
     */
    @JvmName("omvrfvajrylokbyi")
    public suspend fun originRequest(argument: suspend ZeroTrustTunnelCloudflaredConfigConfigOriginRequestArgsBuilder.() -> Unit) {
        val toBeMapped = ZeroTrustTunnelCloudflaredConfigConfigOriginRequestArgsBuilder().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("knwlckvfjdjpuave")
    public suspend fun warpRouting(`value`: ZeroTrustTunnelCloudflaredConfigConfigWarpRoutingArgs?) {
        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("tgetlfpakoyiuhxd")
    public suspend fun warpRouting(argument: suspend ZeroTrustTunnelCloudflaredConfigConfigWarpRoutingArgsBuilder.() -> Unit) {
        val toBeMapped = ZeroTrustTunnelCloudflaredConfigConfigWarpRoutingArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.warpRouting = mapped
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy