Class ListenerRuleConfiguration
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.ecs.ListenerRuleConfiguration
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.126.0 (build 206d44b)",
date="2026-02-09T14:39:10.383Z")
@Stability(Stable)
public abstract class ListenerRuleConfiguration
extends software.amazon.jsii.JsiiObject
Represents a listener configuration for advanced load balancer settings.
Example:
Cluster cluster;
TaskDefinition taskDefinition;
ApplicationTargetGroup blueTargetGroup;
ApplicationTargetGroup greenTargetGroup;
ApplicationListenerRule prodListenerRule;
FargateService service = FargateService.Builder.create(this, "Service")
.cluster(cluster)
.taskDefinition(taskDefinition)
.deploymentStrategy(DeploymentStrategy.LINEAR)
.linearConfiguration(TrafficShiftConfig.builder()
.stepPercent(10)
.stepBakeTime(Duration.minutes(5))
.build())
.build();
IEcsLoadBalancerTarget target = service.loadBalancerTarget(LoadBalancerTargetOptions.builder()
.containerName("web")
.containerPort(80)
.alternateTarget(AlternateTarget.Builder.create("AlternateTarget")
.alternateTargetGroup(greenTargetGroup)
.productionListener(ListenerRuleConfiguration.applicationListenerRule(prodListenerRule))
.build())
.build());
target.attachToApplicationTargetGroup(blueTargetGroup);
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedListenerRuleConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedListenerRuleConfiguration(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic ListenerRuleConfigurationUse an Application Load Balancer listener rule.static ListenerRuleConfigurationnetworkListener(NetworkListener listener) Use a Network Load Balancer listener.Methods 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, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
ListenerRuleConfiguration
protected ListenerRuleConfiguration(software.amazon.jsii.JsiiObjectRef objRef) -
ListenerRuleConfiguration
protected ListenerRuleConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
ListenerRuleConfiguration
@Stability(Stable) protected ListenerRuleConfiguration()
-
-
Method Details
-
applicationListenerRule
@Stability(Stable) @NotNull public static ListenerRuleConfiguration applicationListenerRule(@NotNull ApplicationListenerRule rule) Use an Application Load Balancer listener rule.- Parameters:
rule- This parameter is required.
-
networkListener
@Stability(Stable) @NotNull public static ListenerRuleConfiguration networkListener(@NotNull NetworkListener listener) Use a Network Load Balancer listener.- Parameters:
listener- This parameter is required.
-