Class SubscriptionOptions.Builder
java.lang.Object
software.amazon.awscdk.services.sns.SubscriptionOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<SubscriptionOptions>
- Enclosing interface:
SubscriptionOptions
@Stability(Stable)
public static final class SubscriptionOptions.Builder
extends Object
implements software.amazon.jsii.Builder<SubscriptionOptions>
A builder for
SubscriptionOptions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.deadLetterQueue
(IQueue deadLetterQueue) Sets the value ofSubscriptionOptions.getDeadLetterQueue()
Sets the value ofSubscriptionOptions.getEndpoint()
filterPolicy
(Map<String, ? extends SubscriptionFilter> filterPolicy) Sets the value ofSubscriptionOptions.getFilterPolicy()
protocol
(SubscriptionProtocol protocol) Sets the value ofSubscriptionOptions.getProtocol()
rawMessageDelivery
(Boolean rawMessageDelivery) Sets the value ofSubscriptionOptions.getRawMessageDelivery()
Sets the value ofSubscriptionOptions.getRegion()
subscriptionRoleArn
(String subscriptionRoleArn) Sets the value ofSubscriptionOptions.getSubscriptionRoleArn()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
endpoint
Sets the value ofSubscriptionOptions.getEndpoint()
- Parameters:
endpoint
- The subscription endpoint. This parameter is required. The meaning of this value depends on the value for 'protocol'.- Returns:
this
-
protocol
Sets the value ofSubscriptionOptions.getProtocol()
- Parameters:
protocol
- What type of subscription to add. This parameter is required.- Returns:
this
-
deadLetterQueue
Sets the value ofSubscriptionOptions.getDeadLetterQueue()
- Parameters:
deadLetterQueue
- Queue to be used as dead letter queue. If not passed no dead letter queue is enabled.- Returns:
this
-
filterPolicy
@Stability(Stable) public SubscriptionOptions.Builder filterPolicy(Map<String, ? extends SubscriptionFilter> filterPolicy) Sets the value ofSubscriptionOptions.getFilterPolicy()
- Parameters:
filterPolicy
- The filter policy.- Returns:
this
-
rawMessageDelivery
@Stability(Stable) public SubscriptionOptions.Builder rawMessageDelivery(Boolean rawMessageDelivery) Sets the value ofSubscriptionOptions.getRawMessageDelivery()
- Parameters:
rawMessageDelivery
- true if raw message delivery is enabled for the subscription. Raw messages are free of JSON formatting and can be sent to HTTP/S and Amazon SQS endpoints. For more information, see GetSubscriptionAttributes in the Amazon Simple Notification Service API Reference.- Returns:
this
-
region
Sets the value ofSubscriptionOptions.getRegion()
- Parameters:
region
- The region where the topic resides, in the case of cross-region subscriptions.- Returns:
this
-
subscriptionRoleArn
@Stability(Stable) public SubscriptionOptions.Builder subscriptionRoleArn(String subscriptionRoleArn) Sets the value ofSubscriptionOptions.getSubscriptionRoleArn()
- Parameters:
subscriptionRoleArn
- Arn of role allowing access to firehose delivery stream. Required for a firehose subscription protocol.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<SubscriptionOptions>
- Returns:
- a new instance of
SubscriptionOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-