java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.elasticloadbalancingv2.ListenerCondition
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-12-11T23:26:33.465Z") @Stability(Stable) public abstract class ListenerCondition extends software.amazon.jsii.JsiiObject
ListenerCondition providers definition.

Example:

 ApplicationListener listener;
 AutoScalingGroup asg;
 listener.addTargets("Example.Com Fleet", AddApplicationTargetsProps.builder()
         .priority(10)
         .conditions(List.of(ListenerCondition.hostHeaders(List.of("example.com")), ListenerCondition.pathPatterns(List.of("/ok", "/path"))))
         .port(8080)
         .targets(List.of(asg))
         .build());
 
  • Constructor Details

    • ListenerCondition

      protected ListenerCondition(software.amazon.jsii.JsiiObjectRef objRef)
    • ListenerCondition

      protected ListenerCondition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • ListenerCondition

      @Stability(Stable) protected ListenerCondition()
  • Method Details

    • hostHeaders

      @Stability(Stable) @NotNull public static ListenerCondition hostHeaders(@NotNull List<String> values)
      Create a host-header listener rule condition.

      Parameters:
      values - Hosts for host headers. This parameter is required.
    • httpHeader

      @Stability(Stable) @NotNull public static ListenerCondition httpHeader(@NotNull String name, @NotNull List<String> values)
      Create a http-header listener rule condition.

      Parameters:
      name - HTTP header name. This parameter is required.
      values - HTTP header values. This parameter is required.
    • httpRequestMethods

      @Stability(Stable) @NotNull public static ListenerCondition httpRequestMethods(@NotNull List<String> values)
      Create a http-request-method listener rule condition.

      Parameters:
      values - HTTP request methods. This parameter is required.
    • pathPatterns

      @Stability(Stable) @NotNull public static ListenerCondition pathPatterns(@NotNull List<String> values)
      Create a path-pattern listener rule condition.

      Parameters:
      values - Path patterns. This parameter is required.
    • queryStrings

      @Stability(Stable) @NotNull public static ListenerCondition queryStrings(@NotNull List<? extends QueryStringCondition> values)
      Create a query-string listener rule condition.

      Parameters:
      values - Query string key/value pairs. This parameter is required.
    • sourceIps

      @Stability(Stable) @NotNull public static ListenerCondition sourceIps(@NotNull List<String> values)
      Create a source-ip listener rule condition.

      Parameters:
      values - Source ips. This parameter is required.
    • renderRawCondition

      @Stability(Stable) @NotNull public abstract Object renderRawCondition()
      Render the raw Cfn listener rule condition object.