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

com.pulumi.gcp.vmwareengine.kotlin.inputs.ClusterAutoscalingSettingsArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.gcp.vmwareengine.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.vmwareengine.inputs.ClusterAutoscalingSettingsArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property autoscalingPolicies The map with autoscaling policies applied to the cluster.
 * The key is the identifier of the policy.
 * It must meet the following requirements:
 * * Only contains 1-63 alphanumeric characters and hyphens
 * * Begins with an alphabetical character
 * * Ends with a non-hyphen character
 * * Not formatted as a UUID
 * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
 * Currently the map must contain only one element
 * that describes the autoscaling policy for compute nodes.
 * Structure is documented below.
 * @property coolDownPeriod The minimum duration between consecutive autoscale operations.
 * It starts once addition or removal of nodes is fully completed.
 * Minimum cool down period is 30m.
 * Cool down period must be in whole minutes (for example, 30m, 31m, 50m).
 * Mandatory for successful addition of autoscaling settings in cluster.
 * @property maxClusterNodeCount Maximum number of nodes of any type in a cluster.
 * Mandatory for successful addition of autoscaling settings in cluster.
 * @property minClusterNodeCount Minimum number of nodes of any type in a cluster.
 * Mandatory for successful addition of autoscaling settings in cluster.
 */
public data class ClusterAutoscalingSettingsArgs(
    public val autoscalingPolicies: Output>,
    public val coolDownPeriod: Output? = null,
    public val maxClusterNodeCount: Output? = null,
    public val minClusterNodeCount: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.vmwareengine.inputs.ClusterAutoscalingSettingsArgs =
        com.pulumi.gcp.vmwareengine.inputs.ClusterAutoscalingSettingsArgs.builder()
            .autoscalingPolicies(
                autoscalingPolicies.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .coolDownPeriod(coolDownPeriod?.applyValue({ args0 -> args0 }))
            .maxClusterNodeCount(maxClusterNodeCount?.applyValue({ args0 -> args0 }))
            .minClusterNodeCount(minClusterNodeCount?.applyValue({ args0 -> args0 })).build()
}

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

    private var coolDownPeriod: Output? = null

    private var maxClusterNodeCount: Output? = null

    private var minClusterNodeCount: Output? = null

    /**
     * @param value The map with autoscaling policies applied to the cluster.
     * The key is the identifier of the policy.
     * It must meet the following requirements:
     * * Only contains 1-63 alphanumeric characters and hyphens
     * * Begins with an alphabetical character
     * * Ends with a non-hyphen character
     * * Not formatted as a UUID
     * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
     * Currently the map must contain only one element
     * that describes the autoscaling policy for compute nodes.
     * Structure is documented below.
     */
    @JvmName("lkbowrrgqjgcesoa")
    public suspend fun autoscalingPolicies(`value`: Output>) {
        this.autoscalingPolicies = value
    }

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

    /**
     * @param values The map with autoscaling policies applied to the cluster.
     * The key is the identifier of the policy.
     * It must meet the following requirements:
     * * Only contains 1-63 alphanumeric characters and hyphens
     * * Begins with an alphabetical character
     * * Ends with a non-hyphen character
     * * Not formatted as a UUID
     * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
     * Currently the map must contain only one element
     * that describes the autoscaling policy for compute nodes.
     * Structure is documented below.
     */
    @JvmName("joiqijmlypxymylq")
    public suspend fun autoscalingPolicies(values: List>) {
        this.autoscalingPolicies = Output.all(values)
    }

    /**
     * @param value The minimum duration between consecutive autoscale operations.
     * It starts once addition or removal of nodes is fully completed.
     * Minimum cool down period is 30m.
     * Cool down period must be in whole minutes (for example, 30m, 31m, 50m).
     * Mandatory for successful addition of autoscaling settings in cluster.
     */
    @JvmName("ndecbcxpemnepnxs")
    public suspend fun coolDownPeriod(`value`: Output) {
        this.coolDownPeriod = value
    }

    /**
     * @param value Maximum number of nodes of any type in a cluster.
     * Mandatory for successful addition of autoscaling settings in cluster.
     */
    @JvmName("msfnlslndjslkgof")
    public suspend fun maxClusterNodeCount(`value`: Output) {
        this.maxClusterNodeCount = value
    }

    /**
     * @param value Minimum number of nodes of any type in a cluster.
     * Mandatory for successful addition of autoscaling settings in cluster.
     */
    @JvmName("gjiifjuofedwqcgw")
    public suspend fun minClusterNodeCount(`value`: Output) {
        this.minClusterNodeCount = value
    }

    /**
     * @param value The map with autoscaling policies applied to the cluster.
     * The key is the identifier of the policy.
     * It must meet the following requirements:
     * * Only contains 1-63 alphanumeric characters and hyphens
     * * Begins with an alphabetical character
     * * Ends with a non-hyphen character
     * * Not formatted as a UUID
     * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
     * Currently the map must contain only one element
     * that describes the autoscaling policy for compute nodes.
     * Structure is documented below.
     */
    @JvmName("qjfutmmxankntnnl")
    public suspend fun autoscalingPolicies(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.autoscalingPolicies = mapped
    }

    /**
     * @param argument The map with autoscaling policies applied to the cluster.
     * The key is the identifier of the policy.
     * It must meet the following requirements:
     * * Only contains 1-63 alphanumeric characters and hyphens
     * * Begins with an alphabetical character
     * * Ends with a non-hyphen character
     * * Not formatted as a UUID
     * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
     * Currently the map must contain only one element
     * that describes the autoscaling policy for compute nodes.
     * Structure is documented below.
     */
    @JvmName("vcmcwcgutprpplxh")
    public suspend fun autoscalingPolicies(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ClusterAutoscalingSettingsAutoscalingPolicyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.autoscalingPolicies = mapped
    }

    /**
     * @param argument The map with autoscaling policies applied to the cluster.
     * The key is the identifier of the policy.
     * It must meet the following requirements:
     * * Only contains 1-63 alphanumeric characters and hyphens
     * * Begins with an alphabetical character
     * * Ends with a non-hyphen character
     * * Not formatted as a UUID
     * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
     * Currently the map must contain only one element
     * that describes the autoscaling policy for compute nodes.
     * Structure is documented below.
     */
    @JvmName("ofntgtkjuuwltjri")
    public suspend fun autoscalingPolicies(vararg argument: suspend ClusterAutoscalingSettingsAutoscalingPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ClusterAutoscalingSettingsAutoscalingPolicyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.autoscalingPolicies = mapped
    }

    /**
     * @param argument The map with autoscaling policies applied to the cluster.
     * The key is the identifier of the policy.
     * It must meet the following requirements:
     * * Only contains 1-63 alphanumeric characters and hyphens
     * * Begins with an alphabetical character
     * * Ends with a non-hyphen character
     * * Not formatted as a UUID
     * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
     * Currently the map must contain only one element
     * that describes the autoscaling policy for compute nodes.
     * Structure is documented below.
     */
    @JvmName("whcppmyueysracjl")
    public suspend fun autoscalingPolicies(argument: suspend ClusterAutoscalingSettingsAutoscalingPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ClusterAutoscalingSettingsAutoscalingPolicyArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.autoscalingPolicies = mapped
    }

    /**
     * @param values The map with autoscaling policies applied to the cluster.
     * The key is the identifier of the policy.
     * It must meet the following requirements:
     * * Only contains 1-63 alphanumeric characters and hyphens
     * * Begins with an alphabetical character
     * * Ends with a non-hyphen character
     * * Not formatted as a UUID
     * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
     * Currently the map must contain only one element
     * that describes the autoscaling policy for compute nodes.
     * Structure is documented below.
     */
    @JvmName("eaykxxfjtsgedqmo")
    public suspend fun autoscalingPolicies(vararg values: ClusterAutoscalingSettingsAutoscalingPolicyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.autoscalingPolicies = mapped
    }

    /**
     * @param value The minimum duration between consecutive autoscale operations.
     * It starts once addition or removal of nodes is fully completed.
     * Minimum cool down period is 30m.
     * Cool down period must be in whole minutes (for example, 30m, 31m, 50m).
     * Mandatory for successful addition of autoscaling settings in cluster.
     */
    @JvmName("ulqweoqtenuxlhth")
    public suspend fun coolDownPeriod(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.coolDownPeriod = mapped
    }

    /**
     * @param value Maximum number of nodes of any type in a cluster.
     * Mandatory for successful addition of autoscaling settings in cluster.
     */
    @JvmName("ltrcbvsgxjqbijkc")
    public suspend fun maxClusterNodeCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxClusterNodeCount = mapped
    }

    /**
     * @param value Minimum number of nodes of any type in a cluster.
     * Mandatory for successful addition of autoscaling settings in cluster.
     */
    @JvmName("sheyhdwvnsmilkog")
    public suspend fun minClusterNodeCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.minClusterNodeCount = mapped
    }

    internal fun build(): ClusterAutoscalingSettingsArgs = ClusterAutoscalingSettingsArgs(
        autoscalingPolicies = autoscalingPolicies ?: throw PulumiNullFieldException("autoscalingPolicies"),
        coolDownPeriod = coolDownPeriod,
        maxClusterNodeCount = maxClusterNodeCount,
        minClusterNodeCount = minClusterNodeCount,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy