io.burkard.cdk.services.autoscaling.TargetTrackingScalingPolicy.scala Maven / Gradle / Ivy
The newest version!
package io.burkard.cdk.services.autoscaling
@SuppressWarnings(Array("org.wartremover.warts.DefaultArguments", "org.wartremover.warts.Null", "DisableSyntax.null"))
object TargetTrackingScalingPolicy {
def apply(
internalResourceId: String,
autoScalingGroup: software.amazon.awscdk.services.autoscaling.IAutoScalingGroup,
customMetric: Option[software.amazon.awscdk.services.cloudwatch.IMetric] = None,
disableScaleIn: Option[Boolean] = None,
cooldown: Option[software.amazon.awscdk.Duration] = None,
predefinedMetric: Option[software.amazon.awscdk.services.autoscaling.PredefinedMetric] = None,
estimatedInstanceWarmup: Option[software.amazon.awscdk.Duration] = None,
resourceLabel: Option[String] = None,
targetValue: Option[Number] = None
)(implicit stackCtx: software.amazon.awscdk.Stack): software.amazon.awscdk.services.autoscaling.TargetTrackingScalingPolicy =
software.amazon.awscdk.services.autoscaling.TargetTrackingScalingPolicy.Builder
.create(stackCtx, internalResourceId)
.autoScalingGroup(autoScalingGroup)
.customMetric(customMetric.orNull)
.disableScaleIn(disableScaleIn.map(Boolean.box).orNull)
.cooldown(cooldown.orNull)
.predefinedMetric(predefinedMetric.orNull)
.estimatedInstanceWarmup(estimatedInstanceWarmup.orNull)
.resourceLabel(resourceLabel.orNull)
.targetValue(targetValue.orNull)
.build()
}