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

com.pulumi.cloudflare.kotlin.inputs.TunnelConfigConfigOriginRequestArgs.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.cloudflare.kotlin.inputs

import com.pulumi.cloudflare.inputs.TunnelConfigConfigOriginRequestArgs.builder
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

/**
 *
 * @property access Access rules for the ingress service.
 * @property bastionMode Runs as jump host.
 * @property caPool Path to the certificate authority (CA) for the certificate of your origin. This option should be used only if your certificate is not signed by Cloudflare. Defaults to `""`.
 * @property connectTimeout Timeout for establishing a new TCP connection to your origin server. This excludes the time taken to establish TLS, which is controlled by `tlsTimeout`. Defaults to `30s`.
 * @property disableChunkedEncoding Disables chunked transfer encoding. Useful if you are running a Web Server Gateway Interface (WSGI) server. Defaults to `false`.
 * @property http2Origin Enables HTTP/2 support for the origin connection. Defaults to `false`.
 * @property httpHostHeader Sets the HTTP Host header on requests sent to the local service. Defaults to `""`.
 * @property ipRules IP rules for the proxy service.
 * @property keepAliveConnections Maximum number of idle keepalive connections between Tunnel and your origin. This does not restrict the total number of concurrent connections. Defaults to `100`.
 * @property keepAliveTimeout Timeout after which an idle keepalive connection can be discarded. Defaults to `1m30s`.
 * @property noHappyEyeballs Disable the “happy eyeballs” algorithm for IPv4/IPv6 fallback if your local network has misconfigured one of the protocols. Defaults to `false`.
 * @property noTlsVerify Disables TLS verification of the certificate presented by your origin. Will allow any certificate from the origin to be accepted. Defaults to `false`.
 * @property originServerName Hostname that cloudflared should expect from your origin server certificate. Defaults to `""`.
 * @property proxyAddress cloudflared starts a proxy server to translate HTTP traffic into TCP when proxying, for example, SSH or RDP. This configures the listen address for that proxy. Defaults to `127.0.0.1`.
 * @property proxyPort cloudflared starts a proxy server to translate HTTP traffic into TCP when proxying, for example, SSH or RDP. This configures the listen port for that proxy. If set to zero, an unused port will randomly be chosen. Defaults to `0`.
 * @property proxyType cloudflared starts a proxy server to translate HTTP traffic into TCP when proxying, for example, SSH or RDP. This configures what type of proxy will be started. Available values: `""`, `socks`. Defaults to `""`.
 * @property tcpKeepAlive The timeout after which a TCP keepalive packet is sent on a connection between Tunnel and the origin server. Defaults to `30s`.
 * @property tlsTimeout Timeout for completing a TLS handshake to your origin server, if you have chosen to connect Tunnel to an HTTPS server. Defaults to `10s`.
 */
public data class TunnelConfigConfigOriginRequestArgs(
    public val access: Output? = null,
    public val bastionMode: Output? = null,
    public val caPool: Output? = null,
    public val connectTimeout: Output? = null,
    public val disableChunkedEncoding: Output? = null,
    public val http2Origin: Output? = null,
    public val httpHostHeader: Output? = null,
    public val ipRules: Output>? = null,
    public val keepAliveConnections: Output? = null,
    public val keepAliveTimeout: Output? = null,
    public val noHappyEyeballs: Output? = null,
    public val noTlsVerify: Output? = null,
    public val originServerName: Output? = null,
    public val proxyAddress: Output? = null,
    public val proxyPort: Output? = null,
    public val proxyType: Output? = null,
    public val tcpKeepAlive: Output? = null,
    public val tlsTimeout: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.inputs.TunnelConfigConfigOriginRequestArgs =
        com.pulumi.cloudflare.inputs.TunnelConfigConfigOriginRequestArgs.builder()
            .access(access?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .bastionMode(bastionMode?.applyValue({ args0 -> args0 }))
            .caPool(caPool?.applyValue({ args0 -> args0 }))
            .connectTimeout(connectTimeout?.applyValue({ args0 -> args0 }))
            .disableChunkedEncoding(disableChunkedEncoding?.applyValue({ args0 -> args0 }))
            .http2Origin(http2Origin?.applyValue({ args0 -> args0 }))
            .httpHostHeader(httpHostHeader?.applyValue({ args0 -> args0 }))
            .ipRules(
                ipRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .keepAliveConnections(keepAliveConnections?.applyValue({ args0 -> args0 }))
            .keepAliveTimeout(keepAliveTimeout?.applyValue({ args0 -> args0 }))
            .noHappyEyeballs(noHappyEyeballs?.applyValue({ args0 -> args0 }))
            .noTlsVerify(noTlsVerify?.applyValue({ args0 -> args0 }))
            .originServerName(originServerName?.applyValue({ args0 -> args0 }))
            .proxyAddress(proxyAddress?.applyValue({ args0 -> args0 }))
            .proxyPort(proxyPort?.applyValue({ args0 -> args0 }))
            .proxyType(proxyType?.applyValue({ args0 -> args0 }))
            .tcpKeepAlive(tcpKeepAlive?.applyValue({ args0 -> args0 }))
            .tlsTimeout(tlsTimeout?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [TunnelConfigConfigOriginRequestArgs].
 */
@PulumiTagMarker
public class TunnelConfigConfigOriginRequestArgsBuilder internal constructor() {
    private var access: Output? = null

    private var bastionMode: Output? = null

    private var caPool: Output? = null

    private var connectTimeout: Output? = null

    private var disableChunkedEncoding: Output? = null

    private var http2Origin: Output? = null

    private var httpHostHeader: Output? = null

    private var ipRules: Output>? = null

    private var keepAliveConnections: Output? = null

    private var keepAliveTimeout: Output? = null

    private var noHappyEyeballs: Output? = null

    private var noTlsVerify: Output? = null

    private var originServerName: Output? = null

    private var proxyAddress: Output? = null

    private var proxyPort: Output? = null

    private var proxyType: Output? = null

    private var tcpKeepAlive: Output? = null

    private var tlsTimeout: Output? = null

    /**
     * @param value Access rules for the ingress service.
     */
    @JvmName("wxgdmmsjebtpwknc")
    public suspend fun access(`value`: Output) {
        this.access = value
    }

    /**
     * @param value Runs as jump host.
     */
    @JvmName("hbshcduypglwchdq")
    public suspend fun bastionMode(`value`: Output) {
        this.bastionMode = value
    }

    /**
     * @param value Path to the certificate authority (CA) for the certificate of your origin. This option should be used only if your certificate is not signed by Cloudflare. Defaults to `""`.
     */
    @JvmName("jemepftlqaeahvwt")
    public suspend fun caPool(`value`: Output) {
        this.caPool = value
    }

    /**
     * @param value Timeout for establishing a new TCP connection to your origin server. This excludes the time taken to establish TLS, which is controlled by `tlsTimeout`. Defaults to `30s`.
     */
    @JvmName("hjdlehwypmdldnpo")
    public suspend fun connectTimeout(`value`: Output) {
        this.connectTimeout = value
    }

    /**
     * @param value Disables chunked transfer encoding. Useful if you are running a Web Server Gateway Interface (WSGI) server. Defaults to `false`.
     */
    @JvmName("cjrgvgpdyxwkuncs")
    public suspend fun disableChunkedEncoding(`value`: Output) {
        this.disableChunkedEncoding = value
    }

    /**
     * @param value Enables HTTP/2 support for the origin connection. Defaults to `false`.
     */
    @JvmName("mxcrnxvskvxyxlgj")
    public suspend fun http2Origin(`value`: Output) {
        this.http2Origin = value
    }

    /**
     * @param value Sets the HTTP Host header on requests sent to the local service. Defaults to `""`.
     */
    @JvmName("hykvnucsoiknlmea")
    public suspend fun httpHostHeader(`value`: Output) {
        this.httpHostHeader = value
    }

    /**
     * @param value IP rules for the proxy service.
     */
    @JvmName("rjcmbrjefmhkwvwn")
    public suspend fun ipRules(`value`: Output>) {
        this.ipRules = value
    }

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

    /**
     * @param values IP rules for the proxy service.
     */
    @JvmName("kkmrhrmmxyjvocmo")
    public suspend fun ipRules(values: List>) {
        this.ipRules = Output.all(values)
    }

    /**
     * @param value Maximum number of idle keepalive connections between Tunnel and your origin. This does not restrict the total number of concurrent connections. Defaults to `100`.
     */
    @JvmName("xolxggonebismbms")
    public suspend fun keepAliveConnections(`value`: Output) {
        this.keepAliveConnections = value
    }

    /**
     * @param value Timeout after which an idle keepalive connection can be discarded. Defaults to `1m30s`.
     */
    @JvmName("dwlidnnympbsuabb")
    public suspend fun keepAliveTimeout(`value`: Output) {
        this.keepAliveTimeout = value
    }

    /**
     * @param value Disable the “happy eyeballs” algorithm for IPv4/IPv6 fallback if your local network has misconfigured one of the protocols. Defaults to `false`.
     */
    @JvmName("vumhqgtnpoiymueg")
    public suspend fun noHappyEyeballs(`value`: Output) {
        this.noHappyEyeballs = value
    }

    /**
     * @param value Disables TLS verification of the certificate presented by your origin. Will allow any certificate from the origin to be accepted. Defaults to `false`.
     */
    @JvmName("lktiafdyiyckbodf")
    public suspend fun noTlsVerify(`value`: Output) {
        this.noTlsVerify = value
    }

    /**
     * @param value Hostname that cloudflared should expect from your origin server certificate. Defaults to `""`.
     */
    @JvmName("uxxypkhvqnneawvq")
    public suspend fun originServerName(`value`: Output) {
        this.originServerName = value
    }

    /**
     * @param value cloudflared starts a proxy server to translate HTTP traffic into TCP when proxying, for example, SSH or RDP. This configures the listen address for that proxy. Defaults to `127.0.0.1`.
     */
    @JvmName("hwenuaiplnhxtpdt")
    public suspend fun proxyAddress(`value`: Output) {
        this.proxyAddress = value
    }

    /**
     * @param value cloudflared starts a proxy server to translate HTTP traffic into TCP when proxying, for example, SSH or RDP. This configures the listen port for that proxy. If set to zero, an unused port will randomly be chosen. Defaults to `0`.
     */
    @JvmName("dyqimqivswtclapt")
    public suspend fun proxyPort(`value`: Output) {
        this.proxyPort = value
    }

    /**
     * @param value cloudflared starts a proxy server to translate HTTP traffic into TCP when proxying, for example, SSH or RDP. This configures what type of proxy will be started. Available values: `""`, `socks`. Defaults to `""`.
     */
    @JvmName("qogmdfxxcbqrswhn")
    public suspend fun proxyType(`value`: Output) {
        this.proxyType = value
    }

    /**
     * @param value The timeout after which a TCP keepalive packet is sent on a connection between Tunnel and the origin server. Defaults to `30s`.
     */
    @JvmName("sglqokmmrumvqsox")
    public suspend fun tcpKeepAlive(`value`: Output) {
        this.tcpKeepAlive = value
    }

    /**
     * @param value Timeout for completing a TLS handshake to your origin server, if you have chosen to connect Tunnel to an HTTPS server. Defaults to `10s`.
     */
    @JvmName("wleklwmpwrfjkwax")
    public suspend fun tlsTimeout(`value`: Output) {
        this.tlsTimeout = value
    }

    /**
     * @param value Access rules for the ingress service.
     */
    @JvmName("nqqcdktjlabybdac")
    public suspend fun access(`value`: TunnelConfigConfigOriginRequestAccessArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.access = mapped
    }

    /**
     * @param argument Access rules for the ingress service.
     */
    @JvmName("ljgovjpgjgmaogpg")
    public suspend fun access(argument: suspend TunnelConfigConfigOriginRequestAccessArgsBuilder.() -> Unit) {
        val toBeMapped = TunnelConfigConfigOriginRequestAccessArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.access = mapped
    }

    /**
     * @param value Runs as jump host.
     */
    @JvmName("ugyommhwunpvrfht")
    public suspend fun bastionMode(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bastionMode = mapped
    }

    /**
     * @param value Path to the certificate authority (CA) for the certificate of your origin. This option should be used only if your certificate is not signed by Cloudflare. Defaults to `""`.
     */
    @JvmName("qguofrrahnpvphrp")
    public suspend fun caPool(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.caPool = mapped
    }

    /**
     * @param value Timeout for establishing a new TCP connection to your origin server. This excludes the time taken to establish TLS, which is controlled by `tlsTimeout`. Defaults to `30s`.
     */
    @JvmName("iqffvuodkbrepebc")
    public suspend fun connectTimeout(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.connectTimeout = mapped
    }

    /**
     * @param value Disables chunked transfer encoding. Useful if you are running a Web Server Gateway Interface (WSGI) server. Defaults to `false`.
     */
    @JvmName("sbdicljtdafcfmcp")
    public suspend fun disableChunkedEncoding(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.disableChunkedEncoding = mapped
    }

    /**
     * @param value Enables HTTP/2 support for the origin connection. Defaults to `false`.
     */
    @JvmName("fnpybfoikjoanglm")
    public suspend fun http2Origin(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.http2Origin = mapped
    }

    /**
     * @param value Sets the HTTP Host header on requests sent to the local service. Defaults to `""`.
     */
    @JvmName("oonfpvgnxucvntfo")
    public suspend fun httpHostHeader(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.httpHostHeader = mapped
    }

    /**
     * @param value IP rules for the proxy service.
     */
    @JvmName("bcfhnjkydwilfoaf")
    public suspend fun ipRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipRules = mapped
    }

    /**
     * @param argument IP rules for the proxy service.
     */
    @JvmName("gvuuxlihaqbdgvtv")
    public suspend fun ipRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TunnelConfigConfigOriginRequestIpRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.ipRules = mapped
    }

    /**
     * @param argument IP rules for the proxy service.
     */
    @JvmName("pgbjhmhccjmdghky")
    public suspend fun ipRules(vararg argument: suspend TunnelConfigConfigOriginRequestIpRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TunnelConfigConfigOriginRequestIpRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.ipRules = mapped
    }

    /**
     * @param argument IP rules for the proxy service.
     */
    @JvmName("jngvkxpikhodnibi")
    public suspend fun ipRules(argument: suspend TunnelConfigConfigOriginRequestIpRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            TunnelConfigConfigOriginRequestIpRuleArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.ipRules = mapped
    }

    /**
     * @param values IP rules for the proxy service.
     */
    @JvmName("hwdvwgnqyiatkjtq")
    public suspend fun ipRules(vararg values: TunnelConfigConfigOriginRequestIpRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipRules = mapped
    }

    /**
     * @param value Maximum number of idle keepalive connections between Tunnel and your origin. This does not restrict the total number of concurrent connections. Defaults to `100`.
     */
    @JvmName("qifcotvebvlgjwfw")
    public suspend fun keepAliveConnections(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.keepAliveConnections = mapped
    }

    /**
     * @param value Timeout after which an idle keepalive connection can be discarded. Defaults to `1m30s`.
     */
    @JvmName("pylgsiresqvfwqyl")
    public suspend fun keepAliveTimeout(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.keepAliveTimeout = mapped
    }

    /**
     * @param value Disable the “happy eyeballs” algorithm for IPv4/IPv6 fallback if your local network has misconfigured one of the protocols. Defaults to `false`.
     */
    @JvmName("voyybxelxbkhxhfe")
    public suspend fun noHappyEyeballs(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.noHappyEyeballs = mapped
    }

    /**
     * @param value Disables TLS verification of the certificate presented by your origin. Will allow any certificate from the origin to be accepted. Defaults to `false`.
     */
    @JvmName("lfqhjcynjciuiiis")
    public suspend fun noTlsVerify(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.noTlsVerify = mapped
    }

    /**
     * @param value Hostname that cloudflared should expect from your origin server certificate. Defaults to `""`.
     */
    @JvmName("iojkuwylymhjueqc")
    public suspend fun originServerName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.originServerName = mapped
    }

    /**
     * @param value cloudflared starts a proxy server to translate HTTP traffic into TCP when proxying, for example, SSH or RDP. This configures the listen address for that proxy. Defaults to `127.0.0.1`.
     */
    @JvmName("ymvtnlaeticrikkb")
    public suspend fun proxyAddress(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.proxyAddress = mapped
    }

    /**
     * @param value cloudflared starts a proxy server to translate HTTP traffic into TCP when proxying, for example, SSH or RDP. This configures the listen port for that proxy. If set to zero, an unused port will randomly be chosen. Defaults to `0`.
     */
    @JvmName("itaovakvhcowpksh")
    public suspend fun proxyPort(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.proxyPort = mapped
    }

    /**
     * @param value cloudflared starts a proxy server to translate HTTP traffic into TCP when proxying, for example, SSH or RDP. This configures what type of proxy will be started. Available values: `""`, `socks`. Defaults to `""`.
     */
    @JvmName("cxippexsngjiknma")
    public suspend fun proxyType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.proxyType = mapped
    }

    /**
     * @param value The timeout after which a TCP keepalive packet is sent on a connection between Tunnel and the origin server. Defaults to `30s`.
     */
    @JvmName("ruqkevaretlbgfms")
    public suspend fun tcpKeepAlive(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tcpKeepAlive = mapped
    }

    /**
     * @param value Timeout for completing a TLS handshake to your origin server, if you have chosen to connect Tunnel to an HTTPS server. Defaults to `10s`.
     */
    @JvmName("vmdxkcwndmljkojq")
    public suspend fun tlsTimeout(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tlsTimeout = mapped
    }

    internal fun build(): TunnelConfigConfigOriginRequestArgs = TunnelConfigConfigOriginRequestArgs(
        access = access,
        bastionMode = bastionMode,
        caPool = caPool,
        connectTimeout = connectTimeout,
        disableChunkedEncoding = disableChunkedEncoding,
        http2Origin = http2Origin,
        httpHostHeader = httpHostHeader,
        ipRules = ipRules,
        keepAliveConnections = keepAliveConnections,
        keepAliveTimeout = keepAliveTimeout,
        noHappyEyeballs = noHappyEyeballs,
        noTlsVerify = noTlsVerify,
        originServerName = originServerName,
        proxyAddress = proxyAddress,
        proxyPort = proxyPort,
        proxyType = proxyType,
        tcpKeepAlive = tcpKeepAlive,
        tlsTimeout = tlsTimeout,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy