@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:44.743Z") public interface LambdaSubscriptionProps extends SubscriptionProps
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 |
LambdaSubscriptionProps.Builder
A builder for
LambdaSubscriptionProps |
static class |
LambdaSubscriptionProps.Jsii$Proxy
An implementation for
LambdaSubscriptionProps |
Modifier and Type | Method and Description |
---|---|
static LambdaSubscriptionProps.Builder |
builder() |
getDeadLetterQueue, getFilterPolicy
static LambdaSubscriptionProps.Builder builder()
builder
in interface SubscriptionProps
LambdaSubscriptionProps.Builder
of LambdaSubscriptionProps