Class Subscription.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<Subscription>
- Enclosing class:
Subscription
Subscription
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static Subscription.Builder
deadLetterQueue
(IQueue deadLetterQueue) Queue to be used as dead letter queue.The subscription endpoint.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) What type of subscription to add.rawMessageDelivery
(Boolean rawMessageDelivery) true if raw message delivery is enabled for the subscription.The region where the topic resides, in the case of cross-region subscriptions.subscriptionRoleArn
(String subscriptionRoleArn) Arn of role allowing access to firehose delivery stream.The topic to subscribe to.
-
Method Details
-
create
@Stability(Stable) public static Subscription.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
Subscription.Builder
.
-
endpoint
The subscription endpoint.The meaning of this value depends on the value for 'protocol'.
- Parameters:
endpoint
- The subscription endpoint. This parameter is required.- Returns:
this
-
protocol
What type of subscription to add.- Parameters:
protocol
- What type of subscription to add. This parameter is required.- Returns:
this
-
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 Subscription.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 Subscription.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
-
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.
Default: false
- Parameters:
rawMessageDelivery
- true if raw message delivery is enabled for the subscription. This parameter is required.- Returns:
this
-
region
The region where the topic resides, in the case of cross-region subscriptions.Default: - the region where the CloudFormation stack is being deployed.
- Parameters:
region
- The region where the topic resides, in the case of cross-region subscriptions. This parameter is required.- Returns:
this
-
subscriptionRoleArn
Arn of role allowing access to firehose delivery stream.Required for a firehose subscription protocol.
Default: - No subscription role is provided
- Parameters:
subscriptionRoleArn
- Arn of role allowing access to firehose delivery stream. This parameter is required.- Returns:
this
-
topic
The topic to subscribe to.- Parameters:
topic
- The topic to subscribe to. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<Subscription>
- Returns:
- a newly built instance of
Subscription
.
-