com.pulumi.gcp.dataproc.kotlin.inputs.AutoscalingPolicySecondaryWorkerConfigArgs.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.AutoscalingPolicySecondaryWorkerConfigArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
*
* @property maxInstances Maximum number of instances for this group. Note that by default, clusters will not use
* secondary workers. Required for secondary workers if the minimum secondary instances is set.
* Bounds: [minInstances, ). Defaults to 0.
* @property minInstances Minimum number of instances for this group. Bounds: [0, maxInstances]. Defaults to 0.
* @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 AutoscalingPolicySecondaryWorkerConfigArgs(
public val maxInstances: Output? = null,
public val minInstances: Output? = null,
public val weight: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.dataproc.inputs.AutoscalingPolicySecondaryWorkerConfigArgs =
com.pulumi.gcp.dataproc.inputs.AutoscalingPolicySecondaryWorkerConfigArgs.builder()
.maxInstances(maxInstances?.applyValue({ args0 -> args0 }))
.minInstances(minInstances?.applyValue({ args0 -> args0 }))
.weight(weight?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [AutoscalingPolicySecondaryWorkerConfigArgs].
*/
@PulumiTagMarker
public class AutoscalingPolicySecondaryWorkerConfigArgsBuilder 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. Note that by default, clusters will not use
* secondary workers. Required for secondary workers if the minimum secondary instances is set.
* Bounds: [minInstances, ). Defaults to 0.
*/
@JvmName("abbitcawuoyxumqo")
public suspend fun maxInstances(`value`: Output) {
this.maxInstances = value
}
/**
* @param value Minimum number of instances for this group. Bounds: [0, maxInstances]. Defaults to 0.
*/
@JvmName("ypagwbxkpjusggdu")
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("xvwjvbeulcplhgmo")
public suspend fun weight(`value`: Output) {
this.weight = value
}
/**
* @param value Maximum number of instances for this group. Note that by default, clusters will not use
* secondary workers. Required for secondary workers if the minimum secondary instances is set.
* Bounds: [minInstances, ). Defaults to 0.
*/
@JvmName("pqmcrgrrboyvwugx")
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: [0, maxInstances]. Defaults to 0.
*/
@JvmName("pkrkngiwgnrlgfwt")
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("imddwdeonesmatrw")
public suspend fun weight(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.weight = mapped
}
internal fun build(): AutoscalingPolicySecondaryWorkerConfigArgs =
AutoscalingPolicySecondaryWorkerConfigArgs(
maxInstances = maxInstances,
minInstances = minInstances,
weight = weight,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy