Class ApplicationLoadBalancedFargateService

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

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-24T21:00:29.408Z") @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())
         .taskSubnets(SubnetSelection.builder()
                 .subnets(List.of(Subnet.fromSubnetId(this, "subnet", "VpcISOLATEDSubnet1Subnet80F07FA0")))
                 .build())
         .loadBalancerName("application-lb-name")
         .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.