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

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

package com.pulumi.gcp.compute.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.inputs.RegionUrlMapPathMatcherRouteRuleRouteActionArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
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 corsPolicy The specification for allowing client side cross-origin requests. Please see W3C
 * Recommendation for Cross Origin Resource Sharing
 * Structure is documented below.
 * @property faultInjectionPolicy The specification for fault injection introduced into traffic to test the
 * resiliency of clients to backend service failure. As part of fault injection,
 * when clients send requests to a backend service, delays can be introduced by
 * Loadbalancer on a percentage of requests before sending those request to the
 * backend service. Similarly requests from clients can be aborted by the
 * Loadbalancer for a percentage of requests. timeout and retry_policy will be
 * ignored by clients that are configured with a fault_injection_policy.
 * Structure is documented below.
 * @property requestMirrorPolicy Specifies the policy on how requests intended for the route's backends are
 * shadowed to a separate mirrored backend service. Loadbalancer does not wait for
 * responses from the shadow service. Prior to sending traffic to the shadow
 * service, the host / authority header is suffixed with -shadow.
 * Structure is documented below.
 * @property retryPolicy Specifies the retry policy associated with this route.
 * Structure is documented below.
 * @property timeout Specifies the timeout for the selected route. Timeout is computed from the time
 * the request is has been fully processed (i.e. end-of-stream) up until the
 * response has been completely processed. Timeout includes all retries. If not
 * specified, the default value is 15 seconds.
 * Structure is documented below.
 * @property urlRewrite The spec to modify the URL of the request, prior to forwarding the request to
 * the matched service
 * Structure is documented below.
 * @property weightedBackendServices A list of weighted backend services to send traffic to when a route match
 * occurs. The weights determine the fraction of traffic that flows to their
 * corresponding backend service. If all traffic needs to go to a single backend
 * service, there must be one  weightedBackendService with weight set to a non 0
 * number. Once a backendService is identified and before forwarding the request to
 * the backend service, advanced routing actions like Url rewrites and header
 * transformations are applied depending on additional settings specified in this
 * HttpRouteAction.
 * Structure is documented below.
 */
public data class RegionUrlMapPathMatcherRouteRuleRouteActionArgs(
    public val corsPolicy: Output? = null,
    public val faultInjectionPolicy: Output? = null,
    public val requestMirrorPolicy: Output? = null,
    public val retryPolicy: Output? =
        null,
    public val timeout: Output? = null,
    public val urlRewrite: Output? = null,
    public val weightedBackendServices: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.inputs.RegionUrlMapPathMatcherRouteRuleRouteActionArgs =
        com.pulumi.gcp.compute.inputs.RegionUrlMapPathMatcherRouteRuleRouteActionArgs.builder()
            .corsPolicy(corsPolicy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .faultInjectionPolicy(
                faultInjectionPolicy?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .requestMirrorPolicy(
                requestMirrorPolicy?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .retryPolicy(retryPolicy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .timeout(timeout?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .urlRewrite(urlRewrite?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .weightedBackendServices(
                weightedBackendServices?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            ).build()
}

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

    private var faultInjectionPolicy:
        Output? = null

    private var requestMirrorPolicy:
        Output? = null

    private var retryPolicy: Output? =
        null

    private var timeout: Output? = null

    private var urlRewrite: Output? = null

    private var weightedBackendServices:
        Output>? = null

    /**
     * @param value The specification for allowing client side cross-origin requests. Please see W3C
     * Recommendation for Cross Origin Resource Sharing
     * Structure is documented below.
     */
    @JvmName("teptbyanbtxbcdog")
    public suspend fun corsPolicy(`value`: Output) {
        this.corsPolicy = value
    }

    /**
     * @param value The specification for fault injection introduced into traffic to test the
     * resiliency of clients to backend service failure. As part of fault injection,
     * when clients send requests to a backend service, delays can be introduced by
     * Loadbalancer on a percentage of requests before sending those request to the
     * backend service. Similarly requests from clients can be aborted by the
     * Loadbalancer for a percentage of requests. timeout and retry_policy will be
     * ignored by clients that are configured with a fault_injection_policy.
     * Structure is documented below.
     */
    @JvmName("ktlimstoiultpfhu")
    public suspend fun faultInjectionPolicy(`value`: Output) {
        this.faultInjectionPolicy = value
    }

    /**
     * @param value Specifies the policy on how requests intended for the route's backends are
     * shadowed to a separate mirrored backend service. Loadbalancer does not wait for
     * responses from the shadow service. Prior to sending traffic to the shadow
     * service, the host / authority header is suffixed with -shadow.
     * Structure is documented below.
     */
    @JvmName("dglxdoksmkhoeyxx")
    public suspend fun requestMirrorPolicy(`value`: Output) {
        this.requestMirrorPolicy = value
    }

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

    /**
     * @param value Specifies the timeout for the selected route. Timeout is computed from the time
     * the request is has been fully processed (i.e. end-of-stream) up until the
     * response has been completely processed. Timeout includes all retries. If not
     * specified, the default value is 15 seconds.
     * Structure is documented below.
     */
    @JvmName("nuybsqwclgcddphd")
    public suspend fun timeout(`value`: Output) {
        this.timeout = value
    }

    /**
     * @param value The spec to modify the URL of the request, prior to forwarding the request to
     * the matched service
     * Structure is documented below.
     */
    @JvmName("sfhjryvehrdrvcxw")
    public suspend fun urlRewrite(`value`: Output) {
        this.urlRewrite = value
    }

    /**
     * @param value A list of weighted backend services to send traffic to when a route match
     * occurs. The weights determine the fraction of traffic that flows to their
     * corresponding backend service. If all traffic needs to go to a single backend
     * service, there must be one  weightedBackendService with weight set to a non 0
     * number. Once a backendService is identified and before forwarding the request to
     * the backend service, advanced routing actions like Url rewrites and header
     * transformations are applied depending on additional settings specified in this
     * HttpRouteAction.
     * Structure is documented below.
     */
    @JvmName("ayglujdcpmutvnfo")
    public suspend fun weightedBackendServices(`value`: Output>) {
        this.weightedBackendServices = value
    }

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

    /**
     * @param values A list of weighted backend services to send traffic to when a route match
     * occurs. The weights determine the fraction of traffic that flows to their
     * corresponding backend service. If all traffic needs to go to a single backend
     * service, there must be one  weightedBackendService with weight set to a non 0
     * number. Once a backendService is identified and before forwarding the request to
     * the backend service, advanced routing actions like Url rewrites and header
     * transformations are applied depending on additional settings specified in this
     * HttpRouteAction.
     * Structure is documented below.
     */
    @JvmName("ncngwidqgeoknwat")
    public suspend fun weightedBackendServices(values: List>) {
        this.weightedBackendServices = Output.all(values)
    }

    /**
     * @param value The specification for allowing client side cross-origin requests. Please see W3C
     * Recommendation for Cross Origin Resource Sharing
     * Structure is documented below.
     */
    @JvmName("nebonenwuhfwqvrf")
    public suspend fun corsPolicy(`value`: RegionUrlMapPathMatcherRouteRuleRouteActionCorsPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.corsPolicy = mapped
    }

    /**
     * @param argument The specification for allowing client side cross-origin requests. Please see W3C
     * Recommendation for Cross Origin Resource Sharing
     * Structure is documented below.
     */
    @JvmName("mvktlyiwlhbtqbxx")
    public suspend fun corsPolicy(argument: suspend RegionUrlMapPathMatcherRouteRuleRouteActionCorsPolicyArgsBuilder.() -> Unit) {
        val toBeMapped =
            RegionUrlMapPathMatcherRouteRuleRouteActionCorsPolicyArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.corsPolicy = mapped
    }

    /**
     * @param value The specification for fault injection introduced into traffic to test the
     * resiliency of clients to backend service failure. As part of fault injection,
     * when clients send requests to a backend service, delays can be introduced by
     * Loadbalancer on a percentage of requests before sending those request to the
     * backend service. Similarly requests from clients can be aborted by the
     * Loadbalancer for a percentage of requests. timeout and retry_policy will be
     * ignored by clients that are configured with a fault_injection_policy.
     * Structure is documented below.
     */
    @JvmName("aoksvaqbaxrsxahi")
    public suspend fun faultInjectionPolicy(`value`: RegionUrlMapPathMatcherRouteRuleRouteActionFaultInjectionPolicyArgs?) {
        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. As part of fault injection,
     * when clients send requests to a backend service, delays can be introduced by
     * Loadbalancer on a percentage of requests before sending those request to the
     * backend service. Similarly requests from clients can be aborted by the
     * Loadbalancer for a percentage of requests. timeout and retry_policy will be
     * ignored by clients that are configured with a fault_injection_policy.
     * Structure is documented below.
     */
    @JvmName("cfbjefsqleqxgsvr")
    public suspend fun faultInjectionPolicy(argument: suspend RegionUrlMapPathMatcherRouteRuleRouteActionFaultInjectionPolicyArgsBuilder.() -> Unit) {
        val toBeMapped =
            RegionUrlMapPathMatcherRouteRuleRouteActionFaultInjectionPolicyArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.faultInjectionPolicy = mapped
    }

    /**
     * @param value Specifies the policy on how requests intended for the route's backends are
     * shadowed to a separate mirrored backend service. Loadbalancer does not wait for
     * responses from the shadow service. Prior to sending traffic to the shadow
     * service, the host / authority header is suffixed with -shadow.
     * Structure is documented below.
     */
    @JvmName("eavdebkhmmdxeepv")
    public suspend fun requestMirrorPolicy(`value`: RegionUrlMapPathMatcherRouteRuleRouteActionRequestMirrorPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requestMirrorPolicy = mapped
    }

    /**
     * @param argument Specifies the policy on how requests intended for the route's backends are
     * shadowed to a separate mirrored backend service. Loadbalancer does not wait for
     * responses from the shadow service. Prior to sending traffic to the shadow
     * service, the host / authority header is suffixed with -shadow.
     * Structure is documented below.
     */
    @JvmName("tbeepqxkwhbsqsnv")
    public suspend fun requestMirrorPolicy(argument: suspend RegionUrlMapPathMatcherRouteRuleRouteActionRequestMirrorPolicyArgsBuilder.() -> Unit) {
        val toBeMapped =
            RegionUrlMapPathMatcherRouteRuleRouteActionRequestMirrorPolicyArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.requestMirrorPolicy = mapped
    }

    /**
     * @param value Specifies the retry policy associated with this route.
     * Structure is documented below.
     */
    @JvmName("hfupmompxbfimvnj")
    public suspend fun retryPolicy(`value`: RegionUrlMapPathMatcherRouteRuleRouteActionRetryPolicyArgs?) {
        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("aageqggtiaxeiujs")
    public suspend fun retryPolicy(argument: suspend RegionUrlMapPathMatcherRouteRuleRouteActionRetryPolicyArgsBuilder.() -> Unit) {
        val toBeMapped =
            RegionUrlMapPathMatcherRouteRuleRouteActionRetryPolicyArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.retryPolicy = mapped
    }

    /**
     * @param value Specifies the timeout for the selected route. Timeout is computed from the time
     * the request is has been fully processed (i.e. end-of-stream) up until the
     * response has been completely processed. Timeout includes all retries. If not
     * specified, the default value is 15 seconds.
     * Structure is documented below.
     */
    @JvmName("hsgtevkcsmcyecau")
    public suspend fun timeout(`value`: RegionUrlMapPathMatcherRouteRuleRouteActionTimeoutArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeout = mapped
    }

    /**
     * @param argument Specifies the timeout for the selected route. Timeout is computed from the time
     * the request is has been fully processed (i.e. end-of-stream) up until the
     * response has been completely processed. Timeout includes all retries. If not
     * specified, the default value is 15 seconds.
     * Structure is documented below.
     */
    @JvmName("rjpdwfewxssrtkdj")
    public suspend fun timeout(argument: suspend RegionUrlMapPathMatcherRouteRuleRouteActionTimeoutArgsBuilder.() -> Unit) {
        val toBeMapped = RegionUrlMapPathMatcherRouteRuleRouteActionTimeoutArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.timeout = mapped
    }

    /**
     * @param value The spec to modify the URL of the request, prior to forwarding the request to
     * the matched service
     * Structure is documented below.
     */
    @JvmName("okejeoidyjlgplyy")
    public suspend fun urlRewrite(`value`: RegionUrlMapPathMatcherRouteRuleRouteActionUrlRewriteArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.urlRewrite = mapped
    }

    /**
     * @param argument The spec to modify the URL of the request, prior to forwarding the request to
     * the matched service
     * Structure is documented below.
     */
    @JvmName("mnsyccdmimeojytd")
    public suspend fun urlRewrite(argument: suspend RegionUrlMapPathMatcherRouteRuleRouteActionUrlRewriteArgsBuilder.() -> Unit) {
        val toBeMapped =
            RegionUrlMapPathMatcherRouteRuleRouteActionUrlRewriteArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.urlRewrite = mapped
    }

    /**
     * @param value A list of weighted backend services to send traffic to when a route match
     * occurs. The weights determine the fraction of traffic that flows to their
     * corresponding backend service. If all traffic needs to go to a single backend
     * service, there must be one  weightedBackendService with weight set to a non 0
     * number. Once a backendService is identified and before forwarding the request to
     * the backend service, advanced routing actions like Url rewrites and header
     * transformations are applied depending on additional settings specified in this
     * HttpRouteAction.
     * Structure is documented below.
     */
    @JvmName("fkjsiinnucfnedpy")
    public suspend fun weightedBackendServices(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.weightedBackendServices = mapped
    }

    /**
     * @param argument A list of weighted backend services to send traffic to when a route match
     * occurs. The weights determine the fraction of traffic that flows to their
     * corresponding backend service. If all traffic needs to go to a single backend
     * service, there must be one  weightedBackendService with weight set to a non 0
     * number. Once a backendService is identified and before forwarding the request to
     * the backend service, advanced routing actions like Url rewrites and header
     * transformations are applied depending on additional settings specified in this
     * HttpRouteAction.
     * Structure is documented below.
     */
    @JvmName("ddncvsshtfxbvnho")
    public suspend fun weightedBackendServices(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RegionUrlMapPathMatcherRouteRuleRouteActionWeightedBackendServiceArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.weightedBackendServices = mapped
    }

    /**
     * @param argument A list of weighted backend services to send traffic to when a route match
     * occurs. The weights determine the fraction of traffic that flows to their
     * corresponding backend service. If all traffic needs to go to a single backend
     * service, there must be one  weightedBackendService with weight set to a non 0
     * number. Once a backendService is identified and before forwarding the request to
     * the backend service, advanced routing actions like Url rewrites and header
     * transformations are applied depending on additional settings specified in this
     * HttpRouteAction.
     * Structure is documented below.
     */
    @JvmName("sinicqymsqdbntvp")
    public suspend fun weightedBackendServices(vararg argument: suspend RegionUrlMapPathMatcherRouteRuleRouteActionWeightedBackendServiceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RegionUrlMapPathMatcherRouteRuleRouteActionWeightedBackendServiceArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.weightedBackendServices = mapped
    }

    /**
     * @param argument A list of weighted backend services to send traffic to when a route match
     * occurs. The weights determine the fraction of traffic that flows to their
     * corresponding backend service. If all traffic needs to go to a single backend
     * service, there must be one  weightedBackendService with weight set to a non 0
     * number. Once a backendService is identified and before forwarding the request to
     * the backend service, advanced routing actions like Url rewrites and header
     * transformations are applied depending on additional settings specified in this
     * HttpRouteAction.
     * Structure is documented below.
     */
    @JvmName("ypxufcnmvrgidlpd")
    public suspend fun weightedBackendServices(argument: suspend RegionUrlMapPathMatcherRouteRuleRouteActionWeightedBackendServiceArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                RegionUrlMapPathMatcherRouteRuleRouteActionWeightedBackendServiceArgsBuilder().applySuspend
                    { argument() }.build(),
            )
        val mapped = of(toBeMapped)
        this.weightedBackendServices = mapped
    }

    /**
     * @param values A list of weighted backend services to send traffic to when a route match
     * occurs. The weights determine the fraction of traffic that flows to their
     * corresponding backend service. If all traffic needs to go to a single backend
     * service, there must be one  weightedBackendService with weight set to a non 0
     * number. Once a backendService is identified and before forwarding the request to
     * the backend service, advanced routing actions like Url rewrites and header
     * transformations are applied depending on additional settings specified in this
     * HttpRouteAction.
     * Structure is documented below.
     */
    @JvmName("gwfkykdpfrbqjmmg")
    public suspend fun weightedBackendServices(vararg values: RegionUrlMapPathMatcherRouteRuleRouteActionWeightedBackendServiceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.weightedBackendServices = mapped
    }

    internal fun build(): RegionUrlMapPathMatcherRouteRuleRouteActionArgs =
        RegionUrlMapPathMatcherRouteRuleRouteActionArgs(
            corsPolicy = corsPolicy,
            faultInjectionPolicy = faultInjectionPolicy,
            requestMirrorPolicy = requestMirrorPolicy,
            retryPolicy = retryPolicy,
            timeout = timeout,
            urlRewrite = urlRewrite,
            weightedBackendServices = weightedBackendServices,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy