Interface ApplicationMultipleTargetGroupsEc2ServiceProps

All Superinterfaces:
ApplicationMultipleTargetGroupsServiceBaseProps, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
ApplicationMultipleTargetGroupsEc2ServiceProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-27T16:50:57.158Z") @Stability(Stable) public interface ApplicationMultipleTargetGroupsEc2ServiceProps extends software.amazon.jsii.JsiiSerializable, ApplicationMultipleTargetGroupsServiceBaseProps
The properties for the ApplicationMultipleTargetGroupsEc2Service service.

Example:

 // One application load balancer with one listener and two target groups.
 Cluster cluster;
 ApplicationMultipleTargetGroupsEc2Service loadBalancedEc2Service = ApplicationMultipleTargetGroupsEc2Service.Builder.create(this, "Service")
         .cluster(cluster)
         .memoryLimitMiB(256)
         .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();
 
  • Method Details

    • getCpu

      @Stability(Stable) @Nullable default Number getCpu()
      The minimum number of CPU units to reserve for the container.

      Valid values, which determines your range of valid values for the memory parameter:

      Default: - No minimum CPU units reserved.

    • getMemoryLimitMiB

      @Stability(Stable) @Nullable default Number getMemoryLimitMiB()
      The amount (in MiB) of memory to present to the container.

      If your container attempts to exceed the allocated memory, the container is terminated.

      At least one of memoryLimitMiB and memoryReservationMiB is required.

      Default: - No memory limit.

    • getMemoryReservationMiB

      @Stability(Stable) @Nullable default Number getMemoryReservationMiB()
      The soft limit (in MiB) of memory to reserve for the container.

      When system memory is under heavy contention, Docker attempts to keep the container memory to this soft limit. However, your container can consume more memory when it needs to, up to either the hard limit specified with the memory parameter (if applicable), or all of the available memory on the container instance, whichever comes first.

      At least one of memoryLimitMiB and memoryReservationMiB is required.

      Note that this setting will be ignored if TaskImagesOptions is specified

      Default: - No memory reserved.

    • getPlacementConstraints

      @Stability(Stable) @Nullable default List<PlacementConstraint> getPlacementConstraints()
      The placement constraints to use for tasks in the service.

      For more information, see Amazon ECS Task Placement Constraints.

      Default: - No constraints.

    • getPlacementStrategies

      @Stability(Stable) @Nullable default List<PlacementStrategy> getPlacementStrategies()
      The placement strategies to use for tasks in the service.

      For more information, see Amazon ECS Task Placement Strategies.

      Default: - No strategies.

    • getTaskDefinition

      @Stability(Stable) @Nullable default Ec2TaskDefinition getTaskDefinition()
      The task definition to use for tasks in the service. Only one of TaskDefinition or TaskImageOptions must be specified.

      [disable-awslint:ref-via-interface]

      Default: - none

    • builder

      @Stability(Stable) static ApplicationMultipleTargetGroupsEc2ServiceProps.Builder builder()
      Returns:
      a ApplicationMultipleTargetGroupsEc2ServiceProps.Builder of ApplicationMultipleTargetGroupsEc2ServiceProps