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

com.pulumi.kubernetes.autoscaling.v2beta1.kotlin.inputs.ResourceMetricStatusArgs.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.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kubernetes.autoscaling.v2beta1.inputs.ResourceMetricStatusArgs.builder
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * ResourceMetricStatus indicates the current value of 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).  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 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 ResourceMetricStatusArgs(
    public val currentAverageUtilization: Output? = null,
    public val currentAverageValue: Output,
    public val name: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.autoscaling.v2beta1.inputs.ResourceMetricStatusArgs =
        com.pulumi.kubernetes.autoscaling.v2beta1.inputs.ResourceMetricStatusArgs.builder()
            .currentAverageUtilization(currentAverageUtilization?.applyValue({ args0 -> args0 }))
            .currentAverageValue(currentAverageValue.applyValue({ args0 -> args0 }))
            .name(name.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ResourceMetricStatusArgs].
 */
@PulumiTagMarker
public class ResourceMetricStatusArgsBuilder internal constructor() {
    private var currentAverageUtilization: Output? = null

    private var currentAverageValue: Output? = null

    private var name: Output? = null

    /**
     * @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("gieylpkhvnacoaxl")
    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("jwyltnhjcjdrytds")
    public suspend fun currentAverageValue(`value`: Output) {
        this.currentAverageValue = value
    }

    /**
     * @param value name is the name of the resource in question.
     */
    @JvmName("alaufmtqvjqsdkay")
    public suspend fun name(`value`: Output) {
        this.name = 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("exkjynhdhewacdsr")
    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("bgfcymrkkurqlcpm")
    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("eqqiiyteidoylyuq")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    internal fun build(): ResourceMetricStatusArgs = ResourceMetricStatusArgs(
        currentAverageUtilization = currentAverageUtilization,
        currentAverageValue = currentAverageValue ?: throw PulumiNullFieldException("currentAverageValue"),
        name = name ?: throw PulumiNullFieldException("name"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy