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

com.pulumi.digitalocean.kotlin.inputs.KubernetesClusterNodePoolArgs.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: 4.35.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.digitalocean.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.digitalocean.inputs.KubernetesClusterNodePoolArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property actualNodeCount A computed field representing the actual number of nodes in the node pool, which is especially useful when auto-scaling is enabled.
 * @property autoScale Enable auto-scaling of the number of nodes in the node pool within the given min/max range.
 * @property id A unique ID that can be used to identify and reference the node.
 * @property labels A map of key/value pairs to apply to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding [Node resources](https://kubernetes.io/docs/concepts/architecture/nodes/).
 * @property maxNodes If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.
 * @property minNodes If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.
 * @property name A name for the node pool.
 * @property nodeCount The number of Droplet instances in the node pool. If auto-scaling is enabled, this should only be set if the desired result is to explicitly reset the number of nodes to this value. If auto-scaling is enabled, and the node count is outside of the given min/max range, it will use the min nodes value.
 * @property nodes A list of nodes in the pool. Each node exports the following attributes:
 * @property size The slug identifier for the type of Droplet to be used as workers in the node pool.
 * @property tags A list of tag names applied to the node pool.
 * @property taints A block representing a taint applied to all nodes in the pool. Each taint exports the following attributes (taints must be unique by key and effect pair):
 */
public data class KubernetesClusterNodePoolArgs(
    public val actualNodeCount: Output? = null,
    public val autoScale: Output? = null,
    public val id: Output? = null,
    public val labels: Output>? = null,
    public val maxNodes: Output? = null,
    public val minNodes: Output? = null,
    public val name: Output,
    public val nodeCount: Output? = null,
    public val nodes: Output>? = null,
    public val size: Output,
    public val tags: Output>? = null,
    public val taints: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.digitalocean.inputs.KubernetesClusterNodePoolArgs =
        com.pulumi.digitalocean.inputs.KubernetesClusterNodePoolArgs.builder()
            .actualNodeCount(actualNodeCount?.applyValue({ args0 -> args0 }))
            .autoScale(autoScale?.applyValue({ args0 -> args0 }))
            .id(id?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .maxNodes(maxNodes?.applyValue({ args0 -> args0 }))
            .minNodes(minNodes?.applyValue({ args0 -> args0 }))
            .name(name.applyValue({ args0 -> args0 }))
            .nodeCount(nodeCount?.applyValue({ args0 -> args0 }))
            .nodes(nodes?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .size(size.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .taints(
                taints?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [KubernetesClusterNodePoolArgs].
 */
@PulumiTagMarker
public class KubernetesClusterNodePoolArgsBuilder internal constructor() {
    private var actualNodeCount: Output? = null

    private var autoScale: Output? = null

    private var id: Output? = null

    private var labels: Output>? = null

    private var maxNodes: Output? = null

    private var minNodes: Output? = null

    private var name: Output? = null

    private var nodeCount: Output? = null

    private var nodes: Output>? = null

    private var size: Output? = null

    private var tags: Output>? = null

    private var taints: Output>? = null

    /**
     * @param value A computed field representing the actual number of nodes in the node pool, which is especially useful when auto-scaling is enabled.
     */
    @JvmName("ixnjgjqdblbmghuw")
    public suspend fun actualNodeCount(`value`: Output) {
        this.actualNodeCount = value
    }

    /**
     * @param value Enable auto-scaling of the number of nodes in the node pool within the given min/max range.
     */
    @JvmName("grgmfdsscopdhcsv")
    public suspend fun autoScale(`value`: Output) {
        this.autoScale = value
    }

    /**
     * @param value A unique ID that can be used to identify and reference the node.
     */
    @JvmName("qagsnfcbvicsmhgs")
    public suspend fun id(`value`: Output) {
        this.id = value
    }

    /**
     * @param value A map of key/value pairs to apply to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding [Node resources](https://kubernetes.io/docs/concepts/architecture/nodes/).
     */
    @JvmName("nwekjgmwbjcasuie")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.
     */
    @JvmName("jbiksyjdxlbvydlo")
    public suspend fun maxNodes(`value`: Output) {
        this.maxNodes = value
    }

    /**
     * @param value If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.
     */
    @JvmName("wmqdsqkepcinqhqf")
    public suspend fun minNodes(`value`: Output) {
        this.minNodes = value
    }

    /**
     * @param value A name for the node pool.
     */
    @JvmName("kogybykeveewwyxx")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The number of Droplet instances in the node pool. If auto-scaling is enabled, this should only be set if the desired result is to explicitly reset the number of nodes to this value. If auto-scaling is enabled, and the node count is outside of the given min/max range, it will use the min nodes value.
     */
    @JvmName("pttthbfognhpxdly")
    public suspend fun nodeCount(`value`: Output) {
        this.nodeCount = value
    }

    /**
     * @param value A list of nodes in the pool. Each node exports the following attributes:
     */
    @JvmName("nqngwbgtjswktgmv")
    public suspend fun nodes(`value`: Output>) {
        this.nodes = value
    }

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

    /**
     * @param values A list of nodes in the pool. Each node exports the following attributes:
     */
    @JvmName("bxofybkyrsdouxkg")
    public suspend fun nodes(values: List>) {
        this.nodes = Output.all(values)
    }

    /**
     * @param value The slug identifier for the type of Droplet to be used as workers in the node pool.
     */
    @JvmName("uvgxygfxwrguopjd")
    public suspend fun size(`value`: Output) {
        this.size = value
    }

    /**
     * @param value A list of tag names applied to the node pool.
     */
    @JvmName("lmbpymetaibnroix")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values A list of tag names applied to the node pool.
     */
    @JvmName("cvpyqsxdnltflafd")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value A block representing a taint applied to all nodes in the pool. Each taint exports the following attributes (taints must be unique by key and effect pair):
     */
    @JvmName("uviodgqsyqdopgyj")
    public suspend fun taints(`value`: Output>) {
        this.taints = value
    }

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

    /**
     * @param values A block representing a taint applied to all nodes in the pool. Each taint exports the following attributes (taints must be unique by key and effect pair):
     */
    @JvmName("xnceaopbnfpcptul")
    public suspend fun taints(values: List>) {
        this.taints = Output.all(values)
    }

    /**
     * @param value A computed field representing the actual number of nodes in the node pool, which is especially useful when auto-scaling is enabled.
     */
    @JvmName("waeofpmhdgmvprpj")
    public suspend fun actualNodeCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.actualNodeCount = mapped
    }

    /**
     * @param value Enable auto-scaling of the number of nodes in the node pool within the given min/max range.
     */
    @JvmName("qitlinpqqoqvomik")
    public suspend fun autoScale(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoScale = mapped
    }

    /**
     * @param value A unique ID that can be used to identify and reference the node.
     */
    @JvmName("myehdgyuhrsapkwj")
    public suspend fun id(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.id = mapped
    }

    /**
     * @param value A map of key/value pairs to apply to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding [Node resources](https://kubernetes.io/docs/concepts/architecture/nodes/).
     */
    @JvmName("ciunqimuovuteclr")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values A map of key/value pairs to apply to nodes in the pool. The labels are exposed in the Kubernetes API as labels in the metadata of the corresponding [Node resources](https://kubernetes.io/docs/concepts/architecture/nodes/).
     */
    @JvmName("pabcvonquhnbhhla")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value If auto-scaling is enabled, this represents the maximum number of nodes that the node pool can be scaled up to.
     */
    @JvmName("tovkbpahsyrpujji")
    public suspend fun maxNodes(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxNodes = mapped
    }

    /**
     * @param value If auto-scaling is enabled, this represents the minimum number of nodes that the node pool can be scaled down to.
     */
    @JvmName("hmntjlpqjgqhcolm")
    public suspend fun minNodes(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.minNodes = mapped
    }

    /**
     * @param value A name for the node pool.
     */
    @JvmName("umurbdenlrgepxos")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The number of Droplet instances in the node pool. If auto-scaling is enabled, this should only be set if the desired result is to explicitly reset the number of nodes to this value. If auto-scaling is enabled, and the node count is outside of the given min/max range, it will use the min nodes value.
     */
    @JvmName("jimvnkpxsbefuhou")
    public suspend fun nodeCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.nodeCount = mapped
    }

    /**
     * @param value A list of nodes in the pool. Each node exports the following attributes:
     */
    @JvmName("koodshomtyxviaqb")
    public suspend fun nodes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.nodes = mapped
    }

    /**
     * @param argument A list of nodes in the pool. Each node exports the following attributes:
     */
    @JvmName("oqpasleifqxwxnxq")
    public suspend fun nodes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            KubernetesClusterNodePoolNodeArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.nodes = mapped
    }

    /**
     * @param argument A list of nodes in the pool. Each node exports the following attributes:
     */
    @JvmName("jfgkdjajhkyhfwmh")
    public suspend fun nodes(vararg argument: suspend KubernetesClusterNodePoolNodeArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            KubernetesClusterNodePoolNodeArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.nodes = mapped
    }

    /**
     * @param argument A list of nodes in the pool. Each node exports the following attributes:
     */
    @JvmName("urwbkdfvjnapivht")
    public suspend fun nodes(argument: suspend KubernetesClusterNodePoolNodeArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            KubernetesClusterNodePoolNodeArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.nodes = mapped
    }

    /**
     * @param values A list of nodes in the pool. Each node exports the following attributes:
     */
    @JvmName("gnipiijwbrsnicve")
    public suspend fun nodes(vararg values: KubernetesClusterNodePoolNodeArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.nodes = mapped
    }

    /**
     * @param value The slug identifier for the type of Droplet to be used as workers in the node pool.
     */
    @JvmName("rgkvsoykddcurwwr")
    public suspend fun size(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.size = mapped
    }

    /**
     * @param value A list of tag names applied to the node pool.
     */
    @JvmName("agskeqorlmmxecbg")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A list of tag names applied to the node pool.
     */
    @JvmName("esotqbyucaftugel")
    public suspend fun tags(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value A block representing a taint applied to all nodes in the pool. Each taint exports the following attributes (taints must be unique by key and effect pair):
     */
    @JvmName("wrqbnpiwyrlfhncf")
    public suspend fun taints(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.taints = mapped
    }

    /**
     * @param argument A block representing a taint applied to all nodes in the pool. Each taint exports the following attributes (taints must be unique by key and effect pair):
     */
    @JvmName("vwhnergdomhlwkfe")
    public suspend fun taints(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            KubernetesClusterNodePoolTaintArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.taints = mapped
    }

    /**
     * @param argument A block representing a taint applied to all nodes in the pool. Each taint exports the following attributes (taints must be unique by key and effect pair):
     */
    @JvmName("wadktmlsdbttjtie")
    public suspend fun taints(vararg argument: suspend KubernetesClusterNodePoolTaintArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            KubernetesClusterNodePoolTaintArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.taints = mapped
    }

    /**
     * @param argument A block representing a taint applied to all nodes in the pool. Each taint exports the following attributes (taints must be unique by key and effect pair):
     */
    @JvmName("itoebyyoacwvirvf")
    public suspend fun taints(argument: suspend KubernetesClusterNodePoolTaintArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            KubernetesClusterNodePoolTaintArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.taints = mapped
    }

    /**
     * @param values A block representing a taint applied to all nodes in the pool. Each taint exports the following attributes (taints must be unique by key and effect pair):
     */
    @JvmName("pngrxenxcdhnastu")
    public suspend fun taints(vararg values: KubernetesClusterNodePoolTaintArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.taints = mapped
    }

    internal fun build(): KubernetesClusterNodePoolArgs = KubernetesClusterNodePoolArgs(
        actualNodeCount = actualNodeCount,
        autoScale = autoScale,
        id = id,
        labels = labels,
        maxNodes = maxNodes,
        minNodes = minNodes,
        name = name ?: throw PulumiNullFieldException("name"),
        nodeCount = nodeCount,
        nodes = nodes,
        size = size ?: throw PulumiNullFieldException("size"),
        tags = tags,
        taints = taints,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy