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

com.pulumi.gcp.networkservices.kotlin.inputs.TcpRouteRuleActionDestinationArgs.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.12.0.0
Show newest version
@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.TcpRouteRuleActionDestinationArgs.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 TcpRouteRuleActionDestinationArgs(
    public val serviceName: Output? = null,
    public val weight: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.networkservices.inputs.TcpRouteRuleActionDestinationArgs =
        com.pulumi.gcp.networkservices.inputs.TcpRouteRuleActionDestinationArgs.builder()
            .serviceName(serviceName?.applyValue({ args0 -> args0 }))
            .weight(weight?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [TcpRouteRuleActionDestinationArgs].
 */
@PulumiTagMarker
public class TcpRouteRuleActionDestinationArgsBuilder internal constructor() {
    private var serviceName: Output? = null

    private var weight: Output? = null

    /**
     * @param value The URL of a BackendService to route traffic to.
     */
    @JvmName("invbetiojsjjspsj")
    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("bcloahnrljffwxye")
    public suspend fun weight(`value`: Output) {
        this.weight = value
    }

    /**
     * @param value The URL of a BackendService to route traffic to.
     */
    @JvmName("ljxqhobjhtjhcull")
    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("ccmqutxnhxkayuhs")
    public suspend fun weight(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.weight = mapped
    }

    internal fun build(): TcpRouteRuleActionDestinationArgs = TcpRouteRuleActionDestinationArgs(
        serviceName = serviceName,
        weight = weight,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy