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

com.pulumi.kubernetes.autoscaling.v2beta2.kotlin.outputs.ContainerResourceMetricSourcePatch.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.outputs

import kotlin.String
import kotlin.Suppress

/**
 * 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 target target specifies the target value for the given metric
 */
public data class ContainerResourceMetricSourcePatch(
    public val container: String? = null,
    public val name: String? = null,
    public val target: MetricTargetPatch? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.kubernetes.autoscaling.v2beta2.outputs.ContainerResourceMetricSourcePatch): ContainerResourceMetricSourcePatch = ContainerResourceMetricSourcePatch(
            container = javaType.container().map({ args0 -> args0 }).orElse(null),
            name = javaType.name().map({ args0 -> args0 }).orElse(null),
            target = javaType.target().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.kubernetes.autoscaling.v2beta2.kotlin.outputs.MetricTargetPatch.Companion.toKotlin(args0)
                })
            }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy