Interface CfnListenerRule.RuleConditionProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnListenerRule.RuleConditionProperty.Jsii$Proxy
Enclosing class:
CfnListenerRule

@Stability(Stable) public static interface CfnListenerRule.RuleConditionProperty extends software.amazon.jsii.JsiiSerializable
Specifies a condition for a listener rule.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.elasticloadbalancingv2.*;
 RuleConditionProperty ruleConditionProperty = RuleConditionProperty.builder()
         .field("field")
         .hostHeaderConfig(HostHeaderConfigProperty.builder()
                 .values(List.of("values"))
                 .build())
         .httpHeaderConfig(HttpHeaderConfigProperty.builder()
                 .httpHeaderName("httpHeaderName")
                 .values(List.of("values"))
                 .build())
         .httpRequestMethodConfig(HttpRequestMethodConfigProperty.builder()
                 .values(List.of("values"))
                 .build())
         .pathPatternConfig(PathPatternConfigProperty.builder()
                 .values(List.of("values"))
                 .build())
         .queryStringConfig(QueryStringConfigProperty.builder()
                 .values(List.of(QueryStringKeyValueProperty.builder()
                         .key("key")
                         .value("value")
                         .build()))
                 .build())
         .sourceIpConfig(SourceIpConfigProperty.builder()
                 .values(List.of("values"))
                 .build())
         .values(List.of("values"))
         .build();
 
  • Method Details

    • getField

      @Stability(Stable) @Nullable default String getField()
      The field in the HTTP request. The following are the possible values:.

      • http-header
      • http-request-method
      • host-header
      • path-pattern
      • query-string
      • source-ip
    • getHostHeaderConfig

      @Stability(Stable) @Nullable default Object getHostHeaderConfig()
      Information for a host header condition.

      Specify only when Field is host-header .

    • getHttpHeaderConfig

      @Stability(Stable) @Nullable default Object getHttpHeaderConfig()
      Information for an HTTP header condition.

      Specify only when Field is http-header .

    • getHttpRequestMethodConfig

      @Stability(Stable) @Nullable default Object getHttpRequestMethodConfig()
      Information for an HTTP method condition.

      Specify only when Field is http-request-method .

    • getPathPatternConfig

      @Stability(Stable) @Nullable default Object getPathPatternConfig()
      Information for a path pattern condition.

      Specify only when Field is path-pattern .

    • getQueryStringConfig

      @Stability(Stable) @Nullable default Object getQueryStringConfig()
      Information for a query string condition.

      Specify only when Field is query-string .

    • getSourceIpConfig

      @Stability(Stable) @Nullable default Object getSourceIpConfig()
      Information for a source IP condition.

      Specify only when Field is source-ip .

    • getValues

      @Stability(Stable) @Nullable default List<String> getValues()
      The condition value.

      Specify only when Field is host-header or path-pattern . Alternatively, to specify multiple host names or multiple path patterns, use HostHeaderConfig or PathPatternConfig .

      If Field is host-header and you're not using HostHeaderConfig , you can specify a single host name (for example, my.example.com). A host name is case insensitive, can be up to 128 characters in length, and can contain any of the following characters.

      • A-Z, a-z, 0-9
        • .
        • (matches 0 or more characters)
      • ? (matches exactly 1 character)

      If Field is path-pattern and you're not using PathPatternConfig , you can specify a single path pattern (for example, /img/*). A path pattern is case-sensitive, can be up to 128 characters in length, and can contain any of the following characters.

      • A-Z, a-z, 0-9
      • _ - . $ / ~ " ' @ : +
      • & (using &)
        • (matches 0 or more characters)
      • ? (matches exactly 1 character)
    • builder

      @Stability(Stable) static CfnListenerRule.RuleConditionProperty.Builder builder()
      Returns:
      a CfnListenerRule.RuleConditionProperty.Builder of CfnListenerRule.RuleConditionProperty