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

com.pulumi.gcp.dataproc.kotlin.inputs.ClusterClusterConfigWorkerConfigArgs.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: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.dataproc.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.dataproc.inputs.ClusterClusterConfigWorkerConfigArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
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 accelerators The Compute Engine accelerator configuration for these instances. Can be specified multiple times.
 * @property diskConfig Disk Config
 * @property imageUri The URI for the image to use for this worker.  See [the guide](https://cloud.google.com/dataproc/docs/guides/dataproc-images)
 * for more information.
 * @property instanceNames List of worker instance names which have been assigned
 * to the cluster.
 * @property machineType The name of a Google Compute Engine machine type
 * to create for the worker nodes. If not specified, GCP will default to a predetermined
 * computed value (currently `n1-standard-4`).
 * @property minCpuPlatform The name of a minimum generation of CPU family
 * for the master. If not specified, GCP will default to a predetermined computed value
 * for each zone. See [the guide](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)
 * for details about which CPU families are available (and defaulted) for each zone.
 * @property minNumInstances The minimum number of primary worker instances to create.  If `min_num_instances` is set, cluster creation will succeed if the number of primary workers created is at least equal to the `min_num_instances` number.
 * @property numInstances Specifies the number of worker nodes to create.
 * If not specified, GCP will default to a predetermined computed value (currently 2).
 * There is currently a beta feature which allows you to run a
 * [Single Node Cluster](https://cloud.google.com/dataproc/docs/concepts/single-node-clusters).
 * In order to take advantage of this you need to set
 * `"dataproc:dataproc.allow.zero.workers" = "true"` in
 * `cluster_config.software_config.properties`
 */
public data class ClusterClusterConfigWorkerConfigArgs(
    public val accelerators: Output>? = null,
    public val diskConfig: Output? = null,
    public val imageUri: Output? = null,
    public val instanceNames: Output>? = null,
    public val machineType: Output? = null,
    public val minCpuPlatform: Output? = null,
    public val minNumInstances: Output? = null,
    public val numInstances: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.dataproc.inputs.ClusterClusterConfigWorkerConfigArgs =
        com.pulumi.gcp.dataproc.inputs.ClusterClusterConfigWorkerConfigArgs.builder()
            .accelerators(
                accelerators?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .diskConfig(diskConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .imageUri(imageUri?.applyValue({ args0 -> args0 }))
            .instanceNames(instanceNames?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .machineType(machineType?.applyValue({ args0 -> args0 }))
            .minCpuPlatform(minCpuPlatform?.applyValue({ args0 -> args0 }))
            .minNumInstances(minNumInstances?.applyValue({ args0 -> args0 }))
            .numInstances(numInstances?.applyValue({ args0 -> args0 })).build()
}

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

    private var diskConfig: Output? = null

    private var imageUri: Output? = null

    private var instanceNames: Output>? = null

    private var machineType: Output? = null

    private var minCpuPlatform: Output? = null

    private var minNumInstances: Output? = null

    private var numInstances: Output? = null

    /**
     * @param value The Compute Engine accelerator configuration for these instances. Can be specified multiple times.
     */
    @JvmName("fyvxfceopirqxygm")
    public suspend fun accelerators(`value`: Output>) {
        this.accelerators = value
    }

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

    /**
     * @param values The Compute Engine accelerator configuration for these instances. Can be specified multiple times.
     */
    @JvmName("jbmgrieecgwrqslp")
    public suspend fun accelerators(values: List>) {
        this.accelerators = Output.all(values)
    }

    /**
     * @param value Disk Config
     */
    @JvmName("djjwuupcquenkaxc")
    public suspend fun diskConfig(`value`: Output) {
        this.diskConfig = value
    }

    /**
     * @param value The URI for the image to use for this worker.  See [the guide](https://cloud.google.com/dataproc/docs/guides/dataproc-images)
     * for more information.
     */
    @JvmName("nxewjxbwkuhrygnn")
    public suspend fun imageUri(`value`: Output) {
        this.imageUri = value
    }

    /**
     * @param value List of worker instance names which have been assigned
     * to the cluster.
     */
    @JvmName("rqlrxuvajbknedyg")
    public suspend fun instanceNames(`value`: Output>) {
        this.instanceNames = value
    }

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

    /**
     * @param values List of worker instance names which have been assigned
     * to the cluster.
     */
    @JvmName("gajscbncwsqnwoyk")
    public suspend fun instanceNames(values: List>) {
        this.instanceNames = Output.all(values)
    }

    /**
     * @param value The name of a Google Compute Engine machine type
     * to create for the worker nodes. If not specified, GCP will default to a predetermined
     * computed value (currently `n1-standard-4`).
     */
    @JvmName("rippechhlustkmec")
    public suspend fun machineType(`value`: Output) {
        this.machineType = value
    }

    /**
     * @param value The name of a minimum generation of CPU family
     * for the master. If not specified, GCP will default to a predetermined computed value
     * for each zone. See [the guide](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)
     * for details about which CPU families are available (and defaulted) for each zone.
     */
    @JvmName("udxymjaawysfdljy")
    public suspend fun minCpuPlatform(`value`: Output) {
        this.minCpuPlatform = value
    }

    /**
     * @param value The minimum number of primary worker instances to create.  If `min_num_instances` is set, cluster creation will succeed if the number of primary workers created is at least equal to the `min_num_instances` number.
     */
    @JvmName("xkfjiycddhhxjeas")
    public suspend fun minNumInstances(`value`: Output) {
        this.minNumInstances = value
    }

    /**
     * @param value Specifies the number of worker nodes to create.
     * If not specified, GCP will default to a predetermined computed value (currently 2).
     * There is currently a beta feature which allows you to run a
     * [Single Node Cluster](https://cloud.google.com/dataproc/docs/concepts/single-node-clusters).
     * In order to take advantage of this you need to set
     * `"dataproc:dataproc.allow.zero.workers" = "true"` in
     * `cluster_config.software_config.properties`
     */
    @JvmName("wgnqladcmnvkbviw")
    public suspend fun numInstances(`value`: Output) {
        this.numInstances = value
    }

    /**
     * @param value The Compute Engine accelerator configuration for these instances. Can be specified multiple times.
     */
    @JvmName("spdydawbxnoovicp")
    public suspend fun accelerators(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accelerators = mapped
    }

    /**
     * @param argument The Compute Engine accelerator configuration for these instances. Can be specified multiple times.
     */
    @JvmName("ckgurwatglcavseq")
    public suspend fun accelerators(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ClusterClusterConfigWorkerConfigAcceleratorArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.accelerators = mapped
    }

    /**
     * @param argument The Compute Engine accelerator configuration for these instances. Can be specified multiple times.
     */
    @JvmName("rresonbfaiieegfh")
    public suspend fun accelerators(vararg argument: suspend ClusterClusterConfigWorkerConfigAcceleratorArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ClusterClusterConfigWorkerConfigAcceleratorArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.accelerators = mapped
    }

    /**
     * @param argument The Compute Engine accelerator configuration for these instances. Can be specified multiple times.
     */
    @JvmName("slrfdtojvbcaxcqn")
    public suspend fun accelerators(argument: suspend ClusterClusterConfigWorkerConfigAcceleratorArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ClusterClusterConfigWorkerConfigAcceleratorArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.accelerators = mapped
    }

    /**
     * @param values The Compute Engine accelerator configuration for these instances. Can be specified multiple times.
     */
    @JvmName("usawqhqqjgdkhinx")
    public suspend fun accelerators(vararg values: ClusterClusterConfigWorkerConfigAcceleratorArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.accelerators = mapped
    }

    /**
     * @param value Disk Config
     */
    @JvmName("wyxkyjltipeqvdst")
    public suspend fun diskConfig(`value`: ClusterClusterConfigWorkerConfigDiskConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskConfig = mapped
    }

    /**
     * @param argument Disk Config
     */
    @JvmName("ycanohtufcsferrd")
    public suspend fun diskConfig(argument: suspend ClusterClusterConfigWorkerConfigDiskConfigArgsBuilder.() -> Unit) {
        val toBeMapped = ClusterClusterConfigWorkerConfigDiskConfigArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.diskConfig = mapped
    }

    /**
     * @param value The URI for the image to use for this worker.  See [the guide](https://cloud.google.com/dataproc/docs/guides/dataproc-images)
     * for more information.
     */
    @JvmName("gfdqbmttyranyueg")
    public suspend fun imageUri(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.imageUri = mapped
    }

    /**
     * @param value List of worker instance names which have been assigned
     * to the cluster.
     */
    @JvmName("votdxcdgtgdsxyjn")
    public suspend fun instanceNames(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceNames = mapped
    }

    /**
     * @param values List of worker instance names which have been assigned
     * to the cluster.
     */
    @JvmName("xubvugsvhyatmpqy")
    public suspend fun instanceNames(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.instanceNames = mapped
    }

    /**
     * @param value The name of a Google Compute Engine machine type
     * to create for the worker nodes. If not specified, GCP will default to a predetermined
     * computed value (currently `n1-standard-4`).
     */
    @JvmName("ityromclbxyjbiyp")
    public suspend fun machineType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.machineType = mapped
    }

    /**
     * @param value The name of a minimum generation of CPU family
     * for the master. If not specified, GCP will default to a predetermined computed value
     * for each zone. See [the guide](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)
     * for details about which CPU families are available (and defaulted) for each zone.
     */
    @JvmName("raldpwaslgtihltb")
    public suspend fun minCpuPlatform(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.minCpuPlatform = mapped
    }

    /**
     * @param value The minimum number of primary worker instances to create.  If `min_num_instances` is set, cluster creation will succeed if the number of primary workers created is at least equal to the `min_num_instances` number.
     */
    @JvmName("txhjikdoqatlxubl")
    public suspend fun minNumInstances(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.minNumInstances = mapped
    }

    /**
     * @param value Specifies the number of worker nodes to create.
     * If not specified, GCP will default to a predetermined computed value (currently 2).
     * There is currently a beta feature which allows you to run a
     * [Single Node Cluster](https://cloud.google.com/dataproc/docs/concepts/single-node-clusters).
     * In order to take advantage of this you need to set
     * `"dataproc:dataproc.allow.zero.workers" = "true"` in
     * `cluster_config.software_config.properties`
     */
    @JvmName("fshnpeqdtnoyfhmv")
    public suspend fun numInstances(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.numInstances = mapped
    }

    internal fun build(): ClusterClusterConfigWorkerConfigArgs = ClusterClusterConfigWorkerConfigArgs(
        accelerators = accelerators,
        diskConfig = diskConfig,
        imageUri = imageUri,
        instanceNames = instanceNames,
        machineType = machineType,
        minCpuPlatform = minCpuPlatform,
        minNumInstances = minNumInstances,
        numInstances = numInstances,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy