@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.816Z") @Stability(value=Stable) public class NetworkMultipleTargetGroupsFargateService extends NetworkMultipleTargetGroupsServiceBase
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();
| Modifier and Type | Class and Description |
|---|---|
static class |
NetworkMultipleTargetGroupsFargateService.Builder
A fluent builder for
NetworkMultipleTargetGroupsFargateService. |
| Modifier | Constructor and Description |
|---|---|
|
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.
|
protected |
NetworkMultipleTargetGroupsFargateService(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
NetworkMultipleTargetGroupsFargateService(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
Boolean |
getAssignPublicIp()
Determines whether the service will be assigned a public IP address.
|
FargateService |
getService()
The Fargate service in this construct.
|
NetworkTargetGroup |
getTargetGroup()
Deprecated.
- Use `targetGroups` instead.
|
FargateTaskDefinition |
getTaskDefinition()
The Fargate task definition in this construct.
|
addPortMappingForTargets, createAWSLogDriver, findListener, findListener, getCluster, getDefaultCluster, getDefaultCluster, getInternalDesiredCount, getListener, getListeners, getLoadBalancer, getLoadBalancers, getLogDriver, getTargetGroups, registerECSTargets, setLogDriverjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected NetworkMultipleTargetGroupsFargateService(software.amazon.jsii.JsiiObjectRef objRef)
protected NetworkMultipleTargetGroupsFargateService(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public NetworkMultipleTargetGroupsFargateService(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@Nullable
NetworkMultipleTargetGroupsFargateServiceProps props)
scope - This parameter is required.id - This parameter is required.props - @Stability(value=Stable)
public NetworkMultipleTargetGroupsFargateService(@NotNull
software.constructs.Construct scope,
@NotNull
String id)
scope - This parameter is required.id - This parameter is required.@Stability(value=Stable) @NotNull public Boolean getAssignPublicIp()
@Stability(value=Stable) @NotNull public FargateService getService()
@Stability(value=Deprecated) @Deprecated @NotNull public NetworkTargetGroup getTargetGroup()
@Stability(value=Stable) @NotNull public FargateTaskDefinition getTaskDefinition()
Copyright © 2022. All rights reserved.