Class UrlSubscription.Builder
java.lang.Object
software.amazon.awscdk.services.sns.subscriptions.UrlSubscription.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<UrlSubscription>
- Enclosing class:
UrlSubscription
@Stability(Stable)
public static final class UrlSubscription.Builder
extends Object
implements software.amazon.jsii.Builder<UrlSubscription>
A fluent builder for
UrlSubscription
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static UrlSubscription.Builder
deadLetterQueue
(IQueue deadLetterQueue) Queue to be used as dead letter queue.deliveryPolicy
(DeliveryPolicy deliveryPolicy) The delivery policy.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.protocol
(SubscriptionProtocol protocol) The subscription's protocol.rawMessageDelivery
(Boolean rawMessageDelivery) The message to the queue is the same as it was sent to the topic.
-
Method Details
-
create
- Parameters:
url
- This parameter is required.- Returns:
- a new instance of
UrlSubscription.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 UrlSubscription.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 UrlSubscription.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
-
deliveryPolicy
The delivery policy.Default: - if the initial delivery of the message fails, three retries with a delay between failed attempts set at 20 seconds
- Parameters:
deliveryPolicy
- The delivery policy. This parameter is required.- Returns:
this
-
protocol
The subscription's protocol.Default: - Protocol is derived from url
- Parameters:
protocol
- The subscription's protocol. This parameter is required.- Returns:
this
-
rawMessageDelivery
The message to the queue is the same as it was sent to the topic.If false, the message will be wrapped in an SNS envelope.
Default: false
- Parameters:
rawMessageDelivery
- The message to the queue is the same as it was sent to the topic. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<UrlSubscription>
- Returns:
- a newly built instance of
UrlSubscription
.
-