com.pulumi.kubernetes.autoscaling.v2beta2.kotlin.inputs.ContainerResourceMetricSourcePatchArgs.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.v2beta2.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.v2beta2.inputs.ContainerResourceMetricSourcePatchArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. Only one "target" type should be set.
* @property container container is the name of the container in the pods of the scaling target
* @property name name is the name of the resource in question.
* @property target target specifies the target value for the given metric
*/
public data class ContainerResourceMetricSourcePatchArgs(
public val container: Output? = null,
public val name: Output? = null,
public val target: Output? = null,
) :
ConvertibleToJava {
override fun toJava(): com.pulumi.kubernetes.autoscaling.v2beta2.inputs.ContainerResourceMetricSourcePatchArgs =
com.pulumi.kubernetes.autoscaling.v2beta2.inputs.ContainerResourceMetricSourcePatchArgs.builder()
.container(container?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.target(target?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}
/**
* Builder for [ContainerResourceMetricSourcePatchArgs].
*/
@PulumiTagMarker
public class ContainerResourceMetricSourcePatchArgsBuilder internal constructor() {
private var container: Output? = null
private var name: Output? = null
private var target: Output? = null
/**
* @param value container is the name of the container in the pods of the scaling target
*/
@JvmName("kckkerysdeijvdqs")
public suspend fun container(`value`: Output) {
this.container = value
}
/**
* @param value name is the name of the resource in question.
*/
@JvmName("dhsoqhmyucrrubav")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value target specifies the target value for the given metric
*/
@JvmName("ygigvcuihopvobvh")
public suspend fun target(`value`: Output) {
this.target = value
}
/**
* @param value container is the name of the container in the pods of the scaling target
*/
@JvmName("sdgxwjmtidphdpbu")
public suspend fun container(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.container = mapped
}
/**
* @param value name is the name of the resource in question.
*/
@JvmName("gceifcegxayoouci")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value target specifies the target value for the given metric
*/
@JvmName("qkxwrcamwbqeirir")
public suspend fun target(`value`: MetricTargetPatchArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.target = mapped
}
/**
* @param argument target specifies the target value for the given metric
*/
@JvmName("tuaedbofkvmrkxrx")
public suspend fun target(argument: suspend MetricTargetPatchArgsBuilder.() -> Unit) {
val toBeMapped = MetricTargetPatchArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.target = mapped
}
internal fun build(): ContainerResourceMetricSourcePatchArgs =
ContainerResourceMetricSourcePatchArgs(
container = container,
name = name,
target = target,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy