A new subscription. Prefer to use the `ITopic.addSubscription()` methods to create instances of this class.
import { Subscription } from 'aws-cdk-lib/aws-sns';Or use the module namespace:
import * as sns from 'aws-cdk-lib/aws-sns';
// sns.SubscriptionConfiguration passed to the constructor as SubscriptionProps.
topicRequiredITopicThe topic to subscribe to.
SubscriptionOptionsendpointRequiredinherited from SubscriptionOptionsstringThe subscription endpoint. The meaning of this value depends on the value for 'protocol'.
protocolRequiredinherited from SubscriptionOptionsSubscriptionProtocolWhat type of subscription to add.
deadLetterQueueOptionalinherited from SubscriptionOptionsIQueueQueue to be used as dead letter queue. If not passed no dead letter queue is enabled.
Default: - No dead letter queue enabled.
deliveryPolicyOptionalinherited from SubscriptionOptionsDeliveryPolicyThe delivery policy.
Default: - if the initial delivery of the message fails, three retries with a delay between failed attempts set at 20 seconds
filterPolicyOptionalinherited from SubscriptionOptions{ [key: string]: SubscriptionFilter }The filter policy.
Default: - all messages are delivered
filterPolicyWithMessageBodyOptionalinherited from SubscriptionOptions{ [key: string]: FilterOrPolicy }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 of `filterPolicyWithMessageBody` and `filterPolicy` may be used.
Default: - all messages are delivered
rawMessageDeliveryOptionalinherited from SubscriptionOptionsbooleantrue 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
regionOptionalinherited from SubscriptionOptionsstringThe region where the topic resides, in the case of cross-region subscriptions.
Default: - the region where the CloudFormation stack is being deployed.
subscriptionRoleArnOptionalinherited from SubscriptionOptionsstringArn of role allowing access to firehose delivery stream. Required for a firehose subscription protocol.
Default: - No subscription role is provided
Everything you need to know about Amazon SNS on one page. HD quality, print-friendly.
Download Free Infographicaws-sns