io.burkard.cdk.services.ecs.patterns.ApplicationMultipleTargetGroupsEc2Service.scala Maven / Gradle / Ivy
The newest version!
package io.burkard.cdk.services.ecs.patterns
import scala.collection.JavaConverters._
@scala.annotation.nowarn("cat=deprecation")
@SuppressWarnings(Array("org.wartremover.warts.DefaultArguments", "org.wartremover.warts.Null", "DisableSyntax.null"))
object ApplicationMultipleTargetGroupsEc2Service {
def apply(
internalResourceId: String,
memoryLimitMiB: Option[Number] = None,
healthCheckGracePeriod: Option[software.amazon.awscdk.Duration] = None,
desiredCount: Option[Number] = None,
targetGroups: Option[List[_ <: software.amazon.awscdk.services.ecs.patterns.ApplicationTargetProps]] = None,
serviceName: Option[String] = None,
enableExecuteCommand: Option[Boolean] = None,
loadBalancers: Option[List[_ <: software.amazon.awscdk.services.ecs.patterns.ApplicationLoadBalancerProps]] = None,
cluster: Option[software.amazon.awscdk.services.ecs.ICluster] = None,
propagateTags: Option[software.amazon.awscdk.services.ecs.PropagatedTagSource] = None,
enableEcsManagedTags: Option[Boolean] = None,
cpu: Option[Number] = None,
taskImageOptions: Option[software.amazon.awscdk.services.ecs.patterns.ApplicationLoadBalancedTaskImageProps] = None,
taskDefinition: Option[software.amazon.awscdk.services.ecs.Ec2TaskDefinition] = None,
memoryReservationMiB: Option[Number] = None,
vpc: Option[software.amazon.awscdk.services.ec2.IVpc] = None,
placementConstraints: Option[List[_ <: software.amazon.awscdk.services.ecs.PlacementConstraint]] = None,
placementStrategies: Option[List[_ <: software.amazon.awscdk.services.ecs.PlacementStrategy]] = None,
cloudMapOptions: Option[software.amazon.awscdk.services.ecs.CloudMapOptions] = None
)(implicit stackCtx: software.amazon.awscdk.Stack): software.amazon.awscdk.services.ecs.patterns.ApplicationMultipleTargetGroupsEc2Service =
software.amazon.awscdk.services.ecs.patterns.ApplicationMultipleTargetGroupsEc2Service.Builder
.create(stackCtx, internalResourceId)
.memoryLimitMiB(memoryLimitMiB.orNull)
.healthCheckGracePeriod(healthCheckGracePeriod.orNull)
.desiredCount(desiredCount.orNull)
.targetGroups(targetGroups.map(_.asJava).orNull)
.serviceName(serviceName.orNull)
.enableExecuteCommand(enableExecuteCommand.map(Boolean.box).orNull)
.loadBalancers(loadBalancers.map(_.asJava).orNull)
.cluster(cluster.orNull)
.propagateTags(propagateTags.orNull)
.enableEcsManagedTags(enableEcsManagedTags.map(Boolean.box).orNull)
.cpu(cpu.orNull)
.taskImageOptions(taskImageOptions.orNull)
.taskDefinition(taskDefinition.orNull)
.memoryReservationMiB(memoryReservationMiB.orNull)
.vpc(vpc.orNull)
.placementConstraints(placementConstraints.map(_.asJava).orNull)
.placementStrategies(placementStrategies.map(_.asJava).orNull)
.cloudMapOptions(cloudMapOptions.orNull)
.build()
}