All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.burkard.cdk.services.eks.AutoScalingGroupCapacityOptions.scala Maven / Gradle / Ivy

The newest version!
package io.burkard.cdk.services.eks

import scala.collection.JavaConverters._

@scala.annotation.nowarn("cat=deprecation")
@SuppressWarnings(Array("org.wartremover.warts.DefaultArguments", "org.wartremover.warts.Null", "DisableSyntax.null"))
object AutoScalingGroupCapacityOptions {

  def apply(
    instanceType: software.amazon.awscdk.services.ec2.InstanceType,
    terminationPolicies: Option[List[_ <: software.amazon.awscdk.services.autoscaling.TerminationPolicy]] = None,
    healthCheck: Option[software.amazon.awscdk.services.autoscaling.HealthCheck] = None,
    bootstrapEnabled: Option[Boolean] = None,
    maxCapacity: Option[Number] = None,
    blockDevices: Option[List[_ <: software.amazon.awscdk.services.autoscaling.BlockDevice]] = None,
    maxInstanceLifetime: Option[software.amazon.awscdk.Duration] = None,
    spotInterruptHandler: Option[Boolean] = None,
    signals: Option[software.amazon.awscdk.services.autoscaling.Signals] = None,
    machineImageType: Option[software.amazon.awscdk.services.eks.MachineImageType] = None,
    mapRole: Option[Boolean] = None,
    vpcSubnets: Option[software.amazon.awscdk.services.ec2.SubnetSelection] = None,
    ignoreUnmodifiedSizeProperties: Option[Boolean] = None,
    associatePublicIpAddress: Option[Boolean] = None,
    minCapacity: Option[Number] = None,
    allowAllOutbound: Option[Boolean] = None,
    cooldown: Option[software.amazon.awscdk.Duration] = None,
    desiredCapacity: Option[Number] = None,
    bootstrapOptions: Option[software.amazon.awscdk.services.eks.BootstrapOptions] = None,
    groupMetrics: Option[List[_ <: software.amazon.awscdk.services.autoscaling.GroupMetrics]] = None,
    keyName: Option[String] = None,
    newInstancesProtectedFromScaleIn: Option[Boolean] = None,
    instanceMonitoring: Option[software.amazon.awscdk.services.autoscaling.Monitoring] = None,
    spotPrice: Option[String] = None,
    notifications: Option[List[_ <: software.amazon.awscdk.services.autoscaling.NotificationConfiguration]] = None,
    autoScalingGroupName: Option[String] = None,
    updatePolicy: Option[software.amazon.awscdk.services.autoscaling.UpdatePolicy] = None
  ): software.amazon.awscdk.services.eks.AutoScalingGroupCapacityOptions =
    (new software.amazon.awscdk.services.eks.AutoScalingGroupCapacityOptions.Builder)
      .instanceType(instanceType)
      .terminationPolicies(terminationPolicies.map(_.asJava).orNull)
      .healthCheck(healthCheck.orNull)
      .bootstrapEnabled(bootstrapEnabled.map(Boolean.box).orNull)
      .maxCapacity(maxCapacity.orNull)
      .blockDevices(blockDevices.map(_.asJava).orNull)
      .maxInstanceLifetime(maxInstanceLifetime.orNull)
      .spotInterruptHandler(spotInterruptHandler.map(Boolean.box).orNull)
      .signals(signals.orNull)
      .machineImageType(machineImageType.orNull)
      .mapRole(mapRole.map(Boolean.box).orNull)
      .vpcSubnets(vpcSubnets.orNull)
      .ignoreUnmodifiedSizeProperties(ignoreUnmodifiedSizeProperties.map(Boolean.box).orNull)
      .associatePublicIpAddress(associatePublicIpAddress.map(Boolean.box).orNull)
      .minCapacity(minCapacity.orNull)
      .allowAllOutbound(allowAllOutbound.map(Boolean.box).orNull)
      .cooldown(cooldown.orNull)
      .desiredCapacity(desiredCapacity.orNull)
      .bootstrapOptions(bootstrapOptions.orNull)
      .groupMetrics(groupMetrics.map(_.asJava).orNull)
      .keyName(keyName.orNull)
      .newInstancesProtectedFromScaleIn(newInstancesProtectedFromScaleIn.map(Boolean.box).orNull)
      .instanceMonitoring(instanceMonitoring.orNull)
      .spotPrice(spotPrice.orNull)
      .notifications(notifications.map(_.asJava).orNull)
      .autoScalingGroupName(autoScalingGroupName.orNull)
      .updatePolicy(updatePolicy.orNull)
      .build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy