Class NetworkMultipleTargetGroupsFargateService
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.services.ecs.patterns.NetworkMultipleTargetGroupsServiceBase
software.amazon.awscdk.services.ecs.patterns.NetworkMultipleTargetGroupsFargateService
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-10-31T19:12:57.631Z")
@Stability(Stable)
public class NetworkMultipleTargetGroupsFargateService
extends NetworkMultipleTargetGroupsServiceBase
A Fargate service running on an ECS cluster fronted by a network load balancer.
Example:
// Two network load balancers, each with their own listener and target group. Cluster cluster; NetworkMultipleTargetGroupsFargateService loadBalancedFargateService = NetworkMultipleTargetGroupsFargateService.Builder.create(this, "Service") .cluster(cluster) .memoryLimitMiB(512) .taskImageOptions(NetworkLoadBalancedTaskImageProps.builder() .image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample")) .build()) .loadBalancers(List.of(NetworkLoadBalancerProps.builder() .name("lb1") .listeners(List.of(NetworkListenerProps.builder() .name("listener1") .build())) .build(), NetworkLoadBalancerProps.builder() .name("lb2") .listeners(List.of(NetworkListenerProps.builder() .name("listener2") .build())) .build())) .targetGroups(List.of(NetworkTargetProps.builder() .containerPort(80) .listener("listener1") .build(), NetworkTargetProps.builder() .containerPort(90) .listener("listener2") .build())) .build();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forNetworkMultipleTargetGroupsFargateService
.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
NetworkMultipleTargetGroupsFargateService
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
NetworkMultipleTargetGroupsFargateService
(software.amazon.jsii.JsiiObjectRef objRef) NetworkMultipleTargetGroupsFargateService
(software.constructs.Construct scope, String id) Constructs a new instance of the NetworkMultipleTargetGroupsFargateService class.NetworkMultipleTargetGroupsFargateService
(software.constructs.Construct scope, String id, NetworkMultipleTargetGroupsFargateServiceProps props) Constructs a new instance of the NetworkMultipleTargetGroupsFargateService class. -
Method Summary
Modifier and TypeMethodDescriptionDetermines whether the service will be assigned a public IP address.The Fargate service in this construct.Deprecated.The Fargate task definition in this construct.Methods inherited from class software.amazon.awscdk.services.ecs.patterns.NetworkMultipleTargetGroupsServiceBase
addPortMappingForTargets, createAWSLogDriver, findListener, findListener, getCluster, getDefaultCluster, getDefaultCluster, getInternalDesiredCount, getListener, getListeners, getLoadBalancer, getLoadBalancers, getLogDriver, getTargetGroups, registerECSTargets, setLogDriver
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
NetworkMultipleTargetGroupsFargateService
protected NetworkMultipleTargetGroupsFargateService(software.amazon.jsii.JsiiObjectRef objRef) -
NetworkMultipleTargetGroupsFargateService
protected NetworkMultipleTargetGroupsFargateService(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
NetworkMultipleTargetGroupsFargateService
@Stability(Stable) public NetworkMultipleTargetGroupsFargateService(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable NetworkMultipleTargetGroupsFargateServiceProps props) Constructs a new instance of the NetworkMultipleTargetGroupsFargateService class.- Parameters:
scope
- This parameter is required.id
- This parameter is required.props
-
-
NetworkMultipleTargetGroupsFargateService
@Stability(Stable) public NetworkMultipleTargetGroupsFargateService(@NotNull software.constructs.Construct scope, @NotNull String id) Constructs a new instance of the NetworkMultipleTargetGroupsFargateService class.- Parameters:
scope
- This parameter is required.id
- This parameter is required.
-
-
Method Details
-
getAssignPublicIp
Determines whether the service will be assigned a public IP address. -
getService
The Fargate service in this construct. -
getTargetGroup
Deprecated.- Use
targetGroups
instead.
(deprecated) The default target group for the service. - Use
-
getTaskDefinition
The Fargate task definition in this construct.
-
targetGroups
instead.