@aws-cdk/aws-sns-subscriptions

  • Version 1.204.0
  • Published
  • 187 kB
  • 7 dependencies
  • Apache-2.0 license

Install

npm i @aws-cdk/aws-sns-subscriptions
yarn add @aws-cdk/aws-sns-subscriptions
pnpm add @aws-cdk/aws-sns-subscriptions

Overview

CDK Subscription Constructs for AWS SNS

Index

Classes

class EmailSubscription

class EmailSubscription implements sns.ITopicSubscription {}
  • Use an email address as a subscription target

    Email subscriptions require confirmation.

constructor

constructor(emailAddress: string, props?: EmailSubscriptionProps);

    method bind

    bind: (_topic: sns.ITopic) => sns.TopicSubscriptionConfig;
    • Returns a configuration for an email address to subscribe to an SNS topic

    class LambdaSubscription

    class LambdaSubscription implements sns.ITopicSubscription {}
    • Use a Lambda function as a subscription target

    constructor

    constructor(fn: lambda.IFunction, props?: LambdaSubscriptionProps);

      method bind

      bind: (topic: sns.ITopic) => sns.TopicSubscriptionConfig;
      • Returns a configuration for a Lambda function to subscribe to an SNS topic

      class SmsSubscription

      class SmsSubscription implements sns.ITopicSubscription {}
      • Use an sms address as a subscription target

      constructor

      constructor(phoneNumber: string, props?: SmsSubscriptionProps);

        method bind

        bind: (_topic: sns.ITopic) => sns.TopicSubscriptionConfig;

          class SqsSubscription

          class SqsSubscription implements sns.ITopicSubscription {}
          • Use an SQS queue as a subscription target

          constructor

          constructor(queue: sqs.IQueue, props?: SqsSubscriptionProps);

            method bind

            bind: (topic: sns.ITopic) => sns.TopicSubscriptionConfig;
            • Returns a configuration for an SQS queue to subscribe to an SNS topic

            class UrlSubscription

            class UrlSubscription implements sns.ITopicSubscription {}
            • Use a URL as a subscription target

              The message will be POSTed to the given URL.

              See Also

              • https://docs.aws.amazon.com/sns/latest/dg/sns-http-https-endpoint-as-subscriber.html

            constructor

            constructor(url: string, props?: UrlSubscriptionProps);

              method bind

              bind: (_topic: sns.ITopic) => sns.TopicSubscriptionConfig;
              • Returns a configuration for a URL to subscribe to an SNS topic

              Interfaces

              interface EmailSubscriptionProps

              interface EmailSubscriptionProps extends SubscriptionProps {}
              • Options for email subscriptions.

              property json

              readonly json?: boolean;
              • Indicates if the full notification JSON should be sent to the email address or just the message text.

                false (Message text)

              interface LambdaSubscriptionProps

              interface LambdaSubscriptionProps extends SubscriptionProps {}
              • Properties for a Lambda subscription

              interface SmsSubscriptionProps

              interface SmsSubscriptionProps extends SubscriptionProps {}
              • Options for SMS subscriptions.

              interface SqsSubscriptionProps

              interface SqsSubscriptionProps extends SubscriptionProps {}
              • Properties for an SQS subscription

              property rawMessageDelivery

              readonly rawMessageDelivery?: boolean;
              • The message to the queue is the same as it was sent to the topic

                If false, the message will be wrapped in an SNS envelope.

                false

              interface SubscriptionProps

              interface SubscriptionProps {}
              • Options to subscribing to an SNS topic

              property deadLetterQueue

              readonly deadLetterQueue?: IQueue;
              • Queue to be used as dead letter queue. If not passed no dead letter queue is enabled.

                - No dead letter queue enabled.

              property filterPolicy

              readonly filterPolicy?: {
              [attribute: string]: sns.SubscriptionFilter;
              };
              • The filter policy.

                - all messages are delivered

              interface UrlSubscriptionProps

              interface UrlSubscriptionProps extends SubscriptionProps {}
              • Options for URL subscriptions.

              property protocol

              readonly protocol?: sns.SubscriptionProtocol;
              • The subscription's protocol.

                - Protocol is derived from url

              property rawMessageDelivery

              readonly rawMessageDelivery?: boolean;
              • The message to the queue is the same as it was sent to the topic

                If false, the message will be wrapped in an SNS envelope.

                false

              Package Files (7)

              Dependencies (7)

              Dev Dependencies (7)

              Peer Dependencies (7)

              Badge

              To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

              You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@aws-cdk/aws-sns-subscriptions.

              • Markdown
                [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@aws-cdk/aws-sns-subscriptions)
              • HTML
                <a href="https://www.jsdocs.io/package/@aws-cdk/aws-sns-subscriptions"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>