Class ApplicationLoadBalancedFargateService

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.services.ecs.patterns.ApplicationLoadBalancedServiceBase
software.amazon.awscdk.services.ecs.patterns.ApplicationLoadBalancedFargateService
All Implemented Interfaces:
IConstruct, IDependable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:48.691Z") @Stability(Stable) public class ApplicationLoadBalancedFargateService extends ApplicationLoadBalancedServiceBase
A Fargate service running on an ECS cluster fronted by an application load balancer.

Example:

 Cluster cluster;
 ApplicationLoadBalancedFargateService loadBalancedFargateService = ApplicationLoadBalancedFargateService.Builder.create(this, "Service")
         .cluster(cluster)
         .memoryLimitMiB(1024)
         .desiredCount(1)
         .cpu(512)
         .taskImageOptions(ApplicationLoadBalancedTaskImageOptions.builder()
                 .image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample"))
                 .build())
         .build();
 ScalableTaskCount scalableTarget = loadBalancedFargateService.service.autoScaleTaskCount(EnableScalingProps.builder()
         .minCapacity(1)
         .maxCapacity(20)
         .build());
 scalableTarget.scaleOnCpuUtilization("CpuScaling", CpuUtilizationScalingProps.builder()
         .targetUtilizationPercent(50)
         .build());
 scalableTarget.scaleOnMemoryUtilization("MemoryScaling", MemoryUtilizationScalingProps.builder()
         .targetUtilizationPercent(50)
         .build());
 
  • Constructor Details

    • ApplicationLoadBalancedFargateService

      protected ApplicationLoadBalancedFargateService(software.amazon.jsii.JsiiObjectRef objRef)
    • ApplicationLoadBalancedFargateService

      protected ApplicationLoadBalancedFargateService(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • ApplicationLoadBalancedFargateService

      @Stability(Stable) public ApplicationLoadBalancedFargateService(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable ApplicationLoadBalancedFargateServiceProps props)
      Constructs a new instance of the ApplicationLoadBalancedFargateService class.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props -
    • ApplicationLoadBalancedFargateService

      @Stability(Stable) public ApplicationLoadBalancedFargateService(@NotNull software.constructs.Construct scope, @NotNull String id)
      Constructs a new instance of the ApplicationLoadBalancedFargateService class.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
  • Method Details

    • getAssignPublicIp

      @Stability(Stable) @NotNull public Boolean getAssignPublicIp()
      Determines whether the service will be assigned a public IP address.
    • getService

      @Stability(Stable) @NotNull public FargateService getService()
      The Fargate service in this construct.
    • getTaskDefinition

      @Stability(Stable) @NotNull public FargateTaskDefinition getTaskDefinition()
      The Fargate task definition in this construct.