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

com.pulumi.gcp.compute.kotlin.inputs.RegionUrlMapDefaultRouteActionArgs.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.compute.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.inputs.RegionUrlMapDefaultRouteActionArgs.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](https://www.w3.org/TR/cors/)
 * 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 a load balancer on a percentage of requests before sending those requests to the backend service.
 * Similarly requests from clients can be aborted by the load balancer for a percentage of requests.
 * timeout and retryPolicy is ignored by clients that are configured with a faultInjectionPolicy if: 1. The traffic is generated by fault injection AND 2. The fault injection is not a delay fault injection.
 * Fault injection is not supported with the global external HTTP(S) load balancer (classic). To see which load balancers support fault injection, see Load balancing: [Routing and traffic management features](https://cloud.google.com/load-balancing/docs/features#routing-traffic-management).
 * 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.
 * The load balancer does not wait for responses from the shadow service. Before sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
 * Not supported when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.
 * 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 has been fully processed (known as end-of-stream) up until the response has been processed. Timeout includes all retries.
 * If not specified, this field uses the largest timeout among all backend services associated with the route.
 * Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true.
 * Structure is documented below.
 * @property urlRewrite The spec to modify the URL of the request, before forwarding the request to the matched service.
 * urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
 * Not supported when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.
 * 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-zero number.
 * After a backend service is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
 * Structure is documented below.
 */
public data class RegionUrlMapDefaultRouteActionArgs(
    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.RegionUrlMapDefaultRouteActionArgs =
        com.pulumi.gcp.compute.inputs.RegionUrlMapDefaultRouteActionArgs.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 [RegionUrlMapDefaultRouteActionArgs].
 */
@PulumiTagMarker
public class RegionUrlMapDefaultRouteActionArgsBuilder 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](https://www.w3.org/TR/cors/)
     * Structure is documented below.
     */
    @JvmName("kxdmavkotpdencxj")
    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 a load balancer on a percentage of requests before sending those requests to the backend service.
     * Similarly requests from clients can be aborted by the load balancer for a percentage of requests.
     * timeout and retryPolicy is ignored by clients that are configured with a faultInjectionPolicy if: 1. The traffic is generated by fault injection AND 2. The fault injection is not a delay fault injection.
     * Fault injection is not supported with the global external HTTP(S) load balancer (classic). To see which load balancers support fault injection, see Load balancing: [Routing and traffic management features](https://cloud.google.com/load-balancing/docs/features#routing-traffic-management).
     * Structure is documented below.
     */
    @JvmName("dqhoqrnxokuyoxbl")
    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.
     * The load balancer does not wait for responses from the shadow service. Before sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
     * Not supported when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.
     * Structure is documented below.
     */
    @JvmName("vwmqpnunpsyvookb")
    public suspend fun requestMirrorPolicy(`value`: Output) {
        this.requestMirrorPolicy = value
    }

    /**
     * @param value Specifies the retry policy associated with this route.
     * Structure is documented below.
     */
    @JvmName("jrwqoapbmhfpamlq")
    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 has been fully processed (known as end-of-stream) up until the response has been processed. Timeout includes all retries.
     * If not specified, this field uses the largest timeout among all backend services associated with the route.
     * Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true.
     * Structure is documented below.
     */
    @JvmName("auraxpmlnyaahhcr")
    public suspend fun timeout(`value`: Output) {
        this.timeout = value
    }

    /**
     * @param value The spec to modify the URL of the request, before forwarding the request to the matched service.
     * urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
     * Not supported when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.
     * Structure is documented below.
     */
    @JvmName("objoaudyfqpsptve")
    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-zero number.
     * After a backend service is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
     * Structure is documented below.
     */
    @JvmName("ktxaovnsmfgdwoih")
    public suspend fun weightedBackendServices(`value`: Output>) {
        this.weightedBackendServices = value
    }

    @JvmName("axyeawweruglgvhc")
    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-zero number.
     * After a backend service is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
     * Structure is documented below.
     */
    @JvmName("sxmddqcoktowdcwq")
    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](https://www.w3.org/TR/cors/)
     * Structure is documented below.
     */
    @JvmName("ugyherfaljiftbbe")
    public suspend fun corsPolicy(`value`: RegionUrlMapDefaultRouteActionCorsPolicyArgs?) {
        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](https://www.w3.org/TR/cors/)
     * Structure is documented below.
     */
    @JvmName("tqesgftixyvqocyu")
    public suspend fun corsPolicy(argument: suspend RegionUrlMapDefaultRouteActionCorsPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = RegionUrlMapDefaultRouteActionCorsPolicyArgsBuilder().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 a load balancer on a percentage of requests before sending those requests to the backend service.
     * Similarly requests from clients can be aborted by the load balancer for a percentage of requests.
     * timeout and retryPolicy is ignored by clients that are configured with a faultInjectionPolicy if: 1. The traffic is generated by fault injection AND 2. The fault injection is not a delay fault injection.
     * Fault injection is not supported with the global external HTTP(S) load balancer (classic). To see which load balancers support fault injection, see Load balancing: [Routing and traffic management features](https://cloud.google.com/load-balancing/docs/features#routing-traffic-management).
     * Structure is documented below.
     */
    @JvmName("vtihvxglmhwtxopv")
    public suspend fun faultInjectionPolicy(`value`: RegionUrlMapDefaultRouteActionFaultInjectionPolicyArgs?) {
        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 a load balancer on a percentage of requests before sending those requests to the backend service.
     * Similarly requests from clients can be aborted by the load balancer for a percentage of requests.
     * timeout and retryPolicy is ignored by clients that are configured with a faultInjectionPolicy if: 1. The traffic is generated by fault injection AND 2. The fault injection is not a delay fault injection.
     * Fault injection is not supported with the global external HTTP(S) load balancer (classic). To see which load balancers support fault injection, see Load balancing: [Routing and traffic management features](https://cloud.google.com/load-balancing/docs/features#routing-traffic-management).
     * Structure is documented below.
     */
    @JvmName("pwuawggysbgilkhk")
    public suspend fun faultInjectionPolicy(argument: suspend RegionUrlMapDefaultRouteActionFaultInjectionPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = RegionUrlMapDefaultRouteActionFaultInjectionPolicyArgsBuilder().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.
     * The load balancer does not wait for responses from the shadow service. Before sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
     * Not supported when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.
     * Structure is documented below.
     */
    @JvmName("nyxxsetmyfopnfte")
    public suspend fun requestMirrorPolicy(`value`: RegionUrlMapDefaultRouteActionRequestMirrorPolicyArgs?) {
        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.
     * The load balancer does not wait for responses from the shadow service. Before sending traffic to the shadow service, the host / authority header is suffixed with -shadow.
     * Not supported when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.
     * Structure is documented below.
     */
    @JvmName("kunimquuqudkuutj")
    public suspend fun requestMirrorPolicy(argument: suspend RegionUrlMapDefaultRouteActionRequestMirrorPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = RegionUrlMapDefaultRouteActionRequestMirrorPolicyArgsBuilder().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("jfsrsafaafandhjn")
    public suspend fun retryPolicy(`value`: RegionUrlMapDefaultRouteActionRetryPolicyArgs?) {
        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("ngxdjuoetjxuhxxc")
    public suspend fun retryPolicy(argument: suspend RegionUrlMapDefaultRouteActionRetryPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = RegionUrlMapDefaultRouteActionRetryPolicyArgsBuilder().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 has been fully processed (known as end-of-stream) up until the response has been processed. Timeout includes all retries.
     * If not specified, this field uses the largest timeout among all backend services associated with the route.
     * Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true.
     * Structure is documented below.
     */
    @JvmName("lhbxriacksxqtnyw")
    public suspend fun timeout(`value`: RegionUrlMapDefaultRouteActionTimeoutArgs?) {
        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 has been fully processed (known as end-of-stream) up until the response has been processed. Timeout includes all retries.
     * If not specified, this field uses the largest timeout among all backend services associated with the route.
     * Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true.
     * Structure is documented below.
     */
    @JvmName("vuwftfhhxyakthal")
    public suspend fun timeout(argument: suspend RegionUrlMapDefaultRouteActionTimeoutArgsBuilder.() -> Unit) {
        val toBeMapped = RegionUrlMapDefaultRouteActionTimeoutArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.timeout = mapped
    }

    /**
     * @param value The spec to modify the URL of the request, before forwarding the request to the matched service.
     * urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
     * Not supported when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.
     * Structure is documented below.
     */
    @JvmName("homampnlnbkaeabp")
    public suspend fun urlRewrite(`value`: RegionUrlMapDefaultRouteActionUrlRewriteArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.urlRewrite = mapped
    }

    /**
     * @param argument The spec to modify the URL of the request, before forwarding the request to the matched service.
     * urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers.
     * Not supported when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.
     * Structure is documented below.
     */
    @JvmName("himcwkapvkivhmtw")
    public suspend fun urlRewrite(argument: suspend RegionUrlMapDefaultRouteActionUrlRewriteArgsBuilder.() -> Unit) {
        val toBeMapped = RegionUrlMapDefaultRouteActionUrlRewriteArgsBuilder().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-zero number.
     * After a backend service is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
     * Structure is documented below.
     */
    @JvmName("quebjbbwypkjwwtn")
    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-zero number.
     * After a backend service is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
     * Structure is documented below.
     */
    @JvmName("qaktxybybjcjmohg")
    public suspend fun weightedBackendServices(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RegionUrlMapDefaultRouteActionWeightedBackendServiceArgsBuilder().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-zero number.
     * After a backend service is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
     * Structure is documented below.
     */
    @JvmName("usghigkigaahtjli")
    public suspend fun weightedBackendServices(vararg argument: suspend RegionUrlMapDefaultRouteActionWeightedBackendServiceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RegionUrlMapDefaultRouteActionWeightedBackendServiceArgsBuilder().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-zero number.
     * After a backend service is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
     * Structure is documented below.
     */
    @JvmName("jvqqvmwcbldascoq")
    public suspend fun weightedBackendServices(argument: suspend RegionUrlMapDefaultRouteActionWeightedBackendServiceArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                RegionUrlMapDefaultRouteActionWeightedBackendServiceArgsBuilder().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-zero number.
     * After a backend service is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.
     * Structure is documented below.
     */
    @JvmName("cpsnruccbqywpxmc")
    public suspend fun weightedBackendServices(vararg values: RegionUrlMapDefaultRouteActionWeightedBackendServiceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.weightedBackendServices = mapped
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy