Interface EcsTarget
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
EcsTarget.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:47.304Z")
@Stability(Stable)
public interface EcsTarget
extends software.amazon.jsii.JsiiSerializable
Example:
Cluster cluster;
TaskDefinition taskDefinition;
Vpc vpc;
FargateService service = FargateService.Builder.create(this, "Service").cluster(cluster).taskDefinition(taskDefinition).build();
ApplicationLoadBalancer lb = ApplicationLoadBalancer.Builder.create(this, "LB").vpc(vpc).internetFacing(true).build();
ApplicationListener listener = lb.addListener("Listener", BaseApplicationListenerProps.builder().port(80).build());
service.registerLoadBalancerTargets(EcsTarget.builder()
.containerName("web")
.containerPort(80)
.newTargetGroupId("ECS")
.listener(ListenerConfig.applicationListener(listener, AddApplicationTargetsProps.builder()
.protocol(ApplicationProtocol.HTTPS)
.build()))
.build());
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic EcsTarget.Builderbuilder()The name of the container.default NumberThe port number of the container.Listener and properties for adding target group to the listener.ID for a target group to be created.default ProtocolThe protocol used for the port mapping.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getContainerName
The name of the container. -
getListener
Listener and properties for adding target group to the listener. -
getNewTargetGroupId
ID for a target group to be created. -
getContainerPort
The port number of the container.Only applicable when using application/network load balancers.
Default: - Container port of the first added port mapping.
-
getProtocol
The protocol used for the port mapping.Only applicable when using application load balancers.
Default: Protocol.TCP
-
builder
- Returns:
- a
EcsTarget.BuilderofEcsTarget
-