com.pulumi.kubernetes.autoscaling.v2beta1.kotlin.inputs.ContainerResourceMetricStatusArgs.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.kubernetes.autoscaling.v2beta1.inputs.ContainerResourceMetricStatusArgs.builder
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory). 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.
* @property container container is the name of the container in the pods of the scaling target
* @property currentAverageUtilization currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.
* @property currentAverageValue currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the "pods" metric source type. It will always be set, regardless of the corresponding metric specification.
* @property name name is the name of the resource in question.
*/
public data class ContainerResourceMetricStatusArgs(
public val container: Output,
public val currentAverageUtilization: Output? = null,
public val currentAverageValue: Output,
public val name: Output,
) :
ConvertibleToJava {
override fun toJava(): com.pulumi.kubernetes.autoscaling.v2beta1.inputs.ContainerResourceMetricStatusArgs =
com.pulumi.kubernetes.autoscaling.v2beta1.inputs.ContainerResourceMetricStatusArgs.builder()
.container(container.applyValue({ args0 -> args0 }))
.currentAverageUtilization(currentAverageUtilization?.applyValue({ args0 -> args0 }))
.currentAverageValue(currentAverageValue.applyValue({ args0 -> args0 }))
.name(name.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ContainerResourceMetricStatusArgs].
*/
@PulumiTagMarker
public class ContainerResourceMetricStatusArgsBuilder internal constructor() {
private var container: Output? = null
private var currentAverageUtilization: Output? = null
private var currentAverageValue: Output? = null
private var name: Output? = null
/**
* @param value container is the name of the container in the pods of the scaling target
*/
@JvmName("tumklcrxfxvekcfi")
public suspend fun container(`value`: Output) {
this.container = value
}
/**
* @param value currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.
*/
@JvmName("jdwcauildcjsjpuf")
public suspend fun currentAverageUtilization(`value`: Output) {
this.currentAverageUtilization = value
}
/**
* @param value currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the "pods" metric source type. It will always be set, regardless of the corresponding metric specification.
*/
@JvmName("cxgyiojhwofgdhke")
public suspend fun currentAverageValue(`value`: Output) {
this.currentAverageValue = value
}
/**
* @param value name is the name of the resource in question.
*/
@JvmName("yjhyreiohuagemxf")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value container is the name of the container in the pods of the scaling target
*/
@JvmName("lmtrkyqnxhfpaqjj")
public suspend fun container(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.container = mapped
}
/**
* @param value currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.
*/
@JvmName("vonnrgfkahyqlxpf")
public suspend fun currentAverageUtilization(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.currentAverageUtilization = mapped
}
/**
* @param value currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the "pods" metric source type. It will always be set, regardless of the corresponding metric specification.
*/
@JvmName("nribkdwcgiwodctp")
public suspend fun currentAverageValue(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.currentAverageValue = mapped
}
/**
* @param value name is the name of the resource in question.
*/
@JvmName("gpcutmubkpmeklax")
public suspend fun name(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.name = mapped
}
internal fun build(): ContainerResourceMetricStatusArgs = ContainerResourceMetricStatusArgs(
container = container ?: throw PulumiNullFieldException("container"),
currentAverageUtilization = currentAverageUtilization,
currentAverageValue = currentAverageValue ?: throw PulumiNullFieldException("currentAverageValue"),
name = name ?: throw PulumiNullFieldException("name"),
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy