com.pulumi.kubernetes.autoscaling.v2beta1.kotlin.inputs.PodsMetricStatusArgs.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.
The newest version!
@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.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.kubernetes.autoscaling.v2beta1.inputs.PodsMetricStatusArgs.builder
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.LabelSelectorArgs
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.LabelSelectorArgsBuilder
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).
* @property currentAverageValue currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)
* @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 in the PodsMetricSource, 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.
*/
public data class PodsMetricStatusArgs(
public val currentAverageValue: Output,
public val metricName: Output,
public val selector: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.kubernetes.autoscaling.v2beta1.inputs.PodsMetricStatusArgs =
com.pulumi.kubernetes.autoscaling.v2beta1.inputs.PodsMetricStatusArgs.builder()
.currentAverageValue(currentAverageValue.applyValue({ args0 -> args0 }))
.metricName(metricName.applyValue({ args0 -> args0 }))
.selector(selector?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}
/**
* Builder for [PodsMetricStatusArgs].
*/
@PulumiTagMarker
public class PodsMetricStatusArgsBuilder internal constructor() {
private var currentAverageValue: Output? = null
private var metricName: Output? = null
private var selector: Output? = null
/**
* @param value currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)
*/
@JvmName("kltiacodfvcjwutb")
public suspend fun currentAverageValue(`value`: Output) {
this.currentAverageValue = value
}
/**
* @param value metricName is the name of the metric in question
*/
@JvmName("sxjpyfushiemuixv")
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 in the PodsMetricSource, 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("xtgycyjmxvsaogbs")
public suspend fun selector(`value`: Output) {
this.selector = value
}
/**
* @param value currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)
*/
@JvmName("pnlfskoktxejcaxn")
public suspend fun currentAverageValue(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.currentAverageValue = mapped
}
/**
* @param value metricName is the name of the metric in question
*/
@JvmName("cifsxhqvnntufmys")
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 in the PodsMetricSource, 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("fuhrqqgichrlxdln")
public suspend fun selector(`value`: LabelSelectorArgs?) {
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 in the PodsMetricSource, 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("cdyuqgdohcxnmpiq")
public suspend fun selector(argument: suspend LabelSelectorArgsBuilder.() -> Unit) {
val toBeMapped = LabelSelectorArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.selector = mapped
}
internal fun build(): PodsMetricStatusArgs = PodsMetricStatusArgs(
currentAverageValue = currentAverageValue ?: throw PulumiNullFieldException("currentAverageValue"),
metricName = metricName ?: throw PulumiNullFieldException("metricName"),
selector = selector,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy