com.pulumi.kubernetes.autoscaling.v2beta1.kotlin.inputs.ExternalMetricSourcePatchArgs.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.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.kubernetes.autoscaling.v2beta1.inputs.ExternalMetricSourcePatchArgs.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
/**
* ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). Exactly one "target" type should be set.
* @property metricName metricName is the name of the metric in question.
* @property metricSelector metricSelector is used to identify a specific time series within a given metric.
* @property targetAverageValue targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.
* @property targetValue targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.
*/
public data class ExternalMetricSourcePatchArgs(
public val metricName: Output? = null,
public val metricSelector: Output? = null,
public val targetAverageValue: Output? = null,
public val targetValue: Output? = null,
) :
ConvertibleToJava {
override fun toJava(): com.pulumi.kubernetes.autoscaling.v2beta1.inputs.ExternalMetricSourcePatchArgs =
com.pulumi.kubernetes.autoscaling.v2beta1.inputs.ExternalMetricSourcePatchArgs.builder()
.metricName(metricName?.applyValue({ args0 -> args0 }))
.metricSelector(metricSelector?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.targetAverageValue(targetAverageValue?.applyValue({ args0 -> args0 }))
.targetValue(targetValue?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ExternalMetricSourcePatchArgs].
*/
@PulumiTagMarker
public class ExternalMetricSourcePatchArgsBuilder internal constructor() {
private var metricName: Output? = null
private var metricSelector: Output? = null
private var targetAverageValue: Output? = null
private var targetValue: Output? = null
/**
* @param value metricName is the name of the metric in question.
*/
@JvmName("ugveaurvnkqtheuu")
public suspend fun metricName(`value`: Output) {
this.metricName = value
}
/**
* @param value metricSelector is used to identify a specific time series within a given metric.
*/
@JvmName("xsbhvokntvmjwvpo")
public suspend fun metricSelector(`value`: Output) {
this.metricSelector = value
}
/**
* @param value targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.
*/
@JvmName("fsxhymggydaenxmq")
public suspend fun targetAverageValue(`value`: Output) {
this.targetAverageValue = value
}
/**
* @param value targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.
*/
@JvmName("uvgoknlbyovefbis")
public suspend fun targetValue(`value`: Output) {
this.targetValue = value
}
/**
* @param value metricName is the name of the metric in question.
*/
@JvmName("qnljyqtfwrglaamx")
public suspend fun metricName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.metricName = mapped
}
/**
* @param value metricSelector is used to identify a specific time series within a given metric.
*/
@JvmName("sjqtjdqcohtcgqcy")
public suspend fun metricSelector(`value`: LabelSelectorPatchArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.metricSelector = mapped
}
/**
* @param argument metricSelector is used to identify a specific time series within a given metric.
*/
@JvmName("yunobmpulydkxgpb")
public suspend fun metricSelector(argument: suspend LabelSelectorPatchArgsBuilder.() -> Unit) {
val toBeMapped = LabelSelectorPatchArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.metricSelector = mapped
}
/**
* @param value targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.
*/
@JvmName("ojgsxnnodtxjisuh")
public suspend fun targetAverageValue(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.targetAverageValue = mapped
}
/**
* @param value targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.
*/
@JvmName("qkyygssiivusdflk")
public suspend fun targetValue(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.targetValue = mapped
}
internal fun build(): ExternalMetricSourcePatchArgs = ExternalMetricSourcePatchArgs(
metricName = metricName,
metricSelector = metricSelector,
targetAverageValue = targetAverageValue,
targetValue = targetValue,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy