public static final class SubscriptionProps.Builder
extends java.lang.Object
SubscriptionProps
Constructor and Description |
---|
Builder() |
public SubscriptionProps.Builder topic(ITopic topic)
SubscriptionProps.getTopic()
topic
- The topic to subscribe to. This parameter is required.this
public SubscriptionProps.Builder endpoint(java.lang.String endpoint)
SubscriptionOptions.getEndpoint()
endpoint
- The subscription endpoint. This parameter is required.
The meaning of this value depends on the value for 'protocol'.this
public SubscriptionProps.Builder protocol(SubscriptionProtocol protocol)
SubscriptionOptions.getProtocol()
protocol
- What type of subscription to add. This parameter is required.this
public SubscriptionProps.Builder deadLetterQueue(IQueue deadLetterQueue)
SubscriptionOptions.getDeadLetterQueue()
deadLetterQueue
- Queue to be used as dead letter queue.
If not passed no dead letter queue is enabled.this
public SubscriptionProps.Builder filterPolicy(java.util.Map<java.lang.String,? extends SubscriptionFilter> filterPolicy)
SubscriptionOptions.getFilterPolicy()
filterPolicy
- The filter policy.this
public SubscriptionProps.Builder rawMessageDelivery(java.lang.Boolean rawMessageDelivery)
SubscriptionOptions.getRawMessageDelivery()
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.this
public SubscriptionProps.Builder region(java.lang.String region)
SubscriptionOptions.getRegion()
region
- The region where the topic resides, in the case of cross-region subscriptions.this
public SubscriptionProps.Builder subscriptionRoleArn(java.lang.String subscriptionRoleArn)
SubscriptionOptions.getSubscriptionRoleArn()
subscriptionRoleArn
- Arn of role allowing access to firehose delivery stream.
Required for a firehose subscription protocol.this
public SubscriptionProps build()
SubscriptionProps
java.lang.NullPointerException
- if any required attribute was not provided