com.pulumi.gcp.compute.kotlin.inputs.RegionAutoscalerAutoscalingPolicyCpuUtilizationArgs.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.compute.kotlin.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.inputs.RegionAutoscalerAutoscalingPolicyCpuUtilizationArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Double
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
*
* @property predictiveMethod Indicates whether predictive autoscaling based on CPU metric is enabled. Valid values are:
* - NONE (default). No predictive method is used. The autoscaler scales the group to meet current demand based on real-time metrics.
* - OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability by monitoring daily and weekly load patterns and scaling out ahead of anticipated demand.
* @property target The target CPU utilization that the autoscaler should maintain.
* Must be a float value in the range (0, 1]. If not specified, the
* default is 0.6.
* If the CPU level is below the target utilization, the autoscaler
* scales down the number of instances until it reaches the minimum
* number of instances you specified or until the average CPU of
* your instances reaches the target utilization.
* If the average CPU is above the target utilization, the autoscaler
* scales up until it reaches the maximum number of instances you
* specified or until the average utilization reaches the target
* utilization.
*/
public data class RegionAutoscalerAutoscalingPolicyCpuUtilizationArgs(
public val predictiveMethod: Output? = null,
public val target: Output,
) :
ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.compute.inputs.RegionAutoscalerAutoscalingPolicyCpuUtilizationArgs =
com.pulumi.gcp.compute.inputs.RegionAutoscalerAutoscalingPolicyCpuUtilizationArgs.builder()
.predictiveMethod(predictiveMethod?.applyValue({ args0 -> args0 }))
.target(target.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [RegionAutoscalerAutoscalingPolicyCpuUtilizationArgs].
*/
@PulumiTagMarker
public class RegionAutoscalerAutoscalingPolicyCpuUtilizationArgsBuilder internal constructor() {
private var predictiveMethod: Output? = null
private var target: Output? = null
/**
* @param value Indicates whether predictive autoscaling based on CPU metric is enabled. Valid values are:
* - NONE (default). No predictive method is used. The autoscaler scales the group to meet current demand based on real-time metrics.
* - OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability by monitoring daily and weekly load patterns and scaling out ahead of anticipated demand.
*/
@JvmName("qwfcpqfucahkovdj")
public suspend fun predictiveMethod(`value`: Output) {
this.predictiveMethod = value
}
/**
* @param value The target CPU utilization that the autoscaler should maintain.
* Must be a float value in the range (0, 1]. If not specified, the
* default is 0.6.
* If the CPU level is below the target utilization, the autoscaler
* scales down the number of instances until it reaches the minimum
* number of instances you specified or until the average CPU of
* your instances reaches the target utilization.
* If the average CPU is above the target utilization, the autoscaler
* scales up until it reaches the maximum number of instances you
* specified or until the average utilization reaches the target
* utilization.
*/
@JvmName("hntsvcpmvuxmfsxo")
public suspend fun target(`value`: Output) {
this.target = value
}
/**
* @param value Indicates whether predictive autoscaling based on CPU metric is enabled. Valid values are:
* - NONE (default). No predictive method is used. The autoscaler scales the group to meet current demand based on real-time metrics.
* - OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability by monitoring daily and weekly load patterns and scaling out ahead of anticipated demand.
*/
@JvmName("gnpruiwvwqrbpqkw")
public suspend fun predictiveMethod(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.predictiveMethod = mapped
}
/**
* @param value The target CPU utilization that the autoscaler should maintain.
* Must be a float value in the range (0, 1]. If not specified, the
* default is 0.6.
* If the CPU level is below the target utilization, the autoscaler
* scales down the number of instances until it reaches the minimum
* number of instances you specified or until the average CPU of
* your instances reaches the target utilization.
* If the average CPU is above the target utilization, the autoscaler
* scales up until it reaches the maximum number of instances you
* specified or until the average utilization reaches the target
* utilization.
*/
@JvmName("tchchxtdaqojduck")
public suspend fun target(`value`: Double) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.target = mapped
}
internal fun build(): RegionAutoscalerAutoscalingPolicyCpuUtilizationArgs =
RegionAutoscalerAutoscalingPolicyCpuUtilizationArgs(
predictiveMethod = predictiveMethod,
target = target ?: throw PulumiNullFieldException("target"),
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy