@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:36:52.414Z") @Stability(value=Stable) public interface NumericConditions extends software.amazon.jsii.JsiiSerializable
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());
| Modifier and Type | Interface and Description |
|---|---|
static class |
NumericConditions.Builder
A builder for
NumericConditions |
static class |
NumericConditions.Jsii$Proxy
An implementation for
NumericConditions |
| Modifier and Type | Method and Description |
|---|---|
static NumericConditions.Builder |
builder() |
default List<Number> |
getAllowlist()
Match one or more values.
|
default BetweenCondition |
getBetween()
Match values that are between the specified values.
|
default BetweenCondition |
getBetweenStrict()
Match values that are strictly between the specified values.
|
default Number |
getGreaterThan()
Match values that are greater than the specified value.
|
default Number |
getGreaterThanOrEqualTo()
Match values that are greater than or equal to the specified value.
|
default Number |
getLessThan()
Match values that are less than the specified value.
|
default Number |
getLessThanOrEqualTo()
Match values that are less than or equal to the specified value.
|
default List<Number> |
getWhitelist()
Deprecated.
use `allowlist`
|
@Stability(value=Stable) @Nullable default List<Number> getAllowlist()
Default: - None
@Stability(value=Stable) @Nullable default BetweenCondition getBetween()
Default: - None
@Stability(value=Stable) @Nullable default BetweenCondition getBetweenStrict()
Default: - None
@Stability(value=Stable) @Nullable default Number getGreaterThan()
Default: - None
@Stability(value=Stable) @Nullable default Number getGreaterThanOrEqualTo()
Default: - None
@Stability(value=Stable) @Nullable default Number getLessThan()
Default: - None
@Stability(value=Stable) @Nullable default Number getLessThanOrEqualTo()
Default: - None
@Stability(value=Deprecated) @Deprecated @Nullable default List<Number> getWhitelist()
Default: - None
@Stability(value=Stable) static NumericConditions.Builder builder()
NumericConditions.Builder of NumericConditionsCopyright © 2023. All rights reserved.