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

com.pulumi.kubernetes.autoscaling.v2beta2.kotlin.inputs.MetricStatusArgs.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.v2beta2.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.kotlin.applySuspend
import com.pulumi.kubernetes.autoscaling.v2beta2.inputs.MetricStatusArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * MetricStatus describes the last-read state of a single metric.
 * @property containerResource container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes 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 external external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).
 * @property object object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).
 * @property pods pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second).  The values will be averaged together before being compared to the target value.
 * @property resource resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes 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 type type is the type of metric source.  It will be one of "Object", "Pods" or "Resource", each corresponds to a matching field in the object.
 */
public data class MetricStatusArgs(
    public val containerResource: Output? = null,
    public val `external`: Output? = null,
    public val `object`: Output? = null,
    public val pods: Output? = null,
    public val resource: Output? = null,
    public val type: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.autoscaling.v2beta2.inputs.MetricStatusArgs =
        com.pulumi.kubernetes.autoscaling.v2beta2.inputs.MetricStatusArgs.builder()
            .containerResource(containerResource?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .`external`(`external`?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .`object`(`object`?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .pods(pods?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resource(resource?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .type(type.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [MetricStatusArgs].
 */
@PulumiTagMarker
public class MetricStatusArgsBuilder internal constructor() {
    private var containerResource: Output? = null

    private var `external`: Output? = null

    private var `object`: Output? = null

    private var pods: Output? = null

    private var resource: Output? = null

    private var type: Output? = null

    /**
     * @param value container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes 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.
     */
    @JvmName("iglpdwusaxcwjaax")
    public suspend fun containerResource(`value`: Output) {
        this.containerResource = value
    }

    /**
     * @param value external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).
     */
    @JvmName("shlmtyjfoqqvqncy")
    public suspend fun `external`(`value`: Output) {
        this.`external` = value
    }

    /**
     * @param value object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).
     */
    @JvmName("vxiwhjwonfmojjnx")
    public suspend fun `object`(`value`: Output) {
        this.`object` = value
    }

    /**
     * @param value pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second).  The values will be averaged together before being compared to the target value.
     */
    @JvmName("mxdjuqknpxejotrj")
    public suspend fun pods(`value`: Output) {
        this.pods = value
    }

    /**
     * @param value resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes 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.
     */
    @JvmName("nhxrxoclfmoeujfb")
    public suspend fun resource(`value`: Output) {
        this.resource = value
    }

    /**
     * @param value type is the type of metric source.  It will be one of "Object", "Pods" or "Resource", each corresponds to a matching field in the object.
     */
    @JvmName("xeeprwlhxmglqlag")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes 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.
     */
    @JvmName("xbhtkolulbtoiwik")
    public suspend fun containerResource(`value`: ContainerResourceMetricStatusArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.containerResource = mapped
    }

    /**
     * @param argument container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes 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.
     */
    @JvmName("vbgaelypbfpfglcq")
    public suspend fun containerResource(argument: suspend ContainerResourceMetricStatusArgsBuilder.() -> Unit) {
        val toBeMapped = ContainerResourceMetricStatusArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.containerResource = mapped
    }

    /**
     * @param value external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).
     */
    @JvmName("spyluvdolhuqtvee")
    public suspend fun `external`(`value`: ExternalMetricStatusArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.`external` = mapped
    }

    /**
     * @param argument external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).
     */
    @JvmName("rnvwwfcuoyswnuek")
    public suspend fun `external`(argument: suspend ExternalMetricStatusArgsBuilder.() -> Unit) {
        val toBeMapped = ExternalMetricStatusArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.`external` = mapped
    }

    /**
     * @param value object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).
     */
    @JvmName("arktxlqafqcinxfl")
    public suspend fun `object`(`value`: ObjectMetricStatusArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.`object` = mapped
    }

    /**
     * @param argument object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).
     */
    @JvmName("oihupvphuxiyrmud")
    public suspend fun `object`(argument: suspend ObjectMetricStatusArgsBuilder.() -> Unit) {
        val toBeMapped = ObjectMetricStatusArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.`object` = mapped
    }

    /**
     * @param value pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second).  The values will be averaged together before being compared to the target value.
     */
    @JvmName("ooqrpdaxpsbyjwwj")
    public suspend fun pods(`value`: PodsMetricStatusArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pods = mapped
    }

    /**
     * @param argument pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second).  The values will be averaged together before being compared to the target value.
     */
    @JvmName("dexvooufpwejthsv")
    public suspend fun pods(argument: suspend PodsMetricStatusArgsBuilder.() -> Unit) {
        val toBeMapped = PodsMetricStatusArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.pods = mapped
    }

    /**
     * @param value resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes 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.
     */
    @JvmName("tdadsfnnveewftsp")
    public suspend fun resource(`value`: ResourceMetricStatusArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resource = mapped
    }

    /**
     * @param argument resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes 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.
     */
    @JvmName("gtabdnmtrntbfleg")
    public suspend fun resource(argument: suspend ResourceMetricStatusArgsBuilder.() -> Unit) {
        val toBeMapped = ResourceMetricStatusArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.resource = mapped
    }

    /**
     * @param value type is the type of metric source.  It will be one of "Object", "Pods" or "Resource", each corresponds to a matching field in the object.
     */
    @JvmName("knmnpbagdnmgltqq")
    public suspend fun type(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): MetricStatusArgs = MetricStatusArgs(
        containerResource = containerResource,
        `external` = `external`,
        `object` = `object`,
        pods = pods,
        resource = resource,
        type = type ?: throw PulumiNullFieldException("type"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy