Class ApplicationMultipleTargetGroupsEc2Service
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.services.ecs.patterns.ApplicationMultipleTargetGroupsServiceBase
software.amazon.awscdk.services.ecs.patterns.ApplicationMultipleTargetGroupsEc2Service
- All Implemented Interfaces:
IConstruct,IDependable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:48.706Z")
@Stability(Stable)
public class ApplicationMultipleTargetGroupsEc2Service
extends ApplicationMultipleTargetGroupsServiceBase
An EC2 service running on an ECS cluster fronted by an application load balancer.
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();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forApplicationMultipleTargetGroupsEc2Service.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedApplicationMultipleTargetGroupsEc2Service(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedApplicationMultipleTargetGroupsEc2Service(software.amazon.jsii.JsiiObjectRef objRef) ApplicationMultipleTargetGroupsEc2Service(software.constructs.Construct scope, String id) Constructs a new instance of the ApplicationMultipleTargetGroupsEc2Service class.ApplicationMultipleTargetGroupsEc2Service(software.constructs.Construct scope, String id, ApplicationMultipleTargetGroupsEc2ServiceProps props) Constructs a new instance of the ApplicationMultipleTargetGroupsEc2Service class. -
Method Summary
Modifier and TypeMethodDescriptionThe EC2 service in this construct.The default target group for the service.The EC2 Task Definition in this construct.Methods inherited from class software.amazon.awscdk.services.ecs.patterns.ApplicationMultipleTargetGroupsServiceBase
addPortMappingForTargets, createAWSLogDriver, findListener, findListener, getCluster, getDefaultCluster, getDefaultCluster, getDesiredCount, getInternalDesiredCount, getListener, getListeners, getLoadBalancer, getLogDriver, getTargetGroups, registerECSTargets, setListeners, setLogDriver, setTargetGroupsMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.constructs.Construct
toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
ApplicationMultipleTargetGroupsEc2Service
protected ApplicationMultipleTargetGroupsEc2Service(software.amazon.jsii.JsiiObjectRef objRef) -
ApplicationMultipleTargetGroupsEc2Service
protected ApplicationMultipleTargetGroupsEc2Service(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
ApplicationMultipleTargetGroupsEc2Service
@Stability(Stable) public ApplicationMultipleTargetGroupsEc2Service(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable ApplicationMultipleTargetGroupsEc2ServiceProps props) Constructs a new instance of the ApplicationMultipleTargetGroupsEc2Service class.- Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
ApplicationMultipleTargetGroupsEc2Service
@Stability(Stable) public ApplicationMultipleTargetGroupsEc2Service(@NotNull software.constructs.Construct scope, @NotNull String id) Constructs a new instance of the ApplicationMultipleTargetGroupsEc2Service class.- Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Details
-
getService
The EC2 service in this construct. -
getTargetGroup
The default target group for the service. -
getTaskDefinition
The EC2 Task Definition in this construct.
-