
com.pulumi.awsnative.autoscaling.kotlin.outputs.GetScalingPolicyResult.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.autoscaling.kotlin.outputs
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
/**
*
* @property adjustmentType Specifies how the scaling adjustment is interpreted. The valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
* @property arn The ARN of the AutoScaling scaling policy
* @property cooldown The duration of the policy's cooldown period, in seconds. When a cooldown period is specified here, it overrides the default cooldown period defined for the Auto Scaling group.
* @property estimatedInstanceWarmup The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. If not provided, the default is to use the value from the default cooldown period for the Auto Scaling group. Valid only if the policy type is TargetTrackingScaling or StepScaling.
* @property metricAggregationType The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum, and Average. If the aggregation type is null, the value is treated as Average. Valid only if the policy type is StepScaling.
* @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 Auto Scaling group by 25 percent and you specify a MinAdjustmentMagnitude of 2. If the group has 4 instances and the scaling policy is performed, 25 percent of 4 is 1. However, because you specified a MinAdjustmentMagnitude of 2, Amazon EC2 Auto Scaling scales out the group by 2 instances.
* @property policyName Returns the name of a scaling policy.
* @property policyType One of the following policy types: TargetTrackingScaling, StepScaling, SimpleScaling (default), PredictiveScaling
* @property predictiveScalingConfiguration A predictive scaling policy. Includes support for predefined metrics only.
* @property scalingAdjustment The amount by which to scale, based on the specified adjustment type. A positive value adds to the current capacity while a negative number removes from the current capacity. For exact capacity, you must specify a positive value. Required if the policy type is SimpleScaling. (Not used with any other policy type.)
* @property stepAdjustments A set of adjustments that enable you to scale based on the size of the alarm breach. Required if the policy type is StepScaling. (Not used with any other policy type.)
* @property targetTrackingConfiguration A target tracking scaling policy. Includes support for predefined or customized metrics.
*/
public data class GetScalingPolicyResult(
public val adjustmentType: String? = null,
public val arn: String? = null,
public val cooldown: String? = null,
public val estimatedInstanceWarmup: Int? = null,
public val metricAggregationType: String? = null,
public val minAdjustmentMagnitude: Int? = null,
public val policyName: String? = null,
public val policyType: String? = null,
public val predictiveScalingConfiguration: ScalingPolicyPredictiveScalingConfiguration? = null,
public val scalingAdjustment: Int? = null,
public val stepAdjustments: List? = null,
public val targetTrackingConfiguration: ScalingPolicyTargetTrackingConfiguration? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.awsnative.autoscaling.outputs.GetScalingPolicyResult): GetScalingPolicyResult = GetScalingPolicyResult(
adjustmentType = javaType.adjustmentType().map({ args0 -> args0 }).orElse(null),
arn = javaType.arn().map({ args0 -> args0 }).orElse(null),
cooldown = javaType.cooldown().map({ args0 -> args0 }).orElse(null),
estimatedInstanceWarmup = javaType.estimatedInstanceWarmup().map({ args0 -> args0 }).orElse(null),
metricAggregationType = javaType.metricAggregationType().map({ args0 -> args0 }).orElse(null),
minAdjustmentMagnitude = javaType.minAdjustmentMagnitude().map({ args0 -> args0 }).orElse(null),
policyName = javaType.policyName().map({ args0 -> args0 }).orElse(null),
policyType = javaType.policyType().map({ args0 -> args0 }).orElse(null),
predictiveScalingConfiguration = javaType.predictiveScalingConfiguration().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.autoscaling.kotlin.outputs.ScalingPolicyPredictiveScalingConfiguration.Companion.toKotlin(args0)
})
}).orElse(null),
scalingAdjustment = javaType.scalingAdjustment().map({ args0 -> args0 }).orElse(null),
stepAdjustments = javaType.stepAdjustments().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.autoscaling.kotlin.outputs.ScalingPolicyStepAdjustment.Companion.toKotlin(args0)
})
}),
targetTrackingConfiguration = javaType.targetTrackingConfiguration().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.autoscaling.kotlin.outputs.ScalingPolicyTargetTrackingConfiguration.Companion.toKotlin(args0)
})
}).orElse(null),
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy