com.pulumi.gcp.networkservices.kotlin.outputs.HttpRouteRuleActionDestination.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.outputs
import kotlin.Int
import kotlin.String
import kotlin.Suppress
/**
*
* @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 HttpRouteRuleActionDestination(
public val serviceName: String? = null,
public val weight: Int? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.gcp.networkservices.outputs.HttpRouteRuleActionDestination): HttpRouteRuleActionDestination = HttpRouteRuleActionDestination(
serviceName = javaType.serviceName().map({ args0 -> args0 }).orElse(null),
weight = javaType.weight().map({ args0 -> args0 }).orElse(null),
)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy