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

com.pulumi.gcp.networkservices.kotlin.inputs.HttpRouteRuleActionArgs.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: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.networkservices.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property corsPolicy The specification for allowing client side cross-origin requests.
 * Structure is documented below.
 * @property destinations The destination to which traffic should be forwarded.
 * Structure is documented below.
 * @property faultInjectionPolicy The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure.
 * Structure is documented below.
 * @property redirect If set, the request is directed as configured by this field.
 * Structure is documented below.
 * @property requestHeaderModifier The specification for modifying the headers of a matching request prior to delivery of the request to the destination.
 * Structure is documented below.
 * @property requestMirrorPolicy Specifies the policy on how requests intended for the routes destination are shadowed to a separate mirrored destination.
 * Structure is documented below.
 * @property responseHeaderModifier The specification for modifying the headers of a response prior to sending the response back to the client.
 * Structure is documented below.
 * @property retryPolicy Specifies the retry policy associated with this route.
 * Structure is documented below.
 * @property timeout Specifies the timeout for selected route.
 * @property urlRewrite The specification for rewrite URL before forwarding requests to the destination.
 * Structure is documented below.
 */
public data class HttpRouteRuleActionArgs(
    public val corsPolicy: Output? = null,
    public val destinations: Output>? = null,
    public val faultInjectionPolicy: Output? = null,
    public val redirect: Output? = null,
    public val requestHeaderModifier: Output? = null,
    public val requestMirrorPolicy: Output? = null,
    public val responseHeaderModifier: Output? = null,
    public val retryPolicy: Output? = null,
    public val timeout: Output? = null,
    public val urlRewrite: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionArgs =
        com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionArgs.builder()
            .corsPolicy(corsPolicy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .destinations(
                destinations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .faultInjectionPolicy(
                faultInjectionPolicy?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .redirect(redirect?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .requestHeaderModifier(
                requestHeaderModifier?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .requestMirrorPolicy(
                requestMirrorPolicy?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .responseHeaderModifier(
                responseHeaderModifier?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .retryPolicy(retryPolicy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .timeout(timeout?.applyValue({ args0 -> args0 }))
            .urlRewrite(urlRewrite?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [HttpRouteRuleActionArgs].
 */
@PulumiTagMarker
public class HttpRouteRuleActionArgsBuilder internal constructor() {
    private var corsPolicy: Output? = null

    private var destinations: Output>? = null

    private var faultInjectionPolicy: Output? = null

    private var redirect: Output? = null

    private var requestHeaderModifier: Output? = null

    private var requestMirrorPolicy: Output? = null

    private var responseHeaderModifier: Output? = null

    private var retryPolicy: Output? = null

    private var timeout: Output? = null

    private var urlRewrite: Output? = null

    /**
     * @param value The specification for allowing client side cross-origin requests.
     * Structure is documented below.
     */
    @JvmName("jcscvhacoyxxuhfc")
    public suspend fun corsPolicy(`value`: Output) {
        this.corsPolicy = value
    }

    /**
     * @param value The destination to which traffic should be forwarded.
     * Structure is documented below.
     */
    @JvmName("gxvgeugvyhwtblrv")
    public suspend fun destinations(`value`: Output>) {
        this.destinations = value
    }

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

    /**
     * @param values The destination to which traffic should be forwarded.
     * Structure is documented below.
     */
    @JvmName("vqlmnbmymjaqbret")
    public suspend fun destinations(values: List>) {
        this.destinations = Output.all(values)
    }

    /**
     * @param value The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure.
     * Structure is documented below.
     */
    @JvmName("jchfqvxqfxingfdh")
    public suspend fun faultInjectionPolicy(`value`: Output) {
        this.faultInjectionPolicy = value
    }

    /**
     * @param value If set, the request is directed as configured by this field.
     * Structure is documented below.
     */
    @JvmName("sqiaurjhpunkboxp")
    public suspend fun redirect(`value`: Output) {
        this.redirect = value
    }

    /**
     * @param value The specification for modifying the headers of a matching request prior to delivery of the request to the destination.
     * Structure is documented below.
     */
    @JvmName("nsshjrxtdovcwwjg")
    public suspend fun requestHeaderModifier(`value`: Output) {
        this.requestHeaderModifier = value
    }

    /**
     * @param value Specifies the policy on how requests intended for the routes destination are shadowed to a separate mirrored destination.
     * Structure is documented below.
     */
    @JvmName("mrupxelilrasogfo")
    public suspend fun requestMirrorPolicy(`value`: Output) {
        this.requestMirrorPolicy = value
    }

    /**
     * @param value The specification for modifying the headers of a response prior to sending the response back to the client.
     * Structure is documented below.
     */
    @JvmName("jincvnjoiyskpodw")
    public suspend fun responseHeaderModifier(`value`: Output) {
        this.responseHeaderModifier = value
    }

    /**
     * @param value Specifies the retry policy associated with this route.
     * Structure is documented below.
     */
    @JvmName("hisggnysubefscbp")
    public suspend fun retryPolicy(`value`: Output) {
        this.retryPolicy = value
    }

    /**
     * @param value Specifies the timeout for selected route.
     */
    @JvmName("khosxonmqgqeyjcr")
    public suspend fun timeout(`value`: Output) {
        this.timeout = value
    }

    /**
     * @param value The specification for rewrite URL before forwarding requests to the destination.
     * Structure is documented below.
     */
    @JvmName("yymvglpalgjchpng")
    public suspend fun urlRewrite(`value`: Output) {
        this.urlRewrite = value
    }

    /**
     * @param value The specification for allowing client side cross-origin requests.
     * Structure is documented below.
     */
    @JvmName("ynuejrldnbkykgfx")
    public suspend fun corsPolicy(`value`: HttpRouteRuleActionCorsPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.corsPolicy = mapped
    }

    /**
     * @param argument The specification for allowing client side cross-origin requests.
     * Structure is documented below.
     */
    @JvmName("piunlbvlxobopbtg")
    public suspend fun corsPolicy(argument: suspend HttpRouteRuleActionCorsPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = HttpRouteRuleActionCorsPolicyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.corsPolicy = mapped
    }

    /**
     * @param value The destination to which traffic should be forwarded.
     * Structure is documented below.
     */
    @JvmName("dxrhjjegrtjndhco")
    public suspend fun destinations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.destinations = mapped
    }

    /**
     * @param argument The destination to which traffic should be forwarded.
     * Structure is documented below.
     */
    @JvmName("ufgrsmvwgapdiahg")
    public suspend fun destinations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            HttpRouteRuleActionDestinationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.destinations = mapped
    }

    /**
     * @param argument The destination to which traffic should be forwarded.
     * Structure is documented below.
     */
    @JvmName("krciuvdchuephkhe")
    public suspend fun destinations(vararg argument: suspend HttpRouteRuleActionDestinationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            HttpRouteRuleActionDestinationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.destinations = mapped
    }

    /**
     * @param argument The destination to which traffic should be forwarded.
     * Structure is documented below.
     */
    @JvmName("lwwqaqdokriwgydf")
    public suspend fun destinations(argument: suspend HttpRouteRuleActionDestinationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            HttpRouteRuleActionDestinationArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.destinations = mapped
    }

    /**
     * @param values The destination to which traffic should be forwarded.
     * Structure is documented below.
     */
    @JvmName("jnatitqmbllaaasx")
    public suspend fun destinations(vararg values: HttpRouteRuleActionDestinationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.destinations = mapped
    }

    /**
     * @param value The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure.
     * Structure is documented below.
     */
    @JvmName("dhrududlmvapxioj")
    public suspend fun faultInjectionPolicy(`value`: HttpRouteRuleActionFaultInjectionPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.faultInjectionPolicy = mapped
    }

    /**
     * @param argument The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure.
     * Structure is documented below.
     */
    @JvmName("vcyunvfnwwyrupcc")
    public suspend fun faultInjectionPolicy(argument: suspend HttpRouteRuleActionFaultInjectionPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = HttpRouteRuleActionFaultInjectionPolicyArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.faultInjectionPolicy = mapped
    }

    /**
     * @param value If set, the request is directed as configured by this field.
     * Structure is documented below.
     */
    @JvmName("mumlnwaeugjahpra")
    public suspend fun redirect(`value`: HttpRouteRuleActionRedirectArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.redirect = mapped
    }

    /**
     * @param argument If set, the request is directed as configured by this field.
     * Structure is documented below.
     */
    @JvmName("lesvvhhiubnnvneq")
    public suspend fun redirect(argument: suspend HttpRouteRuleActionRedirectArgsBuilder.() -> Unit) {
        val toBeMapped = HttpRouteRuleActionRedirectArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.redirect = mapped
    }

    /**
     * @param value The specification for modifying the headers of a matching request prior to delivery of the request to the destination.
     * Structure is documented below.
     */
    @JvmName("wrfsbtrsviawkiqa")
    public suspend fun requestHeaderModifier(`value`: HttpRouteRuleActionRequestHeaderModifierArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requestHeaderModifier = mapped
    }

    /**
     * @param argument The specification for modifying the headers of a matching request prior to delivery of the request to the destination.
     * Structure is documented below.
     */
    @JvmName("swmeuxhvndvwqwmj")
    public suspend fun requestHeaderModifier(argument: suspend HttpRouteRuleActionRequestHeaderModifierArgsBuilder.() -> Unit) {
        val toBeMapped = HttpRouteRuleActionRequestHeaderModifierArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.requestHeaderModifier = mapped
    }

    /**
     * @param value Specifies the policy on how requests intended for the routes destination are shadowed to a separate mirrored destination.
     * Structure is documented below.
     */
    @JvmName("lknodefbdjrlbpfn")
    public suspend fun requestMirrorPolicy(`value`: HttpRouteRuleActionRequestMirrorPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requestMirrorPolicy = mapped
    }

    /**
     * @param argument Specifies the policy on how requests intended for the routes destination are shadowed to a separate mirrored destination.
     * Structure is documented below.
     */
    @JvmName("dvstiofjgugtvrvg")
    public suspend fun requestMirrorPolicy(argument: suspend HttpRouteRuleActionRequestMirrorPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = HttpRouteRuleActionRequestMirrorPolicyArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.requestMirrorPolicy = mapped
    }

    /**
     * @param value The specification for modifying the headers of a response prior to sending the response back to the client.
     * Structure is documented below.
     */
    @JvmName("ehjuhdwteiyfmgim")
    public suspend fun responseHeaderModifier(`value`: HttpRouteRuleActionResponseHeaderModifierArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.responseHeaderModifier = mapped
    }

    /**
     * @param argument The specification for modifying the headers of a response prior to sending the response back to the client.
     * Structure is documented below.
     */
    @JvmName("ftofeefxiohioowa")
    public suspend fun responseHeaderModifier(argument: suspend HttpRouteRuleActionResponseHeaderModifierArgsBuilder.() -> Unit) {
        val toBeMapped = HttpRouteRuleActionResponseHeaderModifierArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.responseHeaderModifier = mapped
    }

    /**
     * @param value Specifies the retry policy associated with this route.
     * Structure is documented below.
     */
    @JvmName("frjbyordvfbxcyks")
    public suspend fun retryPolicy(`value`: HttpRouteRuleActionRetryPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.retryPolicy = mapped
    }

    /**
     * @param argument Specifies the retry policy associated with this route.
     * Structure is documented below.
     */
    @JvmName("wotgpkxmspwptlda")
    public suspend fun retryPolicy(argument: suspend HttpRouteRuleActionRetryPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = HttpRouteRuleActionRetryPolicyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.retryPolicy = mapped
    }

    /**
     * @param value Specifies the timeout for selected route.
     */
    @JvmName("gtjerqrrxvpxfpxc")
    public suspend fun timeout(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeout = mapped
    }

    /**
     * @param value The specification for rewrite URL before forwarding requests to the destination.
     * Structure is documented below.
     */
    @JvmName("cjijtccixrlxigix")
    public suspend fun urlRewrite(`value`: HttpRouteRuleActionUrlRewriteArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.urlRewrite = mapped
    }

    /**
     * @param argument The specification for rewrite URL before forwarding requests to the destination.
     * Structure is documented below.
     */
    @JvmName("pmsvkselgwomqiwy")
    public suspend fun urlRewrite(argument: suspend HttpRouteRuleActionUrlRewriteArgsBuilder.() -> Unit) {
        val toBeMapped = HttpRouteRuleActionUrlRewriteArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.urlRewrite = mapped
    }

    internal fun build(): HttpRouteRuleActionArgs = HttpRouteRuleActionArgs(
        corsPolicy = corsPolicy,
        destinations = destinations,
        faultInjectionPolicy = faultInjectionPolicy,
        redirect = redirect,
        requestHeaderModifier = requestHeaderModifier,
        requestMirrorPolicy = requestMirrorPolicy,
        responseHeaderModifier = responseHeaderModifier,
        retryPolicy = retryPolicy,
        timeout = timeout,
        urlRewrite = urlRewrite,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy