Class ApplicationListenerRule
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.services.elasticloadbalancingv2.ApplicationListenerRule
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.130.0 (build 048a5ee)",
date="2026-05-20T12:39:46.712Z")
@Stability(Stable)
public class ApplicationListenerRule
extends software.constructs.Construct
Define a new listener rule.
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 ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forApplicationListenerRule.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedApplicationListenerRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedApplicationListenerRule(software.amazon.jsii.JsiiObjectRef objRef) ApplicationListenerRule(software.constructs.Construct scope, String id, ApplicationListenerRuleProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCondition(ListenerCondition condition) Add a non-standard condition to this rule.voidconfigureAction(ListenerAction action) Configure the action to perform for this rule.The ARN of this rule.Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString, withMethods 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
-
ApplicationListenerRule
protected ApplicationListenerRule(software.amazon.jsii.JsiiObjectRef objRef) -
ApplicationListenerRule
protected ApplicationListenerRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
ApplicationListenerRule
@Stability(Stable) public ApplicationListenerRule(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ApplicationListenerRuleProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
addCondition
Add a non-standard condition to this rule.- Parameters:
condition- This parameter is required.
-
configureAction
Configure the action to perform for this rule.- Parameters:
action- This parameter is required.
-
getListenerRuleArn
The ARN of this rule.
-