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 Classes
    Modifier and Type
    Class
    Description
    static final class 
    A fluent builder for ApplicationListenerRule.

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.constructs.IConstruct

    software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    ApplicationListenerRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    ApplicationListenerRule(software.amazon.jsii.JsiiObjectRef objRef)
     
     
    ApplicationListenerRule(software.constructs.Construct scope, String id, ApplicationListenerRuleProps props)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Add a non-standard condition to this rule.
    void
    Configure the action to perform for this rule.
    The ARN of this rule.

    Methods inherited from class software.constructs.Construct

    getNode, isConstruct, toString, with

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods 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

      @Stability(Stable) public void addCondition(@NotNull ListenerCondition condition)
      Add a non-standard condition to this rule.

      Parameters:
      condition - This parameter is required.
    • configureAction

      @Stability(Stable) public void configureAction(@NotNull ListenerAction action)
      Configure the action to perform for this rule.

      Parameters:
      action - This parameter is required.
    • getListenerRuleArn

      @Stability(Stable) @NotNull public String getListenerRuleArn()
      The ARN of this rule.