@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:42.242Z") @Stability(value=Stable) public interface StringConditions 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 |
StringConditions.Builder
A builder for
StringConditions |
static class |
StringConditions.Jsii$Proxy
An implementation for
StringConditions |
| Modifier and Type | Method and Description |
|---|---|
static StringConditions.Builder |
builder() |
default List<String> |
getAllowlist()
Match one or more values.
|
default List<String> |
getDenylist()
Match any value that doesn't include any of the specified values.
|
default List<String> |
getMatchPrefixes()
Matches values that begins with the specified prefixes.
|
@Stability(value=Stable) @Nullable default List<String> getAllowlist()
Default: - None
@Stability(value=Stable) @Nullable default List<String> getDenylist()
Default: - None
@Stability(value=Stable) @Nullable default List<String> getMatchPrefixes()
Default: - None
@Stability(value=Stable) static StringConditions.Builder builder()
StringConditions.Builder of StringConditionsCopyright © 2022. All rights reserved.