com.pulumi.kubernetes.autoscaling.v2beta1.kotlin.inputs.PodsMetricSourcePatchArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-kubernetes-kotlin Show documentation
Show all versions of pulumi-kubernetes-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.kubernetes.autoscaling.v2beta1.kotlin.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.kubernetes.autoscaling.v2beta1.inputs.PodsMetricSourcePatchArgs.builder
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.LabelSelectorPatchArgs
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.LabelSelectorPatchArgsBuilder
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.
* @property metricName metricName is the name of the metric in question
* @property selector selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.
* @property targetAverageValue targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)
*/
public data class PodsMetricSourcePatchArgs(
public val metricName: Output? = null,
public val selector: Output? = null,
public val targetAverageValue: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.kubernetes.autoscaling.v2beta1.inputs.PodsMetricSourcePatchArgs = com.pulumi.kubernetes.autoscaling.v2beta1.inputs.PodsMetricSourcePatchArgs.builder()
.metricName(metricName?.applyValue({ args0 -> args0 }))
.selector(selector?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.targetAverageValue(targetAverageValue?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [PodsMetricSourcePatchArgs].
*/
@PulumiTagMarker
public class PodsMetricSourcePatchArgsBuilder internal constructor() {
private var metricName: Output? = null
private var selector: Output? = null
private var targetAverageValue: Output? = null
/**
* @param value metricName is the name of the metric in question
*/
@JvmName("qwrcbhmwcuwucxum")
public suspend fun metricName(`value`: Output) {
this.metricName = value
}
/**
* @param value selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.
*/
@JvmName("ipnofggxnaspgnsx")
public suspend fun selector(`value`: Output) {
this.selector = value
}
/**
* @param value targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)
*/
@JvmName("xfavnmmyduvuambq")
public suspend fun targetAverageValue(`value`: Output) {
this.targetAverageValue = value
}
/**
* @param value metricName is the name of the metric in question
*/
@JvmName("vyqtdouhnfwppecd")
public suspend fun metricName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.metricName = mapped
}
/**
* @param value selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.
*/
@JvmName("mtijumfwyimnnxoe")
public suspend fun selector(`value`: LabelSelectorPatchArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.selector = mapped
}
/**
* @param argument selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.
*/
@JvmName("tjtwsgrkkxrimtgk")
public suspend fun selector(argument: suspend LabelSelectorPatchArgsBuilder.() -> Unit) {
val toBeMapped = LabelSelectorPatchArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.selector = mapped
}
/**
* @param value targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)
*/
@JvmName("pwglprylcotnunpk")
public suspend fun targetAverageValue(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.targetAverageValue = mapped
}
internal fun build(): PodsMetricSourcePatchArgs = PodsMetricSourcePatchArgs(
metricName = metricName,
selector = selector,
targetAverageValue = targetAverageValue,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy