io.burkard.cdk.services.ecs.patterns.ApplicationLoadBalancedEc2Service.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 ApplicationLoadBalancedEc2Service {
def apply(
internalResourceId: String,
minHealthyPercent: Option[Number] = None,
protocolVersion: Option[software.amazon.awscdk.services.elasticloadbalancingv2.ApplicationProtocolVersion] = None,
recordType: Option[software.amazon.awscdk.services.ecs.patterns.ApplicationLoadBalancedServiceRecordType] = None,
certificate: Option[software.amazon.awscdk.services.certificatemanager.ICertificate] = None,
memoryLimitMiB: Option[Number] = None,
healthCheckGracePeriod: Option[software.amazon.awscdk.Duration] = None,
targetProtocol: Option[software.amazon.awscdk.services.elasticloadbalancingv2.ApplicationProtocol] = None,
desiredCount: Option[Number] = None,
serviceName: Option[String] = None,
idleTimeout: Option[software.amazon.awscdk.Duration] = None,
enableExecuteCommand: Option[Boolean] = None,
sslPolicy: Option[software.amazon.awscdk.services.elasticloadbalancingv2.SslPolicy] = None,
domainZone: Option[software.amazon.awscdk.services.route53.IHostedZone] = None,
domainName: Option[String] = None,
maxHealthyPercent: Option[Number] = None,
circuitBreaker: Option[software.amazon.awscdk.services.ecs.DeploymentCircuitBreaker] = None,
cluster: Option[software.amazon.awscdk.services.ecs.ICluster] = None,
redirectHttp: Option[Boolean] = None,
propagateTags: Option[software.amazon.awscdk.services.ecs.PropagatedTagSource] = None,
enableEcsManagedTags: Option[Boolean] = None,
loadBalancerName: Option[String] = None,
cpu: Option[Number] = None,
loadBalancer: Option[software.amazon.awscdk.services.elasticloadbalancingv2.IApplicationLoadBalancer] = None,
taskImageOptions: Option[software.amazon.awscdk.services.ecs.patterns.ApplicationLoadBalancedTaskImageOptions] = None,
taskDefinition: Option[software.amazon.awscdk.services.ecs.Ec2TaskDefinition] = None,
memoryReservationMiB: Option[Number] = None,
deploymentController: Option[software.amazon.awscdk.services.ecs.DeploymentController] = None,
vpc: Option[software.amazon.awscdk.services.ec2.IVpc] = None,
publicLoadBalancer: Option[Boolean] = None,
placementConstraints: Option[List[_ <: software.amazon.awscdk.services.ecs.PlacementConstraint]] = None,
placementStrategies: Option[List[_ <: software.amazon.awscdk.services.ecs.PlacementStrategy]] = None,
openListener: Option[Boolean] = None,
listenerPort: Option[Number] = None,
cloudMapOptions: Option[software.amazon.awscdk.services.ecs.CloudMapOptions] = None,
capacityProviderStrategies: Option[List[_ <: software.amazon.awscdk.services.ecs.CapacityProviderStrategy]] = None,
protocol: Option[software.amazon.awscdk.services.elasticloadbalancingv2.ApplicationProtocol] = None
)(implicit stackCtx: software.amazon.awscdk.Stack): software.amazon.awscdk.services.ecs.patterns.ApplicationLoadBalancedEc2Service =
software.amazon.awscdk.services.ecs.patterns.ApplicationLoadBalancedEc2Service.Builder
.create(stackCtx, internalResourceId)
.minHealthyPercent(minHealthyPercent.orNull)
.protocolVersion(protocolVersion.orNull)
.recordType(recordType.orNull)
.certificate(certificate.orNull)
.memoryLimitMiB(memoryLimitMiB.orNull)
.healthCheckGracePeriod(healthCheckGracePeriod.orNull)
.targetProtocol(targetProtocol.orNull)
.desiredCount(desiredCount.orNull)
.serviceName(serviceName.orNull)
.idleTimeout(idleTimeout.orNull)
.enableExecuteCommand(enableExecuteCommand.map(Boolean.box).orNull)
.sslPolicy(sslPolicy.orNull)
.domainZone(domainZone.orNull)
.domainName(domainName.orNull)
.maxHealthyPercent(maxHealthyPercent.orNull)
.circuitBreaker(circuitBreaker.orNull)
.cluster(cluster.orNull)
.redirectHttp(redirectHttp.map(Boolean.box).orNull)
.propagateTags(propagateTags.orNull)
.enableEcsManagedTags(enableEcsManagedTags.map(Boolean.box).orNull)
.loadBalancerName(loadBalancerName.orNull)
.cpu(cpu.orNull)
.loadBalancer(loadBalancer.orNull)
.taskImageOptions(taskImageOptions.orNull)
.taskDefinition(taskDefinition.orNull)
.memoryReservationMiB(memoryReservationMiB.orNull)
.deploymentController(deploymentController.orNull)
.vpc(vpc.orNull)
.publicLoadBalancer(publicLoadBalancer.map(Boolean.box).orNull)
.placementConstraints(placementConstraints.map(_.asJava).orNull)
.placementStrategies(placementStrategies.map(_.asJava).orNull)
.openListener(openListener.map(Boolean.box).orNull)
.listenerPort(listenerPort.orNull)
.cloudMapOptions(cloudMapOptions.orNull)
.capacityProviderStrategies(capacityProviderStrategies.map(_.asJava).orNull)
.protocol(protocol.orNull)
.build()
}