io.burkard.cdk.services.ecs.ExternalTaskDefinition.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 ExternalTaskDefinition {
def apply(
internalResourceId: String,
executionRole: Option[software.amazon.awscdk.services.iam.IRole] = None,
volumes: Option[List[_ <: software.amazon.awscdk.services.ecs.Volume]] = None,
taskRole: Option[software.amazon.awscdk.services.iam.IRole] = None,
proxyConfiguration: Option[software.amazon.awscdk.services.ecs.ProxyConfiguration] = None,
networkMode: Option[software.amazon.awscdk.services.ecs.NetworkMode] = None,
family: Option[String] = None
)(implicit stackCtx: software.amazon.awscdk.Stack): software.amazon.awscdk.services.ecs.ExternalTaskDefinition =
software.amazon.awscdk.services.ecs.ExternalTaskDefinition.Builder
.create(stackCtx, internalResourceId)
.executionRole(executionRole.orNull)
.volumes(volumes.map(_.asJava).orNull)
.taskRole(taskRole.orNull)
.proxyConfiguration(proxyConfiguration.orNull)
.networkMode(networkMode.orNull)
.family(family.orNull)
.build()
}