Class SnsEventSource.Builder
java.lang.Object
software.amazon.awscdk.services.lambda.eventsources.SnsEventSource.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<SnsEventSource>
- Enclosing class:
SnsEventSource
@Stability(Stable)
public static final class SnsEventSource.Builder
extends Object
implements software.amazon.jsii.Builder<SnsEventSource>
A fluent builder for
SnsEventSource
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static SnsEventSource.Builder
deadLetterQueue
(IQueue deadLetterQueue) Queue to be used as dead letter queue.filterPolicy
(Map<String, ? extends SubscriptionFilter> filterPolicy) The filter policy.filterPolicyWithMessageBody
(Map<String, ? extends FilterOrPolicy> filterPolicyWithMessageBody) The filter policy that is applied on the message body.
-
Method Details
-
create
- Parameters:
topic
- This parameter is required.- Returns:
- a new instance of
SnsEventSource.Builder
.
-
deadLetterQueue
Queue to be used as dead letter queue.If not passed no dead letter queue is enabled.
Default: - No dead letter queue enabled.
- Parameters:
deadLetterQueue
- Queue to be used as dead letter queue. This parameter is required.- Returns:
this
-
filterPolicy
@Stability(Stable) public SnsEventSource.Builder filterPolicy(Map<String, ? extends SubscriptionFilter> filterPolicy) The filter policy.Default: - all messages are delivered
- Parameters:
filterPolicy
- The filter policy. This parameter is required.- Returns:
this
-
filterPolicyWithMessageBody
@Stability(Stable) public SnsEventSource.Builder filterPolicyWithMessageBody(Map<String, ? extends FilterOrPolicy> filterPolicyWithMessageBody) The filter policy that is applied on the message body.To apply a filter policy to the message attributes, use
filterPolicy
. A maximum of one offilterPolicyWithMessageBody
andfilterPolicy
may be used.Default: - all messages are delivered
- Parameters:
filterPolicyWithMessageBody
- The filter policy that is applied on the message body. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<SnsEventSource>
- Returns:
- a newly built instance of
SnsEventSource
.
-