Interface TopicSubscriptionConfig
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
,SubscriptionOptions
- All Known Implementing Classes:
TopicSubscriptionConfig.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:38.204Z")
@Stability(Stable)
public interface TopicSubscriptionConfig
extends software.amazon.jsii.JsiiSerializable, SubscriptionOptions
Subscription configuration.
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.amazon.awscdk.core.*; 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();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forTopicSubscriptionConfig
static final class
An implementation forTopicSubscriptionConfig
-
Method Summary
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
Methods inherited from interface software.amazon.awscdk.services.sns.SubscriptionOptions
getDeadLetterQueue, getEndpoint, getFilterPolicy, getProtocol, getRawMessageDelivery, getRegion, getSubscriptionRoleArn
-
Method Details
-
getSubscriberId
The id of the SNS subscription resource created underscope
.In most cases, it is recommended to use the
uniqueId
of the topic you are subscribing to. -
getSubscriberScope
The scope in which to create the SNS subscription resource.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.
-
builder
- Returns:
- a
TopicSubscriptionConfig.Builder
ofTopicSubscriptionConfig
-