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

com.pulumi.awsnative.eks.kotlin.NodegroupArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.eks.kotlin

import com.pulumi.awsnative.eks.NodegroupArgs.builder
import com.pulumi.awsnative.eks.kotlin.inputs.NodegroupLaunchTemplateSpecificationArgs
import com.pulumi.awsnative.eks.kotlin.inputs.NodegroupLaunchTemplateSpecificationArgsBuilder
import com.pulumi.awsnative.eks.kotlin.inputs.NodegroupRemoteAccessArgs
import com.pulumi.awsnative.eks.kotlin.inputs.NodegroupRemoteAccessArgsBuilder
import com.pulumi.awsnative.eks.kotlin.inputs.NodegroupScalingConfigArgs
import com.pulumi.awsnative.eks.kotlin.inputs.NodegroupScalingConfigArgsBuilder
import com.pulumi.awsnative.eks.kotlin.inputs.NodegroupTaintArgs
import com.pulumi.awsnative.eks.kotlin.inputs.NodegroupTaintArgsBuilder
import com.pulumi.awsnative.eks.kotlin.inputs.NodegroupUpdateConfigArgs
import com.pulumi.awsnative.eks.kotlin.inputs.NodegroupUpdateConfigArgsBuilder
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.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

/**
 * Resource schema for AWS::EKS::Nodegroup
 * ## Example Usage
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * @property amiType The AMI type for your node group.
 * @property capacityType The capacity type of your managed node group.
 * @property clusterName Name of the cluster to create the node group in.
 * @property diskSize The root device disk size (in GiB) for your node group instances.
 * @property forceUpdateEnabled Force the update if the existing node group's pods are unable to be drained due to a pod disruption budget issue.
 * @property instanceTypes Specify the instance types for a node group.
 * @property labels The Kubernetes labels to be applied to the nodes in the node group when they are created.
 * @property launchTemplate An object representing a node group's launch template specification.
 * @property nodeRole The Amazon Resource Name (ARN) of the IAM role to associate with your node group.
 * @property nodegroupName The unique name to give your node group.
 * @property releaseVersion The AMI version of the Amazon EKS-optimized AMI to use with your node group.
 * @property remoteAccess The remote access (SSH) configuration to use with your node group.
 * @property scalingConfig The scaling configuration details for the Auto Scaling group that is created for your node group.
 * @property subnets The subnets to use for the Auto Scaling group that is created for your node group.
 * @property tags The metadata, as key-value pairs, to apply to the node group to assist with categorization and organization. Follows same schema as Labels for consistency.
 * @property taints The Kubernetes taints to be applied to the nodes in the node group when they are created.
 * @property updateConfig The node group update configuration.
 * @property version The Kubernetes version to use for your managed nodes.
 */
public data class NodegroupArgs(
    public val amiType: Output? = null,
    public val capacityType: Output? = null,
    public val clusterName: Output? = null,
    public val diskSize: Output? = null,
    public val forceUpdateEnabled: Output? = null,
    public val instanceTypes: Output>? = null,
    public val labels: Output>? = null,
    public val launchTemplate: Output? = null,
    public val nodeRole: Output? = null,
    public val nodegroupName: Output? = null,
    public val releaseVersion: Output? = null,
    public val remoteAccess: Output? = null,
    public val scalingConfig: Output? = null,
    public val subnets: Output>? = null,
    public val tags: Output>? = null,
    public val taints: Output>? = null,
    public val updateConfig: Output? = null,
    public val version: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.eks.NodegroupArgs =
        com.pulumi.awsnative.eks.NodegroupArgs.builder()
            .amiType(amiType?.applyValue({ args0 -> args0 }))
            .capacityType(capacityType?.applyValue({ args0 -> args0 }))
            .clusterName(clusterName?.applyValue({ args0 -> args0 }))
            .diskSize(diskSize?.applyValue({ args0 -> args0 }))
            .forceUpdateEnabled(forceUpdateEnabled?.applyValue({ args0 -> args0 }))
            .instanceTypes(instanceTypes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .launchTemplate(launchTemplate?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .nodeRole(nodeRole?.applyValue({ args0 -> args0 }))
            .nodegroupName(nodegroupName?.applyValue({ args0 -> args0 }))
            .releaseVersion(releaseVersion?.applyValue({ args0 -> args0 }))
            .remoteAccess(remoteAccess?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .scalingConfig(scalingConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .subnets(subnets?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .taints(taints?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .updateConfig(updateConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .version(version?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [NodegroupArgs].
 */
@PulumiTagMarker
public class NodegroupArgsBuilder internal constructor() {
    private var amiType: Output? = null

    private var capacityType: Output? = null

    private var clusterName: Output? = null

    private var diskSize: Output? = null

    private var forceUpdateEnabled: Output? = null

    private var instanceTypes: Output>? = null

    private var labels: Output>? = null

    private var launchTemplate: Output? = null

    private var nodeRole: Output? = null

    private var nodegroupName: Output? = null

    private var releaseVersion: Output? = null

    private var remoteAccess: Output? = null

    private var scalingConfig: Output? = null

    private var subnets: Output>? = null

    private var tags: Output>? = null

    private var taints: Output>? = null

    private var updateConfig: Output? = null

    private var version: Output? = null

    /**
     * @param value The AMI type for your node group.
     */
    @JvmName("qqtwvaifdhfavtfu")
    public suspend fun amiType(`value`: Output) {
        this.amiType = value
    }

    /**
     * @param value The capacity type of your managed node group.
     */
    @JvmName("sdqiodgrlmiwbmnb")
    public suspend fun capacityType(`value`: Output) {
        this.capacityType = value
    }

    /**
     * @param value Name of the cluster to create the node group in.
     */
    @JvmName("cpgyuweoucbcxdhd")
    public suspend fun clusterName(`value`: Output) {
        this.clusterName = value
    }

    /**
     * @param value The root device disk size (in GiB) for your node group instances.
     */
    @JvmName("orayoyplnswpsveb")
    public suspend fun diskSize(`value`: Output) {
        this.diskSize = value
    }

    /**
     * @param value Force the update if the existing node group's pods are unable to be drained due to a pod disruption budget issue.
     */
    @JvmName("rvocooyuqffrarkc")
    public suspend fun forceUpdateEnabled(`value`: Output) {
        this.forceUpdateEnabled = value
    }

    /**
     * @param value Specify the instance types for a node group.
     */
    @JvmName("ayandpfeoruelrjy")
    public suspend fun instanceTypes(`value`: Output>) {
        this.instanceTypes = value
    }

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

    /**
     * @param values Specify the instance types for a node group.
     */
    @JvmName("gfhdtxjcioscgogr")
    public suspend fun instanceTypes(values: List>) {
        this.instanceTypes = Output.all(values)
    }

    /**
     * @param value The Kubernetes labels to be applied to the nodes in the node group when they are created.
     */
    @JvmName("bryqjnjvkinwqtqs")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value An object representing a node group's launch template specification.
     */
    @JvmName("xscrcyibbmhspxqv")
    public suspend fun launchTemplate(`value`: Output) {
        this.launchTemplate = value
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the IAM role to associate with your node group.
     */
    @JvmName("nihnoucakxgigrhw")
    public suspend fun nodeRole(`value`: Output) {
        this.nodeRole = value
    }

    /**
     * @param value The unique name to give your node group.
     */
    @JvmName("tkwsfhlhlwixjvcg")
    public suspend fun nodegroupName(`value`: Output) {
        this.nodegroupName = value
    }

    /**
     * @param value The AMI version of the Amazon EKS-optimized AMI to use with your node group.
     */
    @JvmName("todexgrjxlhdvlpb")
    public suspend fun releaseVersion(`value`: Output) {
        this.releaseVersion = value
    }

    /**
     * @param value The remote access (SSH) configuration to use with your node group.
     */
    @JvmName("sjclhbdglkyjryft")
    public suspend fun remoteAccess(`value`: Output) {
        this.remoteAccess = value
    }

    /**
     * @param value The scaling configuration details for the Auto Scaling group that is created for your node group.
     */
    @JvmName("dstijnbjkqvgbuqn")
    public suspend fun scalingConfig(`value`: Output) {
        this.scalingConfig = value
    }

    /**
     * @param value The subnets to use for the Auto Scaling group that is created for your node group.
     */
    @JvmName("klaowsajjqwbefdl")
    public suspend fun subnets(`value`: Output>) {
        this.subnets = value
    }

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

    /**
     * @param values The subnets to use for the Auto Scaling group that is created for your node group.
     */
    @JvmName("niiidabshmjudfnu")
    public suspend fun subnets(values: List>) {
        this.subnets = Output.all(values)
    }

    /**
     * @param value The metadata, as key-value pairs, to apply to the node group to assist with categorization and organization. Follows same schema as Labels for consistency.
     */
    @JvmName("sswryepvnmprhofq")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The Kubernetes taints to be applied to the nodes in the node group when they are created.
     */
    @JvmName("ulwslclsrfphtbqn")
    public suspend fun taints(`value`: Output>) {
        this.taints = value
    }

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

    /**
     * @param values The Kubernetes taints to be applied to the nodes in the node group when they are created.
     */
    @JvmName("ngpieythyxymdprk")
    public suspend fun taints(values: List>) {
        this.taints = Output.all(values)
    }

    /**
     * @param value The node group update configuration.
     */
    @JvmName("wfrchhxfnnpdymvx")
    public suspend fun updateConfig(`value`: Output) {
        this.updateConfig = value
    }

    /**
     * @param value The Kubernetes version to use for your managed nodes.
     */
    @JvmName("efabygwqhtssnvbt")
    public suspend fun version(`value`: Output) {
        this.version = value
    }

    /**
     * @param value The AMI type for your node group.
     */
    @JvmName("lnhxlqqcnsnmffbf")
    public suspend fun amiType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.amiType = mapped
    }

    /**
     * @param value The capacity type of your managed node group.
     */
    @JvmName("oklnmstchaxumgxs")
    public suspend fun capacityType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.capacityType = mapped
    }

    /**
     * @param value Name of the cluster to create the node group in.
     */
    @JvmName("yycwsuplfbaldmim")
    public suspend fun clusterName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clusterName = mapped
    }

    /**
     * @param value The root device disk size (in GiB) for your node group instances.
     */
    @JvmName("vemxrqjfrprhddps")
    public suspend fun diskSize(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskSize = mapped
    }

    /**
     * @param value Force the update if the existing node group's pods are unable to be drained due to a pod disruption budget issue.
     */
    @JvmName("fkeglntsqyvwmmxm")
    public suspend fun forceUpdateEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.forceUpdateEnabled = mapped
    }

    /**
     * @param value Specify the instance types for a node group.
     */
    @JvmName("xpyddtjjosjituvx")
    public suspend fun instanceTypes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceTypes = mapped
    }

    /**
     * @param values Specify the instance types for a node group.
     */
    @JvmName("cjqunsjvtwxmgwyp")
    public suspend fun instanceTypes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.instanceTypes = mapped
    }

    /**
     * @param value The Kubernetes labels to be applied to the nodes in the node group when they are created.
     */
    @JvmName("tgkhyxhrdyksmmne")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values The Kubernetes labels to be applied to the nodes in the node group when they are created.
     */
    @JvmName("mhdpvilyiugcljay")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value An object representing a node group's launch template specification.
     */
    @JvmName("juubmmwtuojkortd")
    public suspend fun launchTemplate(`value`: NodegroupLaunchTemplateSpecificationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.launchTemplate = mapped
    }

    /**
     * @param argument An object representing a node group's launch template specification.
     */
    @JvmName("epkrnhmlkwmpjroe")
    public suspend fun launchTemplate(argument: suspend NodegroupLaunchTemplateSpecificationArgsBuilder.() -> Unit) {
        val toBeMapped = NodegroupLaunchTemplateSpecificationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.launchTemplate = mapped
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the IAM role to associate with your node group.
     */
    @JvmName("alsjbofpcltfhhnf")
    public suspend fun nodeRole(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.nodeRole = mapped
    }

    /**
     * @param value The unique name to give your node group.
     */
    @JvmName("xtpwpaueptyvihhx")
    public suspend fun nodegroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.nodegroupName = mapped
    }

    /**
     * @param value The AMI version of the Amazon EKS-optimized AMI to use with your node group.
     */
    @JvmName("ypdddtrujkyfbtul")
    public suspend fun releaseVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.releaseVersion = mapped
    }

    /**
     * @param value The remote access (SSH) configuration to use with your node group.
     */
    @JvmName("vwkcqhmsmrkyatph")
    public suspend fun remoteAccess(`value`: NodegroupRemoteAccessArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.remoteAccess = mapped
    }

    /**
     * @param argument The remote access (SSH) configuration to use with your node group.
     */
    @JvmName("pwxdnpihfavwqoyt")
    public suspend fun remoteAccess(argument: suspend NodegroupRemoteAccessArgsBuilder.() -> Unit) {
        val toBeMapped = NodegroupRemoteAccessArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.remoteAccess = mapped
    }

    /**
     * @param value The scaling configuration details for the Auto Scaling group that is created for your node group.
     */
    @JvmName("hgvnocnbkdndvclr")
    public suspend fun scalingConfig(`value`: NodegroupScalingConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scalingConfig = mapped
    }

    /**
     * @param argument The scaling configuration details for the Auto Scaling group that is created for your node group.
     */
    @JvmName("ohyoensyuywypima")
    public suspend fun scalingConfig(argument: suspend NodegroupScalingConfigArgsBuilder.() -> Unit) {
        val toBeMapped = NodegroupScalingConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.scalingConfig = mapped
    }

    /**
     * @param value The subnets to use for the Auto Scaling group that is created for your node group.
     */
    @JvmName("bnlcetliocoeuqed")
    public suspend fun subnets(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subnets = mapped
    }

    /**
     * @param values The subnets to use for the Auto Scaling group that is created for your node group.
     */
    @JvmName("uvruuepmqkyesvnu")
    public suspend fun subnets(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.subnets = mapped
    }

    /**
     * @param value The metadata, as key-value pairs, to apply to the node group to assist with categorization and organization. Follows same schema as Labels for consistency.
     */
    @JvmName("tapitmmwokfxkxra")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values The metadata, as key-value pairs, to apply to the node group to assist with categorization and organization. Follows same schema as Labels for consistency.
     */
    @JvmName("kxmoaqplifikrbgy")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The Kubernetes taints to be applied to the nodes in the node group when they are created.
     */
    @JvmName("hoiwjcytqbdelmrm")
    public suspend fun taints(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.taints = mapped
    }

    /**
     * @param argument The Kubernetes taints to be applied to the nodes in the node group when they are created.
     */
    @JvmName("hudobihtydjpqmlf")
    public suspend fun taints(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            NodegroupTaintArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.taints = mapped
    }

    /**
     * @param argument The Kubernetes taints to be applied to the nodes in the node group when they are created.
     */
    @JvmName("ugeqcrhhkdfkdnxq")
    public suspend fun taints(vararg argument: suspend NodegroupTaintArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            NodegroupTaintArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.taints = mapped
    }

    /**
     * @param argument The Kubernetes taints to be applied to the nodes in the node group when they are created.
     */
    @JvmName("panjxjcpvltpjuft")
    public suspend fun taints(argument: suspend NodegroupTaintArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(NodegroupTaintArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.taints = mapped
    }

    /**
     * @param values The Kubernetes taints to be applied to the nodes in the node group when they are created.
     */
    @JvmName("ukvicjecnveqpjss")
    public suspend fun taints(vararg values: NodegroupTaintArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.taints = mapped
    }

    /**
     * @param value The node group update configuration.
     */
    @JvmName("ftjncvueriekniyp")
    public suspend fun updateConfig(`value`: NodegroupUpdateConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.updateConfig = mapped
    }

    /**
     * @param argument The node group update configuration.
     */
    @JvmName("nldyvwsvndgwnigr")
    public suspend fun updateConfig(argument: suspend NodegroupUpdateConfigArgsBuilder.() -> Unit) {
        val toBeMapped = NodegroupUpdateConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.updateConfig = mapped
    }

    /**
     * @param value The Kubernetes version to use for your managed nodes.
     */
    @JvmName("kyhodmumdycfkpas")
    public suspend fun version(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.version = mapped
    }

    internal fun build(): NodegroupArgs = NodegroupArgs(
        amiType = amiType,
        capacityType = capacityType,
        clusterName = clusterName,
        diskSize = diskSize,
        forceUpdateEnabled = forceUpdateEnabled,
        instanceTypes = instanceTypes,
        labels = labels,
        launchTemplate = launchTemplate,
        nodeRole = nodeRole,
        nodegroupName = nodegroupName,
        releaseVersion = releaseVersion,
        remoteAccess = remoteAccess,
        scalingConfig = scalingConfig,
        subnets = subnets,
        tags = tags,
        taints = taints,
        updateConfig = updateConfig,
        version = version,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy