@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.813Z") @Stability(value=Stable) public class NetworkMultipleTargetGroupsEc2Service extends NetworkMultipleTargetGroupsServiceBase
Example:
// Two network load balancers, each with their own listener and target group.
Cluster cluster;
NetworkMultipleTargetGroupsEc2Service loadBalancedEc2Service = NetworkMultipleTargetGroupsEc2Service.Builder.create(this, "Service")
.cluster(cluster)
.memoryLimitMiB(256)
.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 |
NetworkMultipleTargetGroupsEc2Service.Builder
A fluent builder for
NetworkMultipleTargetGroupsEc2Service. |
| Modifier | Constructor and Description |
|---|---|
|
NetworkMultipleTargetGroupsEc2Service(software.constructs.Construct scope,
String id)
Constructs a new instance of the NetworkMultipleTargetGroupsEc2Service class.
|
|
NetworkMultipleTargetGroupsEc2Service(software.constructs.Construct scope,
String id,
NetworkMultipleTargetGroupsEc2ServiceProps props)
Constructs a new instance of the NetworkMultipleTargetGroupsEc2Service class.
|
protected |
NetworkMultipleTargetGroupsEc2Service(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
NetworkMultipleTargetGroupsEc2Service(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
Ec2Service |
getService()
The EC2 service in this construct.
|
NetworkTargetGroup |
getTargetGroup()
Deprecated.
- Use `targetGroups` instead.
|
Ec2TaskDefinition |
getTaskDefinition()
The EC2 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 NetworkMultipleTargetGroupsEc2Service(software.amazon.jsii.JsiiObjectRef objRef)
protected NetworkMultipleTargetGroupsEc2Service(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public NetworkMultipleTargetGroupsEc2Service(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@Nullable
NetworkMultipleTargetGroupsEc2ServiceProps props)
scope - This parameter is required.id - This parameter is required.props - @Stability(value=Stable)
public NetworkMultipleTargetGroupsEc2Service(@NotNull
software.constructs.Construct scope,
@NotNull
String id)
scope - This parameter is required.id - This parameter is required.@Stability(value=Stable) @NotNull public Ec2Service getService()
@Stability(value=Deprecated) @Deprecated @NotNull public NetworkTargetGroup getTargetGroup()
@Stability(value=Stable) @NotNull public Ec2TaskDefinition getTaskDefinition()
Copyright © 2022. All rights reserved.