@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.735Z") @Stability(value=Stable) public abstract class ListenerConfig extends software.amazon.jsii.JsiiObject
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());
| Modifier | Constructor and Description |
|---|---|
protected |
ListenerConfig() |
protected |
ListenerConfig(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
ListenerConfig(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addTargets(String id,
LoadBalancerTargetOptions target,
BaseService service)
Create and attach a target group to listener.
|
static ListenerConfig |
applicationListener(ApplicationListener listener)
Create a config for adding target group to ALB listener.
|
static ListenerConfig |
applicationListener(ApplicationListener listener,
AddApplicationTargetsProps props)
Create a config for adding target group to ALB listener.
|
static ListenerConfig |
networkListener(NetworkListener listener)
Create a config for adding target group to NLB listener.
|
static ListenerConfig |
networkListener(NetworkListener listener,
AddNetworkTargetsProps props)
Create a config for adding target group to NLB listener.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected ListenerConfig(software.amazon.jsii.JsiiObjectRef objRef)
protected ListenerConfig(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) protected ListenerConfig()
@Stability(value=Stable) @NotNull public static ListenerConfig applicationListener(@NotNull ApplicationListener listener, @Nullable AddApplicationTargetsProps props)
listener - This parameter is required.props - @Stability(value=Stable) @NotNull public static ListenerConfig applicationListener(@NotNull ApplicationListener listener)
listener - This parameter is required.@Stability(value=Stable) @NotNull public static ListenerConfig networkListener(@NotNull NetworkListener listener, @Nullable AddNetworkTargetsProps props)
listener - This parameter is required.props - @Stability(value=Stable) @NotNull public static ListenerConfig networkListener(@NotNull NetworkListener listener)
listener - This parameter is required.@Stability(value=Stable)
public abstract void addTargets(@NotNull
String id,
@NotNull
LoadBalancerTargetOptions target,
@NotNull
BaseService service)
id - This parameter is required.target - This parameter is required.service - This parameter is required.Copyright © 2022. All rights reserved.