com.pulumi.gcp.compute.kotlin.outputs.RegionAutoscalerAutoscalingPolicy.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.outputs
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
/**
*
* @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 RegionAutoscalerAutoscalingPolicy(
public val cooldownPeriod: Int? = null,
public val cpuUtilization: RegionAutoscalerAutoscalingPolicyCpuUtilization? = null,
public val loadBalancingUtilization: RegionAutoscalerAutoscalingPolicyLoadBalancingUtilization? =
null,
public val maxReplicas: Int,
public val metrics: List? = null,
public val minReplicas: Int,
public val mode: String? = null,
public val scaleDownControl: RegionAutoscalerAutoscalingPolicyScaleDownControl? = null,
public val scaleInControl: RegionAutoscalerAutoscalingPolicyScaleInControl? = null,
public val scalingSchedules: List? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.gcp.compute.outputs.RegionAutoscalerAutoscalingPolicy): RegionAutoscalerAutoscalingPolicy = RegionAutoscalerAutoscalingPolicy(
cooldownPeriod = javaType.cooldownPeriod().map({ args0 -> args0 }).orElse(null),
cpuUtilization = javaType.cpuUtilization().map({ args0 ->
args0.let({ args0 ->
com.pulumi.gcp.compute.kotlin.outputs.RegionAutoscalerAutoscalingPolicyCpuUtilization.Companion.toKotlin(args0)
})
}).orElse(null),
loadBalancingUtilization = javaType.loadBalancingUtilization().map({ args0 ->
args0.let({ args0 ->
com.pulumi.gcp.compute.kotlin.outputs.RegionAutoscalerAutoscalingPolicyLoadBalancingUtilization.Companion.toKotlin(args0)
})
}).orElse(null),
maxReplicas = javaType.maxReplicas(),
metrics = javaType.metrics().map({ args0 ->
args0.let({ args0 ->
com.pulumi.gcp.compute.kotlin.outputs.RegionAutoscalerAutoscalingPolicyMetric.Companion.toKotlin(args0)
})
}),
minReplicas = javaType.minReplicas(),
mode = javaType.mode().map({ args0 -> args0 }).orElse(null),
scaleDownControl = javaType.scaleDownControl().map({ args0 ->
args0.let({ args0 ->
com.pulumi.gcp.compute.kotlin.outputs.RegionAutoscalerAutoscalingPolicyScaleDownControl.Companion.toKotlin(args0)
})
}).orElse(null),
scaleInControl = javaType.scaleInControl().map({ args0 ->
args0.let({ args0 ->
com.pulumi.gcp.compute.kotlin.outputs.RegionAutoscalerAutoscalingPolicyScaleInControl.Companion.toKotlin(args0)
})
}).orElse(null),
scalingSchedules = javaType.scalingSchedules().map({ args0 ->
args0.let({ args0 ->
com.pulumi.gcp.compute.kotlin.outputs.RegionAutoscalerAutoscalingPolicyScalingSchedule.Companion.toKotlin(args0)
})
}),
)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy