com.pulumi.gcp.compute.kotlin.inputs.URLMapPathMatcherPathRuleRouteActionWeightedBackendServiceArgs.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.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.inputs.URLMapPathMatcherPathRuleRouteActionWeightedBackendServiceArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
*
* @property backendService The full or partial URL to the default BackendService resource. Before forwarding the
* request to backendService, the loadbalancer applies any relevant headerActions
* specified as part of this backendServiceWeight.
* @property headerAction Specifies changes to request and response headers that need to take effect for
* the selected backendService.
* headerAction specified here take effect before headerAction in the enclosing
* HttpRouteRule, PathMatcher and UrlMap.
* Structure is documented below.
* @property weight Specifies the fraction of traffic sent to backendService, computed as
* weight / (sum of all weightedBackendService weights in routeAction) .
* The selection of a backend service is determined only for new traffic. Once a user's request
* has been directed to a backendService, subsequent requests will be sent to the same backendService
* as determined by the BackendService's session affinity policy.
* The value must be between 0 and 1000
*/
public data class URLMapPathMatcherPathRuleRouteActionWeightedBackendServiceArgs(
public val backendService: Output,
public val headerAction: Output? = null,
public val weight: Output,
) :
ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.compute.inputs.URLMapPathMatcherPathRuleRouteActionWeightedBackendServiceArgs =
com.pulumi.gcp.compute.inputs.URLMapPathMatcherPathRuleRouteActionWeightedBackendServiceArgs.builder()
.backendService(backendService.applyValue({ args0 -> args0 }))
.headerAction(headerAction?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.weight(weight.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [URLMapPathMatcherPathRuleRouteActionWeightedBackendServiceArgs].
*/
@PulumiTagMarker
public class URLMapPathMatcherPathRuleRouteActionWeightedBackendServiceArgsBuilder internal constructor() {
private var backendService: Output? = null
private var headerAction:
Output? = null
private var weight: Output? = null
/**
* @param value The full or partial URL to the default BackendService resource. Before forwarding the
* request to backendService, the loadbalancer applies any relevant headerActions
* specified as part of this backendServiceWeight.
*/
@JvmName("irssklkijruudetj")
public suspend fun backendService(`value`: Output) {
this.backendService = value
}
/**
* @param value Specifies changes to request and response headers that need to take effect for
* the selected backendService.
* headerAction specified here take effect before headerAction in the enclosing
* HttpRouteRule, PathMatcher and UrlMap.
* Structure is documented below.
*/
@JvmName("ubosbgjqriwdqdyn")
public suspend fun headerAction(`value`: Output) {
this.headerAction = value
}
/**
* @param value Specifies the fraction of traffic sent to backendService, computed as
* weight / (sum of all weightedBackendService weights in routeAction) .
* The selection of a backend service is determined only for new traffic. Once a user's request
* has been directed to a backendService, subsequent requests will be sent to the same backendService
* as determined by the BackendService's session affinity policy.
* The value must be between 0 and 1000
*/
@JvmName("irrsatybsopnbhtf")
public suspend fun weight(`value`: Output) {
this.weight = value
}
/**
* @param value The full or partial URL to the default BackendService resource. Before forwarding the
* request to backendService, the loadbalancer applies any relevant headerActions
* specified as part of this backendServiceWeight.
*/
@JvmName("gaspttsefpwutnor")
public suspend fun backendService(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.backendService = mapped
}
/**
* @param value Specifies changes to request and response headers that need to take effect for
* the selected backendService.
* headerAction specified here take effect before headerAction in the enclosing
* HttpRouteRule, PathMatcher and UrlMap.
* Structure is documented below.
*/
@JvmName("tlshokedxuoydehi")
public suspend fun headerAction(`value`: URLMapPathMatcherPathRuleRouteActionWeightedBackendServiceHeaderActionArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.headerAction = mapped
}
/**
* @param argument Specifies changes to request and response headers that need to take effect for
* the selected backendService.
* headerAction specified here take effect before headerAction in the enclosing
* HttpRouteRule, PathMatcher and UrlMap.
* Structure is documented below.
*/
@JvmName("fjycdvncupaifgmj")
public suspend fun headerAction(argument: suspend URLMapPathMatcherPathRuleRouteActionWeightedBackendServiceHeaderActionArgsBuilder.() -> Unit) {
val toBeMapped =
URLMapPathMatcherPathRuleRouteActionWeightedBackendServiceHeaderActionArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.headerAction = mapped
}
/**
* @param value Specifies the fraction of traffic sent to backendService, computed as
* weight / (sum of all weightedBackendService weights in routeAction) .
* The selection of a backend service is determined only for new traffic. Once a user's request
* has been directed to a backendService, subsequent requests will be sent to the same backendService
* as determined by the BackendService's session affinity policy.
* The value must be between 0 and 1000
*/
@JvmName("aslihcrwutexdqpi")
public suspend fun weight(`value`: Int) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.weight = mapped
}
internal fun build(): URLMapPathMatcherPathRuleRouteActionWeightedBackendServiceArgs =
URLMapPathMatcherPathRuleRouteActionWeightedBackendServiceArgs(
backendService = backendService ?: throw PulumiNullFieldException("backendService"),
headerAction = headerAction,
weight = weight ?: throw PulumiNullFieldException("weight"),
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy