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

com.pulumi.gcp.container.kotlin.inputs.ClusterClusterAutoscalingArgs.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: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.container.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.container.inputs.ClusterClusterAutoscalingArgs.builder
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 autoProvisioningDefaults Contains defaults for a node pool created by NAP. A subset of fields also apply to
 * GKE Autopilot clusters.
 * Structure is documented below.
 * @property autoscalingProfile Configuration
 * options for the [Autoscaling profile](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-autoscaler#autoscaling_profiles)
 * feature, which lets you choose whether the cluster autoscaler should optimize for resource utilization or resource availability
 * when deciding to remove nodes from a cluster. Can be `BALANCED` or `OPTIMIZE_UTILIZATION`. Defaults to `BALANCED`.
 * @property enabled Whether node auto-provisioning is enabled. Must be supplied for GKE Standard clusters, `true` is implied
 * for autopilot clusters. Resource limits for `cpu` and `memory` must be defined to enable node auto-provisioning for GKE Standard.
 * @property resourceLimits Global constraints for machine resources in the
 * cluster. Configuring the `cpu` and `memory` types is required if node
 * auto-provisioning is enabled. These limits will apply to node pool autoscaling
 * in addition to node auto-provisioning. Structure is documented below.
 */
public data class ClusterClusterAutoscalingArgs(
    public val autoProvisioningDefaults: Output? = null,
    public val autoscalingProfile: Output? = null,
    public val enabled: Output? = null,
    public val resourceLimits: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.container.inputs.ClusterClusterAutoscalingArgs =
        com.pulumi.gcp.container.inputs.ClusterClusterAutoscalingArgs.builder()
            .autoProvisioningDefaults(
                autoProvisioningDefaults?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .autoscalingProfile(autoscalingProfile?.applyValue({ args0 -> args0 }))
            .enabled(enabled?.applyValue({ args0 -> args0 }))
            .resourceLimits(
                resourceLimits?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [ClusterClusterAutoscalingArgs].
 */
@PulumiTagMarker
public class ClusterClusterAutoscalingArgsBuilder internal constructor() {
    private var autoProvisioningDefaults:
        Output? = null

    private var autoscalingProfile: Output? = null

    private var enabled: Output? = null

    private var resourceLimits: Output>? = null

    /**
     * @param value Contains defaults for a node pool created by NAP. A subset of fields also apply to
     * GKE Autopilot clusters.
     * Structure is documented below.
     */
    @JvmName("theqtliqsuovuiim")
    public suspend fun autoProvisioningDefaults(`value`: Output) {
        this.autoProvisioningDefaults = value
    }

    /**
     * @param value Configuration
     * options for the [Autoscaling profile](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-autoscaler#autoscaling_profiles)
     * feature, which lets you choose whether the cluster autoscaler should optimize for resource utilization or resource availability
     * when deciding to remove nodes from a cluster. Can be `BALANCED` or `OPTIMIZE_UTILIZATION`. Defaults to `BALANCED`.
     */
    @JvmName("vdvrjhuonsvobrfs")
    public suspend fun autoscalingProfile(`value`: Output) {
        this.autoscalingProfile = value
    }

    /**
     * @param value Whether node auto-provisioning is enabled. Must be supplied for GKE Standard clusters, `true` is implied
     * for autopilot clusters. Resource limits for `cpu` and `memory` must be defined to enable node auto-provisioning for GKE Standard.
     */
    @JvmName("oaaqjnafctrcgcga")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value Global constraints for machine resources in the
     * cluster. Configuring the `cpu` and `memory` types is required if node
     * auto-provisioning is enabled. These limits will apply to node pool autoscaling
     * in addition to node auto-provisioning. Structure is documented below.
     */
    @JvmName("pumvfhvckifdyead")
    public suspend fun resourceLimits(`value`: Output>) {
        this.resourceLimits = value
    }

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

    /**
     * @param values Global constraints for machine resources in the
     * cluster. Configuring the `cpu` and `memory` types is required if node
     * auto-provisioning is enabled. These limits will apply to node pool autoscaling
     * in addition to node auto-provisioning. Structure is documented below.
     */
    @JvmName("ypigiimyamgpyhvl")
    public suspend fun resourceLimits(values: List>) {
        this.resourceLimits = Output.all(values)
    }

    /**
     * @param value Contains defaults for a node pool created by NAP. A subset of fields also apply to
     * GKE Autopilot clusters.
     * Structure is documented below.
     */
    @JvmName("ogbrbbydmdnaxgar")
    public suspend fun autoProvisioningDefaults(`value`: ClusterClusterAutoscalingAutoProvisioningDefaultsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoProvisioningDefaults = mapped
    }

    /**
     * @param argument Contains defaults for a node pool created by NAP. A subset of fields also apply to
     * GKE Autopilot clusters.
     * Structure is documented below.
     */
    @JvmName("wsldbcnpesidlvxy")
    public suspend fun autoProvisioningDefaults(argument: suspend ClusterClusterAutoscalingAutoProvisioningDefaultsArgsBuilder.() -> Unit) {
        val toBeMapped = ClusterClusterAutoscalingAutoProvisioningDefaultsArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.autoProvisioningDefaults = mapped
    }

    /**
     * @param value Configuration
     * options for the [Autoscaling profile](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-autoscaler#autoscaling_profiles)
     * feature, which lets you choose whether the cluster autoscaler should optimize for resource utilization or resource availability
     * when deciding to remove nodes from a cluster. Can be `BALANCED` or `OPTIMIZE_UTILIZATION`. Defaults to `BALANCED`.
     */
    @JvmName("vwcxoxbentvseseo")
    public suspend fun autoscalingProfile(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoscalingProfile = mapped
    }

    /**
     * @param value Whether node auto-provisioning is enabled. Must be supplied for GKE Standard clusters, `true` is implied
     * for autopilot clusters. Resource limits for `cpu` and `memory` must be defined to enable node auto-provisioning for GKE Standard.
     */
    @JvmName("mcgwwewhldurpuqk")
    public suspend fun enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value Global constraints for machine resources in the
     * cluster. Configuring the `cpu` and `memory` types is required if node
     * auto-provisioning is enabled. These limits will apply to node pool autoscaling
     * in addition to node auto-provisioning. Structure is documented below.
     */
    @JvmName("fcxnvrflvgrkwwfo")
    public suspend fun resourceLimits(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceLimits = mapped
    }

    /**
     * @param argument Global constraints for machine resources in the
     * cluster. Configuring the `cpu` and `memory` types is required if node
     * auto-provisioning is enabled. These limits will apply to node pool autoscaling
     * in addition to node auto-provisioning. Structure is documented below.
     */
    @JvmName("wbqryoitwwnfsuxm")
    public suspend fun resourceLimits(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ClusterClusterAutoscalingResourceLimitArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.resourceLimits = mapped
    }

    /**
     * @param argument Global constraints for machine resources in the
     * cluster. Configuring the `cpu` and `memory` types is required if node
     * auto-provisioning is enabled. These limits will apply to node pool autoscaling
     * in addition to node auto-provisioning. Structure is documented below.
     */
    @JvmName("eilhcryrnshtnkvj")
    public suspend fun resourceLimits(vararg argument: suspend ClusterClusterAutoscalingResourceLimitArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ClusterClusterAutoscalingResourceLimitArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.resourceLimits = mapped
    }

    /**
     * @param argument Global constraints for machine resources in the
     * cluster. Configuring the `cpu` and `memory` types is required if node
     * auto-provisioning is enabled. These limits will apply to node pool autoscaling
     * in addition to node auto-provisioning. Structure is documented below.
     */
    @JvmName("kwcfxhlcjjqwkfnp")
    public suspend fun resourceLimits(argument: suspend ClusterClusterAutoscalingResourceLimitArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ClusterClusterAutoscalingResourceLimitArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.resourceLimits = mapped
    }

    /**
     * @param values Global constraints for machine resources in the
     * cluster. Configuring the `cpu` and `memory` types is required if node
     * auto-provisioning is enabled. These limits will apply to node pool autoscaling
     * in addition to node auto-provisioning. Structure is documented below.
     */
    @JvmName("htqeglsthnskhsxe")
    public suspend fun resourceLimits(vararg values: ClusterClusterAutoscalingResourceLimitArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resourceLimits = mapped
    }

    internal fun build(): ClusterClusterAutoscalingArgs = ClusterClusterAutoscalingArgs(
        autoProvisioningDefaults = autoProvisioningDefaults,
        autoscalingProfile = autoscalingProfile,
        enabled = enabled,
        resourceLimits = resourceLimits,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy