Interface NumericConditions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
NumericConditions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:38.189Z") @Stability(Stable) public interface NumericConditions extends software.amazon.jsii.JsiiSerializable
Conditions that can be applied to numeric attributes.

Example:

 import software.amazon.awscdk.services.lambda.*;
 Function fn;
 Topic myTopic = new Topic(this, "MyTopic");
 // Lambda should receive only message matching the following conditions on attributes:
 // color: 'red' or 'orange' or begins with 'bl'
 // size: anything but 'small' or 'medium'
 // price: between 100 and 200 or greater than 300
 // store: attribute must be present
 myTopic.addSubscription(LambdaSubscription.Builder.create(fn)
         .filterPolicy(Map.of(
                 "color", SubscriptionFilter.stringFilter(StringConditions.builder()
                         .allowlist(List.of("red", "orange"))
                         .matchPrefixes(List.of("bl"))
                         .build()),
                 "size", SubscriptionFilter.stringFilter(StringConditions.builder()
                         .denylist(List.of("small", "medium"))
                         .build()),
                 "price", SubscriptionFilter.numericFilter(NumericConditions.builder()
                         .between(BetweenCondition.builder().start(100).stop(200).build())
                         .greaterThan(300)
                         .build()),
                 "store", SubscriptionFilter.existsFilter()))
         .build());
 
  • Method Details

    • getAllowlist

      @Stability(Stable) @Nullable default List<Number> getAllowlist()
      Match one or more values.

      Default: - None

    • getBetween

      @Stability(Stable) @Nullable default BetweenCondition getBetween()
      Match values that are between the specified values.

      Default: - None

    • getBetweenStrict

      @Stability(Stable) @Nullable default BetweenCondition getBetweenStrict()
      Match values that are strictly between the specified values.

      Default: - None

    • getGreaterThan

      @Stability(Stable) @Nullable default Number getGreaterThan()
      Match values that are greater than the specified value.

      Default: - None

    • getGreaterThanOrEqualTo

      @Stability(Stable) @Nullable default Number getGreaterThanOrEqualTo()
      Match values that are greater than or equal to the specified value.

      Default: - None

    • getLessThan

      @Stability(Stable) @Nullable default Number getLessThan()
      Match values that are less than the specified value.

      Default: - None

    • getLessThanOrEqualTo

      @Stability(Stable) @Nullable default Number getLessThanOrEqualTo()
      Match values that are less than or equal to the specified value.

      Default: - None

    • getWhitelist

      @Stability(Deprecated) @Deprecated @Nullable default List<Number> getWhitelist()
      Deprecated.
      use allowlist
      (deprecated) Match one or more values.

      Default: - None

    • builder

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