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

com.pulumi.awsnative.sagemaker.kotlin.ClusterArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.sagemaker.kotlin

import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.awsnative.sagemaker.ClusterArgs.builder
import com.pulumi.awsnative.sagemaker.kotlin.enums.ClusterNodeRecovery
import com.pulumi.awsnative.sagemaker.kotlin.inputs.ClusterInstanceGroupArgs
import com.pulumi.awsnative.sagemaker.kotlin.inputs.ClusterInstanceGroupArgsBuilder
import com.pulumi.awsnative.sagemaker.kotlin.inputs.ClusterOrchestratorArgs
import com.pulumi.awsnative.sagemaker.kotlin.inputs.ClusterOrchestratorArgsBuilder
import com.pulumi.awsnative.sagemaker.kotlin.inputs.ClusterVpcConfigArgs
import com.pulumi.awsnative.sagemaker.kotlin.inputs.ClusterVpcConfigArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Resource Type definition for AWS::SageMaker::Cluster
 * @property clusterName The name of the HyperPod Cluster.
 * @property instanceGroups
 * @property nodeRecovery If node auto-recovery is set to true, faulty nodes will be replaced or rebooted when a failure is detected. If set to false, nodes will be labelled when a fault is detected.
 * @property orchestrator
 * @property tags Custom tags for managing the SageMaker HyperPod cluster as an AWS resource. You can add tags to your cluster in the same way you add them in other AWS services that support tagging.
 * @property vpcConfig Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to. You can control access to and from your resources by configuring a VPC. For more information, see [Give SageMaker Access to Resources in your Amazon VPC](https://docs.aws.amazon.com/sagemaker/latest/dg/infrastructure-give-access.html) .
 */
public data class ClusterArgs(
    public val clusterName: Output? = null,
    public val instanceGroups: Output>? = null,
    public val nodeRecovery: Output? = null,
    public val orchestrator: Output? = null,
    public val tags: Output>? = null,
    public val vpcConfig: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.sagemaker.ClusterArgs =
        com.pulumi.awsnative.sagemaker.ClusterArgs.builder()
            .clusterName(clusterName?.applyValue({ args0 -> args0 }))
            .instanceGroups(
                instanceGroups?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .nodeRecovery(nodeRecovery?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .orchestrator(orchestrator?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .vpcConfig(vpcConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [ClusterArgs].
 */
@PulumiTagMarker
public class ClusterArgsBuilder internal constructor() {
    private var clusterName: Output? = null

    private var instanceGroups: Output>? = null

    private var nodeRecovery: Output? = null

    private var orchestrator: Output? = null

    private var tags: Output>? = null

    private var vpcConfig: Output? = null

    /**
     * @param value The name of the HyperPod Cluster.
     */
    @JvmName("lnynngvnwwiwehvw")
    public suspend fun clusterName(`value`: Output) {
        this.clusterName = value
    }

    /**
     * @param value
     */
    @JvmName("nitcagnesychwdee")
    public suspend fun instanceGroups(`value`: Output>) {
        this.instanceGroups = value
    }

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

    /**
     * @param values
     */
    @JvmName("iqhtnxunyaehyunm")
    public suspend fun instanceGroups(values: List>) {
        this.instanceGroups = Output.all(values)
    }

    /**
     * @param value If node auto-recovery is set to true, faulty nodes will be replaced or rebooted when a failure is detected. If set to false, nodes will be labelled when a fault is detected.
     */
    @JvmName("vfjrxhebyjiceeue")
    public suspend fun nodeRecovery(`value`: Output) {
        this.nodeRecovery = value
    }

    /**
     * @param value
     */
    @JvmName("okqyqckafhmentai")
    public suspend fun orchestrator(`value`: Output) {
        this.orchestrator = value
    }

    /**
     * @param value Custom tags for managing the SageMaker HyperPod cluster as an AWS resource. You can add tags to your cluster in the same way you add them in other AWS services that support tagging.
     */
    @JvmName("kqhdfbxwmqxmjvto")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values Custom tags for managing the SageMaker HyperPod cluster as an AWS resource. You can add tags to your cluster in the same way you add them in other AWS services that support tagging.
     */
    @JvmName("nmlfoeqqfihtwfer")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to. You can control access to and from your resources by configuring a VPC. For more information, see [Give SageMaker Access to Resources in your Amazon VPC](https://docs.aws.amazon.com/sagemaker/latest/dg/infrastructure-give-access.html) .
     */
    @JvmName("mqilpcoqxaxrtuih")
    public suspend fun vpcConfig(`value`: Output) {
        this.vpcConfig = value
    }

    /**
     * @param value The name of the HyperPod Cluster.
     */
    @JvmName("qlhtnbnyfjbmdmmf")
    public suspend fun clusterName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clusterName = mapped
    }

    /**
     * @param value
     */
    @JvmName("fmpnbvnavldmfjsk")
    public suspend fun instanceGroups(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceGroups = mapped
    }

    /**
     * @param argument
     */
    @JvmName("sxawycbltqymxyfx")
    public suspend fun instanceGroups(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ClusterInstanceGroupArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.instanceGroups = mapped
    }

    /**
     * @param argument
     */
    @JvmName("ytyfbtfdgqjixlub")
    public suspend fun instanceGroups(vararg argument: suspend ClusterInstanceGroupArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ClusterInstanceGroupArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.instanceGroups = mapped
    }

    /**
     * @param argument
     */
    @JvmName("jrchbqsyuloahbgj")
    public suspend fun instanceGroups(argument: suspend ClusterInstanceGroupArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ClusterInstanceGroupArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.instanceGroups = mapped
    }

    /**
     * @param values
     */
    @JvmName("mugkcmjvxcecacyo")
    public suspend fun instanceGroups(vararg values: ClusterInstanceGroupArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.instanceGroups = mapped
    }

    /**
     * @param value If node auto-recovery is set to true, faulty nodes will be replaced or rebooted when a failure is detected. If set to false, nodes will be labelled when a fault is detected.
     */
    @JvmName("dodhhpilpruwwetd")
    public suspend fun nodeRecovery(`value`: ClusterNodeRecovery?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.nodeRecovery = mapped
    }

    /**
     * @param value
     */
    @JvmName("ttduwanaqtpcqdsq")
    public suspend fun orchestrator(`value`: ClusterOrchestratorArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.orchestrator = mapped
    }

    /**
     * @param argument
     */
    @JvmName("vejwielmrdxnjhld")
    public suspend fun orchestrator(argument: suspend ClusterOrchestratorArgsBuilder.() -> Unit) {
        val toBeMapped = ClusterOrchestratorArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.orchestrator = mapped
    }

    /**
     * @param value Custom tags for managing the SageMaker HyperPod cluster as an AWS resource. You can add tags to your cluster in the same way you add them in other AWS services that support tagging.
     */
    @JvmName("ghwvuimbfjwlnfpj")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument Custom tags for managing the SageMaker HyperPod cluster as an AWS resource. You can add tags to your cluster in the same way you add them in other AWS services that support tagging.
     */
    @JvmName("ynbgkwanymstbooq")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument Custom tags for managing the SageMaker HyperPod cluster as an AWS resource. You can add tags to your cluster in the same way you add them in other AWS services that support tagging.
     */
    @JvmName("mneitsmebiwnlirv")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument Custom tags for managing the SageMaker HyperPod cluster as an AWS resource. You can add tags to your cluster in the same way you add them in other AWS services that support tagging.
     */
    @JvmName("ifeqoitylqhspmtf")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values Custom tags for managing the SageMaker HyperPod cluster as an AWS resource. You can add tags to your cluster in the same way you add them in other AWS services that support tagging.
     */
    @JvmName("axwsjntovvojlpgw")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to. You can control access to and from your resources by configuring a VPC. For more information, see [Give SageMaker Access to Resources in your Amazon VPC](https://docs.aws.amazon.com/sagemaker/latest/dg/infrastructure-give-access.html) .
     */
    @JvmName("qxccdujmwxiutuwd")
    public suspend fun vpcConfig(`value`: ClusterVpcConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vpcConfig = mapped
    }

    /**
     * @param argument Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to. You can control access to and from your resources by configuring a VPC. For more information, see [Give SageMaker Access to Resources in your Amazon VPC](https://docs.aws.amazon.com/sagemaker/latest/dg/infrastructure-give-access.html) .
     */
    @JvmName("gjyuynxyqataroat")
    public suspend fun vpcConfig(argument: suspend ClusterVpcConfigArgsBuilder.() -> Unit) {
        val toBeMapped = ClusterVpcConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.vpcConfig = mapped
    }

    internal fun build(): ClusterArgs = ClusterArgs(
        clusterName = clusterName,
        instanceGroups = instanceGroups,
        nodeRecovery = nodeRecovery,
        orchestrator = orchestrator,
        tags = tags,
        vpcConfig = vpcConfig,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy