com.pulumi.gcp.dataproc.kotlin.inputs.AutoscalingPolicyWorkerConfigArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@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.AutoscalingPolicyWorkerConfigArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
*
* @property maxInstances Maximum number of instances for this group.
* @property minInstances Minimum number of instances for this group. Bounds: [2, maxInstances]. Defaults to 2.
* @property weight Weight for the instance group, which is used to determine the fraction of total workers
* in the cluster from this instance group. For example, if primary workers have weight 2,
* and secondary workers have weight 1, the cluster will have approximately 2 primary workers
* for each secondary worker.
* The cluster may not reach the specified balance if constrained by min/max bounds or other
* autoscaling settings. For example, if maxInstances for secondary workers is 0, then only
* primary workers will be added. The cluster can also be out of balance when created.
* If weight is not set on any instance group, the cluster will default to equal weight for
* all groups: the cluster will attempt to maintain an equal number of workers in each group
* within the configured size bounds for each group. If weight is set for one group only,
* the cluster will default to zero weight on the unset group. For example if weight is set
* only on primary workers, the cluster will use primary workers only and no secondary workers.
*/
public data class AutoscalingPolicyWorkerConfigArgs(
public val maxInstances: Output,
public val minInstances: Output? = null,
public val weight: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.dataproc.inputs.AutoscalingPolicyWorkerConfigArgs =
com.pulumi.gcp.dataproc.inputs.AutoscalingPolicyWorkerConfigArgs.builder()
.maxInstances(maxInstances.applyValue({ args0 -> args0 }))
.minInstances(minInstances?.applyValue({ args0 -> args0 }))
.weight(weight?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [AutoscalingPolicyWorkerConfigArgs].
*/
@PulumiTagMarker
public class AutoscalingPolicyWorkerConfigArgsBuilder internal constructor() {
private var maxInstances: Output? = null
private var minInstances: Output? = null
private var weight: Output? = null
/**
* @param value Maximum number of instances for this group.
*/
@JvmName("xoveeelfowvsrhoq")
public suspend fun maxInstances(`value`: Output) {
this.maxInstances = value
}
/**
* @param value Minimum number of instances for this group. Bounds: [2, maxInstances]. Defaults to 2.
*/
@JvmName("nhltusvhfmnjwxst")
public suspend fun minInstances(`value`: Output) {
this.minInstances = value
}
/**
* @param value Weight for the instance group, which is used to determine the fraction of total workers
* in the cluster from this instance group. For example, if primary workers have weight 2,
* and secondary workers have weight 1, the cluster will have approximately 2 primary workers
* for each secondary worker.
* The cluster may not reach the specified balance if constrained by min/max bounds or other
* autoscaling settings. For example, if maxInstances for secondary workers is 0, then only
* primary workers will be added. The cluster can also be out of balance when created.
* If weight is not set on any instance group, the cluster will default to equal weight for
* all groups: the cluster will attempt to maintain an equal number of workers in each group
* within the configured size bounds for each group. If weight is set for one group only,
* the cluster will default to zero weight on the unset group. For example if weight is set
* only on primary workers, the cluster will use primary workers only and no secondary workers.
*/
@JvmName("wavlhhetnxbmbiuv")
public suspend fun weight(`value`: Output) {
this.weight = value
}
/**
* @param value Maximum number of instances for this group.
*/
@JvmName("dxntarnclspjoomk")
public suspend fun maxInstances(`value`: Int) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.maxInstances = mapped
}
/**
* @param value Minimum number of instances for this group. Bounds: [2, maxInstances]. Defaults to 2.
*/
@JvmName("xpktegdhyvalnojr")
public suspend fun minInstances(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.minInstances = mapped
}
/**
* @param value Weight for the instance group, which is used to determine the fraction of total workers
* in the cluster from this instance group. For example, if primary workers have weight 2,
* and secondary workers have weight 1, the cluster will have approximately 2 primary workers
* for each secondary worker.
* The cluster may not reach the specified balance if constrained by min/max bounds or other
* autoscaling settings. For example, if maxInstances for secondary workers is 0, then only
* primary workers will be added. The cluster can also be out of balance when created.
* If weight is not set on any instance group, the cluster will default to equal weight for
* all groups: the cluster will attempt to maintain an equal number of workers in each group
* within the configured size bounds for each group. If weight is set for one group only,
* the cluster will default to zero weight on the unset group. For example if weight is set
* only on primary workers, the cluster will use primary workers only and no secondary workers.
*/
@JvmName("ogxtxdnvqrrkwyvj")
public suspend fun weight(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.weight = mapped
}
internal fun build(): AutoscalingPolicyWorkerConfigArgs = AutoscalingPolicyWorkerConfigArgs(
maxInstances = maxInstances ?: throw PulumiNullFieldException("maxInstances"),
minInstances = minInstances,
weight = weight,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy