com.pulumi.kubernetes.autoscaling.v2beta1.kotlin.inputs.ContainerResourceMetricSourceArgs.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.ContainerResourceMetricSourceArgs.builder
import kotlin.Int
import kotlin.String
import kotlin.Suppress
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 targetAverageUtilization targetAverageUtilization is the target 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.
* @property targetAverageValue targetAverageValue is the target 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.
*/
public data class ContainerResourceMetricSourceArgs(
public val container: Output,
public val name: Output,
public val targetAverageUtilization: Output? = null,
public val targetAverageValue: Output? = null,
) :
ConvertibleToJava {
override fun toJava(): com.pulumi.kubernetes.autoscaling.v2beta1.inputs.ContainerResourceMetricSourceArgs =
com.pulumi.kubernetes.autoscaling.v2beta1.inputs.ContainerResourceMetricSourceArgs.builder()
.container(container.applyValue({ args0 -> args0 }))
.name(name.applyValue({ args0 -> args0 }))
.targetAverageUtilization(targetAverageUtilization?.applyValue({ args0 -> args0 }))
.targetAverageValue(targetAverageValue?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ContainerResourceMetricSourceArgs].
*/
@PulumiTagMarker
public class ContainerResourceMetricSourceArgsBuilder internal constructor() {
private var container: Output? = null
private var name: Output? = null
private var targetAverageUtilization: Output? = null
private var targetAverageValue: Output? = null
/**
* @param value container is the name of the container in the pods of the scaling target
*/
@JvmName("povtyysqluhobjbl")
public suspend fun container(`value`: Output) {
this.container = value
}
/**
* @param value name is the name of the resource in question.
*/
@JvmName("uqrdkvtofdocqeym")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value targetAverageUtilization is the target 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.
*/
@JvmName("aywujsoybiorhire")
public suspend fun targetAverageUtilization(`value`: Output) {
this.targetAverageUtilization = value
}
/**
* @param value targetAverageValue is the target 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.
*/
@JvmName("esmwinxwpgkcqgtb")
public suspend fun targetAverageValue(`value`: Output) {
this.targetAverageValue = value
}
/**
* @param value container is the name of the container in the pods of the scaling target
*/
@JvmName("eichpbammxnfrlsl")
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("whjpwanfbexpbvlo")
public suspend fun name(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value targetAverageUtilization is the target 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.
*/
@JvmName("qrmqfejpioatxejg")
public suspend fun targetAverageUtilization(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.targetAverageUtilization = mapped
}
/**
* @param value targetAverageValue is the target 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.
*/
@JvmName("uqcidhmcrlmdyeac")
public suspend fun targetAverageValue(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.targetAverageValue = mapped
}
internal fun build(): ContainerResourceMetricSourceArgs = ContainerResourceMetricSourceArgs(
container = container ?: throw PulumiNullFieldException("container"),
name = name ?: throw PulumiNullFieldException("name"),
targetAverageUtilization = targetAverageUtilization,
targetAverageValue = targetAverageValue,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy