@Generated(value="jsii-pacmak/1.63.2 (build a8a8833)", date="2022-08-08T20:48:12.923Z") @Stability(value=Stable) public interface EcsTarget extends software.amazon.jsii.JsiiSerializable
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());
Modifier and Type | Interface and Description |
---|---|
static class |
EcsTarget.Builder
A builder for
EcsTarget |
static class |
EcsTarget.Jsii$Proxy
An implementation for
EcsTarget |
Modifier and Type | Method and Description |
---|---|
static EcsTarget.Builder |
builder() |
String |
getContainerName()
The name of the container.
|
default Number |
getContainerPort()
The port number of the container.
|
ListenerConfig |
getListener()
Listener and properties for adding target group to the listener.
|
String |
getNewTargetGroupId()
ID for a target group to be created.
|
default Protocol |
getProtocol()
The protocol used for the port mapping.
|
@Stability(value=Stable) @NotNull String getContainerName()
@Stability(value=Stable) @NotNull ListenerConfig getListener()
@Stability(value=Stable) @NotNull String getNewTargetGroupId()
@Stability(value=Stable) @Nullable default Number getContainerPort()
Only applicable when using application/network load balancers.
Default: - Container port of the first added port mapping.
@Stability(value=Stable) @Nullable default Protocol getProtocol()
Only applicable when using application load balancers.
Default: Protocol.TCP
@Stability(value=Stable) static EcsTarget.Builder builder()
EcsTarget.Builder
of EcsTarget
Copyright © 2022. All rights reserved.