Class ApplicationMultipleTargetGroupsFargateService

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.services.ecs.patterns.ApplicationMultipleTargetGroupsServiceBase
software.amazon.awscdk.services.ecs.patterns.ApplicationMultipleTargetGroupsFargateService
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.710Z") @Stability(Stable) public class ApplicationMultipleTargetGroupsFargateService extends ApplicationMultipleTargetGroupsServiceBase
A Fargate service running on an ECS cluster fronted by an application load balancer.

Example:

 // One application load balancer with one listener and two target groups.
 Cluster cluster;
 ApplicationMultipleTargetGroupsFargateService loadBalancedFargateService = ApplicationMultipleTargetGroupsFargateService.Builder.create(this, "Service")
         .cluster(cluster)
         .memoryLimitMiB(1024)
         .cpu(512)
         .taskImageOptions(ApplicationLoadBalancedTaskImageProps.builder()
                 .image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample"))
                 .build())
         .targetGroups(List.of(ApplicationTargetProps.builder()
                 .containerPort(80)
                 .build(), ApplicationTargetProps.builder()
                 .containerPort(90)
                 .pathPattern("a/b/c")
                 .priority(10)
                 .build()))
         .build();
 
  • Constructor Details

    • ApplicationMultipleTargetGroupsFargateService

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

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

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

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

      @Stability(Stable) public ApplicationMultipleTargetGroupsFargateService(@NotNull software.constructs.Construct scope, @NotNull String id)
      Constructs a new instance of the ApplicationMultipleTargetGroupsFargateService 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.
    • getTargetGroup

      @Stability(Stable) @NotNull public ApplicationTargetGroup getTargetGroup()
      The default target group for the service.
    • getTaskDefinition

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