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

com.pulumi.kubernetes.autoscaling.v2beta2.kotlin.inputs.ResourceMetricSourcePatchArgs.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.

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

/**
 * ResourceMetricSource 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 name name is the name of the resource in question.
 * @property target target specifies the target value for the given metric
 */
public data class ResourceMetricSourcePatchArgs(
    public val name: Output? = null,
    public val target: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.autoscaling.v2beta2.inputs.ResourceMetricSourcePatchArgs =
        com.pulumi.kubernetes.autoscaling.v2beta2.inputs.ResourceMetricSourcePatchArgs.builder()
            .name(name?.applyValue({ args0 -> args0 }))
            .target(target?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [ResourceMetricSourcePatchArgs].
 */
@PulumiTagMarker
public class ResourceMetricSourcePatchArgsBuilder internal constructor() {
    private var name: Output? = null

    private var target: Output? = null

    /**
     * @param value name is the name of the resource in question.
     */
    @JvmName("jkgashjsdxnabvlv")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value target specifies the target value for the given metric
     */
    @JvmName("ymmyysbtrxstekbo")
    public suspend fun target(`value`: Output) {
        this.target = value
    }

    /**
     * @param value name is the name of the resource in question.
     */
    @JvmName("ymbmutcyikxljgxo")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value target specifies the target value for the given metric
     */
    @JvmName("rwcgowdkpmwyjvix")
    public suspend fun target(`value`: MetricTargetPatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.target = mapped
    }

    /**
     * @param argument target specifies the target value for the given metric
     */
    @JvmName("dytsrmsxknjdsgwk")
    public suspend fun target(argument: suspend MetricTargetPatchArgsBuilder.() -> Unit) {
        val toBeMapped = MetricTargetPatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.target = mapped
    }

    internal fun build(): ResourceMetricSourcePatchArgs = ResourceMetricSourcePatchArgs(
        name = name,
        target = target,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy