@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:08.030Z") @Stability(value=Experimental) 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
(experimental) A fluent builder for
NetworkMultipleTargetGroupsEc2Service. |
software.amazon.jsii.JsiiObject.InitializationModeIConstruct.Jsii$Default| Modifier | Constructor and Description |
|---|---|
|
NetworkMultipleTargetGroupsEc2Service(software.constructs.Construct scope,
String id)
(experimental) Constructs a new instance of the NetworkMultipleTargetGroupsEc2Service class.
|
|
NetworkMultipleTargetGroupsEc2Service(software.constructs.Construct scope,
String id,
NetworkMultipleTargetGroupsEc2ServiceProps props)
(experimental) 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()
(experimental) The EC2 service in this construct.
|
NetworkTargetGroup |
getTargetGroup()
(experimental) The default target group for the service.
|
Ec2TaskDefinition |
getTaskDefinition()
(experimental) The EC2 Task Definition in this construct.
|
addPortMappingForTargets, createAWSLogDriver, findListener, findListener, getCluster, getDefaultCluster, getDefaultCluster, getDesiredCount, getInternalDesiredCount, getListener, getListeners, getLoadBalancer, getLogDriver, getTargetGroups, registerECSTargets, setListeners, setLogDriver, setTargetGroupsgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, 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=Experimental)
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=Experimental)
public NetworkMultipleTargetGroupsEc2Service(@NotNull
software.constructs.Construct scope,
@NotNull
String id)
scope - This parameter is required.id - This parameter is required.@Stability(value=Experimental) @NotNull public Ec2Service getService()
@Stability(value=Experimental) @NotNull public NetworkTargetGroup getTargetGroup()
@Stability(value=Experimental) @NotNull public Ec2TaskDefinition getTaskDefinition()
Copyright © 2022. All rights reserved.