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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy