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

com.pulumi.awsnative.eks.kotlin.Nodegroup.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: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.eks.kotlin

import com.pulumi.awsnative.eks.kotlin.outputs.NodegroupLaunchTemplateSpecification
import com.pulumi.awsnative.eks.kotlin.outputs.NodegroupRemoteAccess
import com.pulumi.awsnative.eks.kotlin.outputs.NodegroupScalingConfig
import com.pulumi.awsnative.eks.kotlin.outputs.NodegroupTaint
import com.pulumi.awsnative.eks.kotlin.outputs.NodegroupUpdateConfig
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.awsnative.eks.kotlin.outputs.NodegroupLaunchTemplateSpecification.Companion.toKotlin as nodegroupLaunchTemplateSpecificationToKotlin
import com.pulumi.awsnative.eks.kotlin.outputs.NodegroupRemoteAccess.Companion.toKotlin as nodegroupRemoteAccessToKotlin
import com.pulumi.awsnative.eks.kotlin.outputs.NodegroupScalingConfig.Companion.toKotlin as nodegroupScalingConfigToKotlin
import com.pulumi.awsnative.eks.kotlin.outputs.NodegroupTaint.Companion.toKotlin as nodegroupTaintToKotlin
import com.pulumi.awsnative.eks.kotlin.outputs.NodegroupUpdateConfig.Companion.toKotlin as nodegroupUpdateConfigToKotlin

/**
 * Builder for [Nodegroup].
 */
@PulumiTagMarker
public class NodegroupResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: NodegroupArgs = NodegroupArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend NodegroupArgsBuilder.() -> Unit) {
        val builder = NodegroupArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): Nodegroup {
        val builtJavaResource = com.pulumi.awsnative.eks.Nodegroup(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Nodegroup(builtJavaResource)
    }
}

/**
 * Resource schema for AWS::EKS::Nodegroup
 * ## Example Usage
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 */
public class Nodegroup internal constructor(
    override val javaResource: com.pulumi.awsnative.eks.Nodegroup,
) : KotlinCustomResource(javaResource, NodegroupMapper) {
    /**
     * The AMI type for your node group.
     */
    public val amiType: Output?
        get() = javaResource.amiType().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The Amazon Resource Name (ARN) associated with the managed node group.
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    public val awsId: Output
        get() = javaResource.awsId().applyValue({ args0 -> args0 })

    /**
     * The capacity type of your managed node group.
     */
    public val capacityType: Output?
        get() = javaResource.capacityType().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Name of the cluster to create the node group in.
     */
    public val clusterName: Output
        get() = javaResource.clusterName().applyValue({ args0 -> args0 })

    /**
     * The root device disk size (in GiB) for your node group instances.
     */
    public val diskSize: Output?
        get() = javaResource.diskSize().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * Force the update if the existing node group's pods are unable to be drained due to a pod disruption budget issue.
     */
    public val forceUpdateEnabled: Output?
        get() = javaResource.forceUpdateEnabled().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Specify the instance types for a node group.
     */
    public val instanceTypes: Output>?
        get() = javaResource.instanceTypes().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 -> args0 })
            }).orElse(null)
        })

    /**
     * The Kubernetes labels to be applied to the nodes in the node group when they are created.
     */
    public val labels: Output>?
        get() = javaResource.labels().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })

    /**
     * An object representing a node group's launch template specification.
     */
    public val launchTemplate: Output?
        get() = javaResource.launchTemplate().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> nodegroupLaunchTemplateSpecificationToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The Amazon Resource Name (ARN) of the IAM role to associate with your node group.
     */
    public val nodeRole: Output
        get() = javaResource.nodeRole().applyValue({ args0 -> args0 })

    /**
     * The unique name to give your node group.
     */
    public val nodegroupName: Output?
        get() = javaResource.nodegroupName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The AMI version of the Amazon EKS-optimized AMI to use with your node group.
     */
    public val releaseVersion: Output?
        get() = javaResource.releaseVersion().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The remote access (SSH) configuration to use with your node group.
     */
    public val remoteAccess: Output?
        get() = javaResource.remoteAccess().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    nodegroupRemoteAccessToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The scaling configuration details for the Auto Scaling group that is created for your node group.
     */
    public val scalingConfig: Output?
        get() = javaResource.scalingConfig().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> nodegroupScalingConfigToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The subnets to use for the Auto Scaling group that is created for your node group.
     */
    public val subnets: Output>
        get() = javaResource.subnets().applyValue({ args0 -> args0.map({ args0 -> args0 }) })

    /**
     * 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.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })

    /**
     * The Kubernetes taints to be applied to the nodes in the node group when they are created.
     */
    public val taints: Output>?
        get() = javaResource.taints().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> nodegroupTaintToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * The node group update configuration.
     */
    public val updateConfig: Output?
        get() = javaResource.updateConfig().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    nodegroupUpdateConfigToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The Kubernetes version to use for your managed nodes.
     */
    public val version: Output?
        get() = javaResource.version().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
}

public object NodegroupMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.eks.Nodegroup::class == javaResource::class

    override fun map(javaResource: Resource): Nodegroup = Nodegroup(
        javaResource as
            com.pulumi.awsnative.eks.Nodegroup,
    )
}

/**
 * @see [Nodegroup].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [Nodegroup].
 */
public suspend fun nodegroup(name: String, block: suspend NodegroupResourceBuilder.() -> Unit): Nodegroup {
    val builder = NodegroupResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [Nodegroup].
 * @param name The _unique_ name of the resulting resource.
 */
public fun nodegroup(name: String): Nodegroup {
    val builder = NodegroupResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy