com.pulumi.gcp.compute.kotlin.inputs.RegionAutoscalerAutoscalingPolicyArgs.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.RegionAutoscalerAutoscalingPolicyArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
*
* @property cooldownPeriod The number of seconds that the autoscaler should wait before it
* starts collecting information from a new instance. This prevents
* the autoscaler from collecting information when the instance is
* initializing, during which the collected usage would not be
* reliable. The default time autoscaler waits is 60 seconds.
* Virtual machine initialization times might vary because of
* numerous factors. We recommend that you test how long an
* instance may take to initialize. To do this, create an instance
* and time the startup process.
* @property cpuUtilization Defines the CPU utilization policy that allows the autoscaler to
* scale based on the average CPU utilization of a managed instance
* group.
* Structure is documented below.
* @property loadBalancingUtilization Configuration parameters of autoscaling based on a load balancer.
* Structure is documented below.
* @property maxReplicas The maximum number of instances that the autoscaler can scale up
* to. This is required when creating or updating an autoscaler. The
* maximum number of replicas should not be lower than minimal number
* of replicas.
* @property metrics Configuration parameters of autoscaling based on a custom metric.
* Structure is documented below.
* @property minReplicas The minimum number of replicas that the autoscaler can scale down
* to. This cannot be less than 0. If not provided, autoscaler will
* choose a default value depending on maximum number of instances
* allowed.
* @property mode Defines operating mode for this policy.
* @property scaleDownControl Defines scale down controls to reduce the risk of response latency
* and outages due to abrupt scale-in events
* Structure is documented below.
* @property scaleInControl Defines scale in controls to reduce the risk of response latency
* and outages due to abrupt scale-in events
* Structure is documented below.
* @property scalingSchedules Scaling schedules defined for an autoscaler. Multiple schedules can be set on an autoscaler and they can overlap.
* Structure is documented below.
*/
public data class RegionAutoscalerAutoscalingPolicyArgs(
public val cooldownPeriod: Output? = null,
public val cpuUtilization: Output? = null,
public val loadBalancingUtilization: Output? = null,
public val maxReplicas: Output,
public val metrics: Output>? = null,
public val minReplicas: Output,
public val mode: Output? = null,
public val scaleDownControl: Output? =
null,
public val scaleInControl: Output? = null,
public val scalingSchedules: Output>? =
null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.compute.inputs.RegionAutoscalerAutoscalingPolicyArgs =
com.pulumi.gcp.compute.inputs.RegionAutoscalerAutoscalingPolicyArgs.builder()
.cooldownPeriod(cooldownPeriod?.applyValue({ args0 -> args0 }))
.cpuUtilization(cpuUtilization?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.loadBalancingUtilization(
loadBalancingUtilization?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.maxReplicas(maxReplicas.applyValue({ args0 -> args0 }))
.metrics(
metrics?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.minReplicas(minReplicas.applyValue({ args0 -> args0 }))
.mode(mode?.applyValue({ args0 -> args0 }))
.scaleDownControl(scaleDownControl?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.scaleInControl(scaleInControl?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.scalingSchedules(
scalingSchedules?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [RegionAutoscalerAutoscalingPolicyArgs].
*/
@PulumiTagMarker
public class RegionAutoscalerAutoscalingPolicyArgsBuilder internal constructor() {
private var cooldownPeriod: Output? = null
private var cpuUtilization: Output? = null
private var loadBalancingUtilization:
Output? = null
private var maxReplicas: Output? = null
private var metrics: Output>? = null
private var minReplicas: Output? = null
private var mode: Output? = null
private var scaleDownControl: Output? =
null
private var scaleInControl: Output? = null
private var scalingSchedules: Output>? =
null
/**
* @param value The number of seconds that the autoscaler should wait before it
* starts collecting information from a new instance. This prevents
* the autoscaler from collecting information when the instance is
* initializing, during which the collected usage would not be
* reliable. The default time autoscaler waits is 60 seconds.
* Virtual machine initialization times might vary because of
* numerous factors. We recommend that you test how long an
* instance may take to initialize. To do this, create an instance
* and time the startup process.
*/
@JvmName("bxqahbfjxpwpdwcq")
public suspend fun cooldownPeriod(`value`: Output) {
this.cooldownPeriod = value
}
/**
* @param value Defines the CPU utilization policy that allows the autoscaler to
* scale based on the average CPU utilization of a managed instance
* group.
* Structure is documented below.
*/
@JvmName("kmantirsnnvubgmt")
public suspend fun cpuUtilization(`value`: Output) {
this.cpuUtilization = value
}
/**
* @param value Configuration parameters of autoscaling based on a load balancer.
* Structure is documented below.
*/
@JvmName("amwrvadlxqckuhcf")
public suspend fun loadBalancingUtilization(`value`: Output) {
this.loadBalancingUtilization = value
}
/**
* @param value The maximum number of instances that the autoscaler can scale up
* to. This is required when creating or updating an autoscaler. The
* maximum number of replicas should not be lower than minimal number
* of replicas.
*/
@JvmName("ejthevoapncigfxf")
public suspend fun maxReplicas(`value`: Output) {
this.maxReplicas = value
}
/**
* @param value Configuration parameters of autoscaling based on a custom metric.
* Structure is documented below.
*/
@JvmName("ntdvwcwqqmicdsbo")
public suspend fun metrics(`value`: Output>) {
this.metrics = value
}
@JvmName("vxipsjvcfsqntboj")
public suspend fun metrics(vararg values: Output) {
this.metrics = Output.all(values.asList())
}
/**
* @param values Configuration parameters of autoscaling based on a custom metric.
* Structure is documented below.
*/
@JvmName("qkixjexxbxndbdkn")
public suspend fun metrics(values: List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy