Class SubscriptionProps.Builder
java.lang.Object
software.amazon.awscdk.services.sns.SubscriptionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<SubscriptionProps>
- Enclosing interface:
SubscriptionProps
@Stability(Stable)
public static final class SubscriptionProps.Builder
extends Object
implements software.amazon.jsii.Builder<SubscriptionProps>
A builder for
SubscriptionProps
-
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()
Sets the value ofSubscriptionProps.getTopic()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
topic
Sets the value ofSubscriptionProps.getTopic()
- Parameters:
topic
- The topic to subscribe to. This parameter is required.- Returns:
this
-
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 SubscriptionProps.Builder filterPolicy(Map<String, ? extends SubscriptionFilter> filterPolicy) Sets the value ofSubscriptionOptions.getFilterPolicy()
- Parameters:
filterPolicy
- The filter policy.- Returns:
this
-
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
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<SubscriptionProps>
- Returns:
- a new instance of
SubscriptionProps
- Throws:
NullPointerException
- if any required attribute was not provided
-