com.pulumi.gcp.networkservices.kotlin.inputs.HttpRouteRuleActionDestinationArgs.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.networkservices.kotlin.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionDestinationArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
*
* @property serviceName The URL of a BackendService to route traffic to.
* @property weight Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports.
* If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend.
* If weights are specified for any one service name, they need to be specified for all of them.
* If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.
*/
public data class HttpRouteRuleActionDestinationArgs(
public val serviceName: Output? = null,
public val weight: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionDestinationArgs =
com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionDestinationArgs.builder()
.serviceName(serviceName?.applyValue({ args0 -> args0 }))
.weight(weight?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [HttpRouteRuleActionDestinationArgs].
*/
@PulumiTagMarker
public class HttpRouteRuleActionDestinationArgsBuilder internal constructor() {
private var serviceName: Output? = null
private var weight: Output? = null
/**
* @param value The URL of a BackendService to route traffic to.
*/
@JvmName("vhdlponbsnclflpx")
public suspend fun serviceName(`value`: Output) {
this.serviceName = value
}
/**
* @param value Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports.
* If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend.
* If weights are specified for any one service name, they need to be specified for all of them.
* If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.
*/
@JvmName("yaimcgnigmweatmk")
public suspend fun weight(`value`: Output) {
this.weight = value
}
/**
* @param value The URL of a BackendService to route traffic to.
*/
@JvmName("gkxqtornkwdaovbv")
public suspend fun serviceName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.serviceName = mapped
}
/**
* @param value Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports.
* If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend.
* If weights are specified for any one service name, they need to be specified for all of them.
* If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.
*/
@JvmName("esdcqndnuvcxxerh")
public suspend fun weight(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.weight = mapped
}
internal fun build(): HttpRouteRuleActionDestinationArgs = HttpRouteRuleActionDestinationArgs(
serviceName = serviceName,
weight = weight,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy