com.pulumi.awsnative.vpclattice.kotlin.inputs.RuleWeightedTargetGroupArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-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.awsnative.vpclattice.kotlin.inputs
import com.pulumi.awsnative.vpclattice.inputs.RuleWeightedTargetGroupArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
*
* @property targetGroupIdentifier The ID of the target group.
* @property weight Only required if you specify multiple target groups for a forward action. The weight determines how requests are distributed to the target group. For example, if you specify two target groups, each with a weight of 10, each target group receives half the requests. If you specify two target groups, one with a weight of 10 and the other with a weight of 20, the target group with a weight of 20 receives twice as many requests as the other target group. If there's only one target group specified, then the default value is 100.
*/
public data class RuleWeightedTargetGroupArgs(
public val targetGroupIdentifier: Output,
public val weight: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.vpclattice.inputs.RuleWeightedTargetGroupArgs =
com.pulumi.awsnative.vpclattice.inputs.RuleWeightedTargetGroupArgs.builder()
.targetGroupIdentifier(targetGroupIdentifier.applyValue({ args0 -> args0 }))
.weight(weight?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [RuleWeightedTargetGroupArgs].
*/
@PulumiTagMarker
public class RuleWeightedTargetGroupArgsBuilder internal constructor() {
private var targetGroupIdentifier: Output? = null
private var weight: Output? = null
/**
* @param value The ID of the target group.
*/
@JvmName("xgdhigcrateifcif")
public suspend fun targetGroupIdentifier(`value`: Output) {
this.targetGroupIdentifier = value
}
/**
* @param value Only required if you specify multiple target groups for a forward action. The weight determines how requests are distributed to the target group. For example, if you specify two target groups, each with a weight of 10, each target group receives half the requests. If you specify two target groups, one with a weight of 10 and the other with a weight of 20, the target group with a weight of 20 receives twice as many requests as the other target group. If there's only one target group specified, then the default value is 100.
*/
@JvmName("qliqeoaocqtrgejm")
public suspend fun weight(`value`: Output) {
this.weight = value
}
/**
* @param value The ID of the target group.
*/
@JvmName("kmgegoevmdycwsss")
public suspend fun targetGroupIdentifier(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.targetGroupIdentifier = mapped
}
/**
* @param value Only required if you specify multiple target groups for a forward action. The weight determines how requests are distributed to the target group. For example, if you specify two target groups, each with a weight of 10, each target group receives half the requests. If you specify two target groups, one with a weight of 10 and the other with a weight of 20, the target group with a weight of 20 receives twice as many requests as the other target group. If there's only one target group specified, then the default value is 100.
*/
@JvmName("yilsfqxhootocsxs")
public suspend fun weight(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.weight = mapped
}
internal fun build(): RuleWeightedTargetGroupArgs = RuleWeightedTargetGroupArgs(
targetGroupIdentifier = targetGroupIdentifier ?: throw
PulumiNullFieldException("targetGroupIdentifier"),
weight = weight,
)
}