![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.gcp.compute.kotlin.outputs.URLMapDefaultCustomErrorResponsePolicy.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.compute.kotlin.outputs
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
/**
*
* @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 URLMapDefaultCustomErrorResponsePolicy(
public val errorResponseRules: List? =
null,
public val errorService: String? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.gcp.compute.outputs.URLMapDefaultCustomErrorResponsePolicy): URLMapDefaultCustomErrorResponsePolicy = URLMapDefaultCustomErrorResponsePolicy(
errorResponseRules = javaType.errorResponseRules().map({ args0 ->
args0.let({ args0 ->
com.pulumi.gcp.compute.kotlin.outputs.URLMapDefaultCustomErrorResponsePolicyErrorResponseRule.Companion.toKotlin(args0)
})
}),
errorService = javaType.errorService().map({ args0 -> args0 }).orElse(null),
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy