com.pulumi.kubernetes.autoscaling.v2beta2.kotlin.outputs.HPAScalingRulesPatch.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-kubernetes-kotlin Show documentation
Show all versions of pulumi-kubernetes-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.kubernetes.autoscaling.v2beta2.kotlin.outputs
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
/**
* HPAScalingRules configures the scaling behavior for one direction. These Rules are applied after calculating DesiredReplicas from metrics for the HPA. They can limit the scaling velocity by specifying scaling policies. They can prevent flapping by specifying the stabilization window, so that the number of replicas is not set instantly, instead, the safest value from the stabilization window is chosen.
* @property policies policies is a list of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid
* @property selectPolicy selectPolicy is used to specify which policy should be used. If not set, the default value MaxPolicySelect is used.
* @property stabilizationWindowSeconds StabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).
*/
public data class HPAScalingRulesPatch(
public val policies: List? = null,
public val selectPolicy: String? = null,
public val stabilizationWindowSeconds: Int? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.kubernetes.autoscaling.v2beta2.outputs.HPAScalingRulesPatch): HPAScalingRulesPatch = HPAScalingRulesPatch(
policies = javaType.policies().map({ args0 ->
args0.let({ args0 ->
com.pulumi.kubernetes.autoscaling.v2beta2.kotlin.outputs.HPAScalingPolicyPatch.Companion.toKotlin(args0)
})
}),
selectPolicy = javaType.selectPolicy().map({ args0 -> args0 }).orElse(null),
stabilizationWindowSeconds = javaType.stabilizationWindowSeconds().map({ args0 ->
args0
}).orElse(null),
)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy