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

com.pulumi.gcp.dataproc.kotlin.outputs.AutoscalingPolicyWorkerConfig.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.outputs

import kotlin.Int
import kotlin.Suppress

/**
 *
 * @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 AutoscalingPolicyWorkerConfig(
    public val maxInstances: Int,
    public val minInstances: Int? = null,
    public val weight: Int? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.gcp.dataproc.outputs.AutoscalingPolicyWorkerConfig): AutoscalingPolicyWorkerConfig = AutoscalingPolicyWorkerConfig(
            maxInstances = javaType.maxInstances(),
            minInstances = javaType.minInstances().map({ args0 -> args0 }).orElse(null),
            weight = javaType.weight().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy