@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:42.257Z") @Stability(value=Stable) public interface TopicSubscriptionConfig extends software.amazon.jsii.JsiiSerializable, SubscriptionOptions
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sns.*;
import software.amazon.awscdk.services.sqs.*;
import software.constructs.*;
Construct construct;
Queue queue;
SubscriptionFilter subscriptionFilter;
TopicSubscriptionConfig topicSubscriptionConfig = TopicSubscriptionConfig.builder()
.endpoint("endpoint")
.protocol(SubscriptionProtocol.HTTP)
.subscriberId("subscriberId")
// the properties below are optional
.deadLetterQueue(queue)
.filterPolicy(Map.of(
"filterPolicyKey", subscriptionFilter))
.rawMessageDelivery(false)
.region("region")
.subscriberScope(construct)
.subscriptionRoleArn("subscriptionRoleArn")
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
TopicSubscriptionConfig.Builder
A builder for
TopicSubscriptionConfig |
static class |
TopicSubscriptionConfig.Jsii$Proxy
An implementation for
TopicSubscriptionConfig |
| Modifier and Type | Method and Description |
|---|---|
static TopicSubscriptionConfig.Builder |
builder() |
String |
getSubscriberId()
The id of the SNS subscription resource created under `scope`.
|
default software.constructs.Construct |
getSubscriberScope()
The scope in which to create the SNS subscription resource.
|
getDeadLetterQueue, getEndpoint, getFilterPolicy, getProtocol, getRawMessageDelivery, getRegion, getSubscriptionRoleArn@Stability(value=Stable) @NotNull String getSubscriberId()
In most
cases, it is recommended to use the uniqueId of the topic you are
subscribing to.
@Stability(value=Stable) @Nullable default software.constructs.Construct getSubscriberScope()
Normally you'd want the subscription to be created on the consuming stack because the topic is usually referenced by the consumer's resource policy (e.g. SQS queue policy). Otherwise, it will cause a cyclic reference.
If this is undefined, the subscription will be created on the topic's stack.
Default: - use the topic as the scope of the subscription, in which case `subscriberId` must be defined.
@Stability(value=Stable) static TopicSubscriptionConfig.Builder builder()
builder in interface SubscriptionOptionsTopicSubscriptionConfig.Builder of TopicSubscriptionConfigCopyright © 2022. All rights reserved.