All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.kubernetes.autoscaling.v2beta1.kotlin.inputs.ContainerResourceMetricSourcePatchArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 4.18.2.0
Show 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.kubernetes.autoscaling.v2beta1.inputs.ContainerResourceMetricSourcePatchArgs.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 ContainerResourceMetricSourcePatchArgs(
    public val container: Output? = null,
    public val name: Output? = null,
    public val targetAverageUtilization: Output? = null,
    public val targetAverageValue: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.autoscaling.v2beta1.inputs.ContainerResourceMetricSourcePatchArgs =
        com.pulumi.kubernetes.autoscaling.v2beta1.inputs.ContainerResourceMetricSourcePatchArgs.builder()
            .container(container?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .targetAverageUtilization(targetAverageUtilization?.applyValue({ args0 -> args0 }))
            .targetAverageValue(targetAverageValue?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ContainerResourceMetricSourcePatchArgs].
 */
@PulumiTagMarker
public class ContainerResourceMetricSourcePatchArgsBuilder 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("qgonbnmrnkqanggv")
    public suspend fun container(`value`: Output) {
        this.container = value
    }

    /**
     * @param value name is the name of the resource in question.
     */
    @JvmName("lwdgnkorcjflrfbg")
    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("txmwgafckwecjhnf")
    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("hjyrtvocacalknle")
    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("upmgijvyswxiidoy")
    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("fbcnkuvekcxfiiws")
    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("udicxgirpgwmxuav")
    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("audbojheruqktkrj")
    public suspend fun targetAverageValue(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetAverageValue = mapped
    }

    internal fun build(): ContainerResourceMetricSourcePatchArgs =
        ContainerResourceMetricSourcePatchArgs(
            container = container,
            name = name,
            targetAverageUtilization = targetAverageUtilization,
            targetAverageValue = targetAverageValue,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy