io.burkard.cdk.services.ecs.TaskDefinition.scala Maven / Gradle / Ivy
The newest version!
package io.burkard.cdk.services.ecs
import scala.collection.JavaConverters._
@scala.annotation.nowarn("cat=deprecation")
@SuppressWarnings(Array("org.wartremover.warts.DefaultArguments", "org.wartremover.warts.Null", "DisableSyntax.null"))
object TaskDefinition {
def apply(
internalResourceId: String,
compatibility: software.amazon.awscdk.services.ecs.Compatibility,
pidMode: Option[software.amazon.awscdk.services.ecs.PidMode] = None,
inferenceAccelerators: Option[List[_ <: software.amazon.awscdk.services.ecs.InferenceAccelerator]] = None,
executionRole: Option[software.amazon.awscdk.services.iam.IRole] = None,
memoryMiB: Option[String] = None,
volumes: Option[List[_ <: software.amazon.awscdk.services.ecs.Volume]] = None,
taskRole: Option[software.amazon.awscdk.services.iam.IRole] = None,
ipcMode: Option[software.amazon.awscdk.services.ecs.IpcMode] = None,
proxyConfiguration: Option[software.amazon.awscdk.services.ecs.ProxyConfiguration] = None,
cpu: Option[String] = None,
networkMode: Option[software.amazon.awscdk.services.ecs.NetworkMode] = None,
ephemeralStorageGiB: Option[Number] = None,
placementConstraints: Option[List[_ <: software.amazon.awscdk.services.ecs.PlacementConstraint]] = None,
runtimePlatform: Option[software.amazon.awscdk.services.ecs.RuntimePlatform] = None,
family: Option[String] = None
)(implicit stackCtx: software.amazon.awscdk.Stack): software.amazon.awscdk.services.ecs.TaskDefinition =
software.amazon.awscdk.services.ecs.TaskDefinition.Builder
.create(stackCtx, internalResourceId)
.compatibility(compatibility)
.pidMode(pidMode.orNull)
.inferenceAccelerators(inferenceAccelerators.map(_.asJava).orNull)
.executionRole(executionRole.orNull)
.memoryMiB(memoryMiB.orNull)
.volumes(volumes.map(_.asJava).orNull)
.taskRole(taskRole.orNull)
.ipcMode(ipcMode.orNull)
.proxyConfiguration(proxyConfiguration.orNull)
.cpu(cpu.orNull)
.networkMode(networkMode.orNull)
.ephemeralStorageGiB(ephemeralStorageGiB.orNull)
.placementConstraints(placementConstraints.map(_.asJava).orNull)
.runtimePlatform(runtimePlatform.orNull)
.family(family.orNull)
.build()
}