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

com.pulumi.googlenative.container.v1beta1.kotlin.inputs.ClusterAutoscalingArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.googlenative.container.v1beta1.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.container.v1beta1.inputs.ClusterAutoscalingArgs.builder
import com.pulumi.googlenative.container.v1beta1.kotlin.enums.ClusterAutoscalingAutoscalingProfile
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

/**
 * ClusterAutoscaling contains global, per-cluster information required by Cluster Autoscaler to automatically adjust the size of the cluster and create/delete node pools based on the current needs.
 * @property autoprovisioningLocations The list of Google Compute Engine [zones](https://cloud.google.com/compute/docs/zones#available) in which the NodePool's nodes can be created by NAP.
 * @property autoprovisioningNodePoolDefaults AutoprovisioningNodePoolDefaults contains defaults for a node pool created by NAP.
 * @property autoscalingProfile Defines autoscaling behaviour.
 * @property enableNodeAutoprovisioning Enables automatic node pool creation and deletion.
 * @property resourceLimits Contains global constraints regarding minimum and maximum amount of resources in the cluster.
 */
public data class ClusterAutoscalingArgs(
    public val autoprovisioningLocations: Output>? = null,
    public val autoprovisioningNodePoolDefaults: Output? = null,
    public val autoscalingProfile: Output? = null,
    public val enableNodeAutoprovisioning: Output? = null,
    public val resourceLimits: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.container.v1beta1.inputs.ClusterAutoscalingArgs =
        com.pulumi.googlenative.container.v1beta1.inputs.ClusterAutoscalingArgs.builder()
            .autoprovisioningLocations(
                autoprovisioningLocations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .autoprovisioningNodePoolDefaults(
                autoprovisioningNodePoolDefaults?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .autoscalingProfile(
                autoscalingProfile?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .enableNodeAutoprovisioning(enableNodeAutoprovisioning?.applyValue({ args0 -> args0 }))
            .resourceLimits(
                resourceLimits?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [ClusterAutoscalingArgs].
 */
@PulumiTagMarker
public class ClusterAutoscalingArgsBuilder internal constructor() {
    private var autoprovisioningLocations: Output>? = null

    private var autoprovisioningNodePoolDefaults: Output? = null

    private var autoscalingProfile: Output? = null

    private var enableNodeAutoprovisioning: Output? = null

    private var resourceLimits: Output>? = null

    /**
     * @param value The list of Google Compute Engine [zones](https://cloud.google.com/compute/docs/zones#available) in which the NodePool's nodes can be created by NAP.
     */
    @JvmName("xkjkexijdsrhwewh")
    public suspend fun autoprovisioningLocations(`value`: Output>) {
        this.autoprovisioningLocations = value
    }

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

    /**
     * @param values The list of Google Compute Engine [zones](https://cloud.google.com/compute/docs/zones#available) in which the NodePool's nodes can be created by NAP.
     */
    @JvmName("yhmtkcqobsiwdcwe")
    public suspend fun autoprovisioningLocations(values: List>) {
        this.autoprovisioningLocations = Output.all(values)
    }

    /**
     * @param value AutoprovisioningNodePoolDefaults contains defaults for a node pool created by NAP.
     */
    @JvmName("llfbcyhwpllckwem")
    public suspend fun autoprovisioningNodePoolDefaults(`value`: Output) {
        this.autoprovisioningNodePoolDefaults = value
    }

    /**
     * @param value Defines autoscaling behaviour.
     */
    @JvmName("fleunwlxxnmifoxy")
    public suspend fun autoscalingProfile(`value`: Output) {
        this.autoscalingProfile = value
    }

    /**
     * @param value Enables automatic node pool creation and deletion.
     */
    @JvmName("qyraqyxhlxatpfyw")
    public suspend fun enableNodeAutoprovisioning(`value`: Output) {
        this.enableNodeAutoprovisioning = value
    }

    /**
     * @param value Contains global constraints regarding minimum and maximum amount of resources in the cluster.
     */
    @JvmName("vqrfrysyhvolawcm")
    public suspend fun resourceLimits(`value`: Output>) {
        this.resourceLimits = value
    }

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

    /**
     * @param values Contains global constraints regarding minimum and maximum amount of resources in the cluster.
     */
    @JvmName("prkifwuciadqixgc")
    public suspend fun resourceLimits(values: List>) {
        this.resourceLimits = Output.all(values)
    }

    /**
     * @param value The list of Google Compute Engine [zones](https://cloud.google.com/compute/docs/zones#available) in which the NodePool's nodes can be created by NAP.
     */
    @JvmName("joaqbmdmwljvogvl")
    public suspend fun autoprovisioningLocations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoprovisioningLocations = mapped
    }

    /**
     * @param values The list of Google Compute Engine [zones](https://cloud.google.com/compute/docs/zones#available) in which the NodePool's nodes can be created by NAP.
     */
    @JvmName("eitppxtgbvfpbugl")
    public suspend fun autoprovisioningLocations(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.autoprovisioningLocations = mapped
    }

    /**
     * @param value AutoprovisioningNodePoolDefaults contains defaults for a node pool created by NAP.
     */
    @JvmName("gqhxmbwksjsbdiel")
    public suspend fun autoprovisioningNodePoolDefaults(`value`: AutoprovisioningNodePoolDefaultsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoprovisioningNodePoolDefaults = mapped
    }

    /**
     * @param argument AutoprovisioningNodePoolDefaults contains defaults for a node pool created by NAP.
     */
    @JvmName("bhuutfoxjtxtqrtu")
    public suspend fun autoprovisioningNodePoolDefaults(argument: suspend AutoprovisioningNodePoolDefaultsArgsBuilder.() -> Unit) {
        val toBeMapped = AutoprovisioningNodePoolDefaultsArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.autoprovisioningNodePoolDefaults = mapped
    }

    /**
     * @param value Defines autoscaling behaviour.
     */
    @JvmName("ynuinvmolcphwdey")
    public suspend fun autoscalingProfile(`value`: ClusterAutoscalingAutoscalingProfile?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoscalingProfile = mapped
    }

    /**
     * @param value Enables automatic node pool creation and deletion.
     */
    @JvmName("eaccgbbvyifykcva")
    public suspend fun enableNodeAutoprovisioning(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableNodeAutoprovisioning = mapped
    }

    /**
     * @param value Contains global constraints regarding minimum and maximum amount of resources in the cluster.
     */
    @JvmName("woauntbntjsnsvch")
    public suspend fun resourceLimits(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceLimits = mapped
    }

    /**
     * @param argument Contains global constraints regarding minimum and maximum amount of resources in the cluster.
     */
    @JvmName("mtapudfiqecdisfv")
    public suspend fun resourceLimits(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ResourceLimitArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.resourceLimits = mapped
    }

    /**
     * @param argument Contains global constraints regarding minimum and maximum amount of resources in the cluster.
     */
    @JvmName("fychaokyphkikaxy")
    public suspend fun resourceLimits(vararg argument: suspend ResourceLimitArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ResourceLimitArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.resourceLimits = mapped
    }

    /**
     * @param argument Contains global constraints regarding minimum and maximum amount of resources in the cluster.
     */
    @JvmName("kfrlpllatxgjcxpu")
    public suspend fun resourceLimits(argument: suspend ResourceLimitArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ResourceLimitArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.resourceLimits = mapped
    }

    /**
     * @param values Contains global constraints regarding minimum and maximum amount of resources in the cluster.
     */
    @JvmName("dhvcbldpifanupyh")
    public suspend fun resourceLimits(vararg values: ResourceLimitArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resourceLimits = mapped
    }

    internal fun build(): ClusterAutoscalingArgs = ClusterAutoscalingArgs(
        autoprovisioningLocations = autoprovisioningLocations,
        autoprovisioningNodePoolDefaults = autoprovisioningNodePoolDefaults,
        autoscalingProfile = autoscalingProfile,
        enableNodeAutoprovisioning = enableNodeAutoprovisioning,
        resourceLimits = resourceLimits,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy