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

com.pulumi.alicloud.cs.kotlin.KubernetesAutoscalerArgs.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: 3.62.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.alicloud.cs.kotlin

import com.pulumi.alicloud.cs.KubernetesAutoscalerArgs.builder
import com.pulumi.alicloud.cs.kotlin.inputs.KubernetesAutoscalerNodepoolArgs
import com.pulumi.alicloud.cs.kotlin.inputs.KubernetesAutoscalerNodepoolArgsBuilder
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 kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property clusterId The id of kubernetes cluster.
 * @property coolDownDuration The cool_down_duration option of cluster-autoscaler.
 * @property deferScaleInDuration The defer_scale_in_duration option of cluster-autoscaler.
 * @property nodepools The list of the node pools. See `nodepools` below.
 * @property useEcsRamRoleToken Enable autoscaler access to alibabacloud service by ecs ramrole token. default: false
 * @property utilization The utilization option of cluster-autoscaler.
 */
public data class KubernetesAutoscalerArgs(
    public val clusterId: Output? = null,
    public val coolDownDuration: Output? = null,
    public val deferScaleInDuration: Output? = null,
    public val nodepools: Output>? = null,
    public val useEcsRamRoleToken: Output? = null,
    public val utilization: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.alicloud.cs.KubernetesAutoscalerArgs =
        com.pulumi.alicloud.cs.KubernetesAutoscalerArgs.builder()
            .clusterId(clusterId?.applyValue({ args0 -> args0 }))
            .coolDownDuration(coolDownDuration?.applyValue({ args0 -> args0 }))
            .deferScaleInDuration(deferScaleInDuration?.applyValue({ args0 -> args0 }))
            .nodepools(
                nodepools?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .useEcsRamRoleToken(useEcsRamRoleToken?.applyValue({ args0 -> args0 }))
            .utilization(utilization?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [KubernetesAutoscalerArgs].
 */
@PulumiTagMarker
public class KubernetesAutoscalerArgsBuilder internal constructor() {
    private var clusterId: Output? = null

    private var coolDownDuration: Output? = null

    private var deferScaleInDuration: Output? = null

    private var nodepools: Output>? = null

    private var useEcsRamRoleToken: Output? = null

    private var utilization: Output? = null

    /**
     * @param value The id of kubernetes cluster.
     */
    @JvmName("ehemgloktnqrnuwc")
    public suspend fun clusterId(`value`: Output) {
        this.clusterId = value
    }

    /**
     * @param value The cool_down_duration option of cluster-autoscaler.
     */
    @JvmName("tswqymewwwwstbje")
    public suspend fun coolDownDuration(`value`: Output) {
        this.coolDownDuration = value
    }

    /**
     * @param value The defer_scale_in_duration option of cluster-autoscaler.
     */
    @JvmName("evcbdgwfeywsaflc")
    public suspend fun deferScaleInDuration(`value`: Output) {
        this.deferScaleInDuration = value
    }

    /**
     * @param value The list of the node pools. See `nodepools` below.
     */
    @JvmName("hpnkuknagirxnmwh")
    public suspend fun nodepools(`value`: Output>) {
        this.nodepools = value
    }

    @JvmName("oavgaxcjdroayojv")
    public suspend fun nodepools(vararg values: Output) {
        this.nodepools = Output.all(values.asList())
    }

    /**
     * @param values The list of the node pools. See `nodepools` below.
     */
    @JvmName("xrgjxpyehtalmfna")
    public suspend fun nodepools(values: List>) {
        this.nodepools = Output.all(values)
    }

    /**
     * @param value Enable autoscaler access to alibabacloud service by ecs ramrole token. default: false
     */
    @JvmName("yugpnselckcdqhpu")
    public suspend fun useEcsRamRoleToken(`value`: Output) {
        this.useEcsRamRoleToken = value
    }

    /**
     * @param value The utilization option of cluster-autoscaler.
     */
    @JvmName("dkqmhiyilbcbvobu")
    public suspend fun utilization(`value`: Output) {
        this.utilization = value
    }

    /**
     * @param value The id of kubernetes cluster.
     */
    @JvmName("kldshvlykaltmqwy")
    public suspend fun clusterId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clusterId = mapped
    }

    /**
     * @param value The cool_down_duration option of cluster-autoscaler.
     */
    @JvmName("iggwsvuxpnbitsuj")
    public suspend fun coolDownDuration(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.coolDownDuration = mapped
    }

    /**
     * @param value The defer_scale_in_duration option of cluster-autoscaler.
     */
    @JvmName("hoqevhufcxyadbhq")
    public suspend fun deferScaleInDuration(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deferScaleInDuration = mapped
    }

    /**
     * @param value The list of the node pools. See `nodepools` below.
     */
    @JvmName("mlsfobrwenutyked")
    public suspend fun nodepools(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.nodepools = mapped
    }

    /**
     * @param argument The list of the node pools. See `nodepools` below.
     */
    @JvmName("wkksiyffycgsknqt")
    public suspend fun nodepools(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            KubernetesAutoscalerNodepoolArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.nodepools = mapped
    }

    /**
     * @param argument The list of the node pools. See `nodepools` below.
     */
    @JvmName("idaasnpcbeepekoj")
    public suspend fun nodepools(vararg argument: suspend KubernetesAutoscalerNodepoolArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            KubernetesAutoscalerNodepoolArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.nodepools = mapped
    }

    /**
     * @param argument The list of the node pools. See `nodepools` below.
     */
    @JvmName("vccqdajkusvpbsou")
    public suspend fun nodepools(argument: suspend KubernetesAutoscalerNodepoolArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            KubernetesAutoscalerNodepoolArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.nodepools = mapped
    }

    /**
     * @param values The list of the node pools. See `nodepools` below.
     */
    @JvmName("irlxqrjklsgegdje")
    public suspend fun nodepools(vararg values: KubernetesAutoscalerNodepoolArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.nodepools = mapped
    }

    /**
     * @param value Enable autoscaler access to alibabacloud service by ecs ramrole token. default: false
     */
    @JvmName("miuyhyjbdrdiihrp")
    public suspend fun useEcsRamRoleToken(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.useEcsRamRoleToken = mapped
    }

    /**
     * @param value The utilization option of cluster-autoscaler.
     */
    @JvmName("iuhdjysdntkvfgoe")
    public suspend fun utilization(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.utilization = mapped
    }

    internal fun build(): KubernetesAutoscalerArgs = KubernetesAutoscalerArgs(
        clusterId = clusterId,
        coolDownDuration = coolDownDuration,
        deferScaleInDuration = deferScaleInDuration,
        nodepools = nodepools,
        useEcsRamRoleToken = useEcsRamRoleToken,
        utilization = utilization,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy