com.pulumi.awsnative.applicationautoscaling.kotlin.inputs.ScalingPolicyStepScalingPolicyConfigurationArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-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.awsnative.applicationautoscaling.kotlin.inputs
import com.pulumi.awsnative.applicationautoscaling.inputs.ScalingPolicyStepScalingPolicyConfigurationArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
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
/**
* ``StepScalingPolicyConfiguration`` is a property of the [AWS::ApplicationAutoScaling::ScalingPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationautoscaling-scalingpolicy.html) resource that specifies a step scaling policy configuration for Application Auto Scaling.
* For more information, see [Step scaling policies](https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-step-scaling-policies.html) in the *Application Auto Scaling User Guide*.
* @property adjustmentType Specifies whether the ``ScalingAdjustment`` value in the ``StepAdjustment`` property is an absolute number or a percentage of the current capacity.
* @property cooldown The amount of time, in seconds, to wait for a previous scaling activity to take effect. If not specified, the default value is 300. For more information, see [Cooldown period](https://docs.aws.amazon.com/autoscaling/application/userguide/step-scaling-policy-overview.html#step-scaling-cooldown) in the *Application Auto Scaling User Guide*.
* @property metricAggregationType The aggregation type for the CloudWatch metrics. Valid values are ``Minimum``, ``Maximum``, and ``Average``. If the aggregation type is null, the value is treated as ``Average``.
* @property minAdjustmentMagnitude The minimum value to scale by when the adjustment type is ``PercentChangeInCapacity``. For example, suppose that you create a step scaling policy to scale out an Amazon ECS service by 25 percent and you specify a ``MinAdjustmentMagnitude`` of 2. If the service has 4 tasks and the scaling policy is performed, 25 percent of 4 is 1. However, because you specified a ``MinAdjustmentMagnitude`` of 2, Application Auto Scaling scales out the service by 2 tasks.
* @property stepAdjustments A set of adjustments that enable you to scale based on the size of the alarm breach.
* At least one step adjustment is required if you are adding a new step scaling policy configuration.
*/
public data class ScalingPolicyStepScalingPolicyConfigurationArgs(
public val adjustmentType: Output? = null,
public val cooldown: Output? = null,
public val metricAggregationType: Output? = null,
public val minAdjustmentMagnitude: Output? = null,
public val stepAdjustments: Output>? = null,
) :
ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.applicationautoscaling.inputs.ScalingPolicyStepScalingPolicyConfigurationArgs =
com.pulumi.awsnative.applicationautoscaling.inputs.ScalingPolicyStepScalingPolicyConfigurationArgs.builder()
.adjustmentType(adjustmentType?.applyValue({ args0 -> args0 }))
.cooldown(cooldown?.applyValue({ args0 -> args0 }))
.metricAggregationType(metricAggregationType?.applyValue({ args0 -> args0 }))
.minAdjustmentMagnitude(minAdjustmentMagnitude?.applyValue({ args0 -> args0 }))
.stepAdjustments(
stepAdjustments?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [ScalingPolicyStepScalingPolicyConfigurationArgs].
*/
@PulumiTagMarker
public class ScalingPolicyStepScalingPolicyConfigurationArgsBuilder internal constructor() {
private var adjustmentType: Output? = null
private var cooldown: Output? = null
private var metricAggregationType: Output? = null
private var minAdjustmentMagnitude: Output? = null
private var stepAdjustments: Output>? = null
/**
* @param value Specifies whether the ``ScalingAdjustment`` value in the ``StepAdjustment`` property is an absolute number or a percentage of the current capacity.
*/
@JvmName("fvijenvlqkurcwbt")
public suspend fun adjustmentType(`value`: Output) {
this.adjustmentType = value
}
/**
* @param value The amount of time, in seconds, to wait for a previous scaling activity to take effect. If not specified, the default value is 300. For more information, see [Cooldown period](https://docs.aws.amazon.com/autoscaling/application/userguide/step-scaling-policy-overview.html#step-scaling-cooldown) in the *Application Auto Scaling User Guide*.
*/
@JvmName("cpwhemsquqsisyxm")
public suspend fun cooldown(`value`: Output) {
this.cooldown = value
}
/**
* @param value The aggregation type for the CloudWatch metrics. Valid values are ``Minimum``, ``Maximum``, and ``Average``. If the aggregation type is null, the value is treated as ``Average``.
*/
@JvmName("ojhpoykgtmvrgnue")
public suspend fun metricAggregationType(`value`: Output) {
this.metricAggregationType = value
}
/**
* @param value The minimum value to scale by when the adjustment type is ``PercentChangeInCapacity``. For example, suppose that you create a step scaling policy to scale out an Amazon ECS service by 25 percent and you specify a ``MinAdjustmentMagnitude`` of 2. If the service has 4 tasks and the scaling policy is performed, 25 percent of 4 is 1. However, because you specified a ``MinAdjustmentMagnitude`` of 2, Application Auto Scaling scales out the service by 2 tasks.
*/
@JvmName("hasdhdjawatxfsgd")
public suspend fun minAdjustmentMagnitude(`value`: Output) {
this.minAdjustmentMagnitude = value
}
/**
* @param value A set of adjustments that enable you to scale based on the size of the alarm breach.
* At least one step adjustment is required if you are adding a new step scaling policy configuration.
*/
@JvmName("aykjcoivqafbqpsn")
public suspend fun stepAdjustments(`value`: Output>) {
this.stepAdjustments = value
}
@JvmName("eramjeotnthfotfd")
public suspend fun stepAdjustments(vararg values: Output) {
this.stepAdjustments = Output.all(values.asList())
}
/**
* @param values A set of adjustments that enable you to scale based on the size of the alarm breach.
* At least one step adjustment is required if you are adding a new step scaling policy configuration.
*/
@JvmName("kdsyclxbynojvllo")
public suspend fun stepAdjustments(values: List