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

com.pulumi.gcp.compute.kotlin.inputs.URLMapPathMatcherPathRuleCustomErrorResponsePolicyArgs.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.13.1.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.URLMapPathMatcherPathRuleCustomErrorResponsePolicyArgs.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 errorResponseRules Specifies rules for returning error responses.
 * In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority.
 * For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX).
 * If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.
 * Structure is documented below.
 * @property errorService The full or partial URL to the BackendBucket resource that contains the custom error content. Examples are:
 * https://www.googleapis.com/compute/v1/projects/project/global/backendBuckets/myBackendBucket
 * compute/v1/projects/project/global/backendBuckets/myBackendBucket
 * global/backendBuckets/myBackendBucket
 * If errorService is not specified at lower levels like pathMatcher, pathRule and routeRule, an errorService specified at a higher level in the UrlMap will be used. If UrlMap.defaultCustomErrorResponsePolicy contains one or more errorResponseRules[], it must specify errorService.
 * If load balancer cannot reach the backendBucket, a simple Not Found Error will be returned, with the original response code (or overrideResponseCode if configured).
 */
public data class URLMapPathMatcherPathRuleCustomErrorResponsePolicyArgs(
    public val errorResponseRules: Output>? = null,
    public val errorService: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.inputs.URLMapPathMatcherPathRuleCustomErrorResponsePolicyArgs =
        com.pulumi.gcp.compute.inputs.URLMapPathMatcherPathRuleCustomErrorResponsePolicyArgs.builder()
            .errorResponseRules(
                errorResponseRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .errorService(errorService?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [URLMapPathMatcherPathRuleCustomErrorResponsePolicyArgs].
 */
@PulumiTagMarker
public class URLMapPathMatcherPathRuleCustomErrorResponsePolicyArgsBuilder internal constructor() {
    private var errorResponseRules:
        Output>? = null

    private var errorService: Output? = null

    /**
     * @param value Specifies rules for returning error responses.
     * In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority.
     * For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX).
     * If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.
     * Structure is documented below.
     */
    @JvmName("kevsusfcuvqiwpii")
    public suspend fun errorResponseRules(`value`: Output>) {
        this.errorResponseRules = value
    }

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

    /**
     * @param values Specifies rules for returning error responses.
     * In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority.
     * For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX).
     * If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.
     * Structure is documented below.
     */
    @JvmName("ptkuwvropsdbswef")
    public suspend fun errorResponseRules(values: List>) {
        this.errorResponseRules = Output.all(values)
    }

    /**
     * @param value The full or partial URL to the BackendBucket resource that contains the custom error content. Examples are:
     * https://www.googleapis.com/compute/v1/projects/project/global/backendBuckets/myBackendBucket
     * compute/v1/projects/project/global/backendBuckets/myBackendBucket
     * global/backendBuckets/myBackendBucket
     * If errorService is not specified at lower levels like pathMatcher, pathRule and routeRule, an errorService specified at a higher level in the UrlMap will be used. If UrlMap.defaultCustomErrorResponsePolicy contains one or more errorResponseRules[], it must specify errorService.
     * If load balancer cannot reach the backendBucket, a simple Not Found Error will be returned, with the original response code (or overrideResponseCode if configured).
     */
    @JvmName("afyjkvwdbaleigvs")
    public suspend fun errorService(`value`: Output) {
        this.errorService = value
    }

    /**
     * @param value Specifies rules for returning error responses.
     * In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority.
     * For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX).
     * If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.
     * Structure is documented below.
     */
    @JvmName("aqotvagahilwcskm")
    public suspend fun errorResponseRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.errorResponseRules = mapped
    }

    /**
     * @param argument Specifies rules for returning error responses.
     * In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority.
     * For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX).
     * If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.
     * Structure is documented below.
     */
    @JvmName("hwnbibpfwwfyvqmu")
    public suspend fun errorResponseRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            URLMapPathMatcherPathRuleCustomErrorResponsePolicyErrorResponseRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.errorResponseRules = mapped
    }

    /**
     * @param argument Specifies rules for returning error responses.
     * In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority.
     * For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX).
     * If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.
     * Structure is documented below.
     */
    @JvmName("bgthwmnopblweilk")
    public suspend fun errorResponseRules(vararg argument: suspend URLMapPathMatcherPathRuleCustomErrorResponsePolicyErrorResponseRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            URLMapPathMatcherPathRuleCustomErrorResponsePolicyErrorResponseRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.errorResponseRules = mapped
    }

    /**
     * @param argument Specifies rules for returning error responses.
     * In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority.
     * For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX).
     * If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.
     * Structure is documented below.
     */
    @JvmName("sururbsctfbwdbwl")
    public suspend fun errorResponseRules(argument: suspend URLMapPathMatcherPathRuleCustomErrorResponsePolicyErrorResponseRuleArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                URLMapPathMatcherPathRuleCustomErrorResponsePolicyErrorResponseRuleArgsBuilder().applySuspend
                    { argument() }.build(),
            )
        val mapped = of(toBeMapped)
        this.errorResponseRules = mapped
    }

    /**
     * @param values Specifies rules for returning error responses.
     * In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority.
     * For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX).
     * If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.
     * Structure is documented below.
     */
    @JvmName("xmhmpsjswfxestrc")
    public suspend fun errorResponseRules(vararg values: URLMapPathMatcherPathRuleCustomErrorResponsePolicyErrorResponseRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.errorResponseRules = mapped
    }

    /**
     * @param value The full or partial URL to the BackendBucket resource that contains the custom error content. Examples are:
     * https://www.googleapis.com/compute/v1/projects/project/global/backendBuckets/myBackendBucket
     * compute/v1/projects/project/global/backendBuckets/myBackendBucket
     * global/backendBuckets/myBackendBucket
     * If errorService is not specified at lower levels like pathMatcher, pathRule and routeRule, an errorService specified at a higher level in the UrlMap will be used. If UrlMap.defaultCustomErrorResponsePolicy contains one or more errorResponseRules[], it must specify errorService.
     * If load balancer cannot reach the backendBucket, a simple Not Found Error will be returned, with the original response code (or overrideResponseCode if configured).
     */
    @JvmName("hmxrakmkeqargnqa")
    public suspend fun errorService(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.errorService = mapped
    }

    internal fun build(): URLMapPathMatcherPathRuleCustomErrorResponsePolicyArgs =
        URLMapPathMatcherPathRuleCustomErrorResponsePolicyArgs(
            errorResponseRules = errorResponseRules,
            errorService = errorService,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy