aws-cdk-lib.aws_sns.SubscriptionProtocol

enum SubscriptionProtocol

LanguageType name
.NETAmazon.CDK.AWS.SNS.SubscriptionProtocol
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awssns#SubscriptionProtocol
Javasoftware.amazon.awscdk.services.sns.SubscriptionProtocol
Pythonaws_cdk.aws_sns.SubscriptionProtocol
TypeScript (source)aws-cdk-lib » aws_sns » SubscriptionProtocol

The type of subscription, controlling the type of the endpoint parameter.

Example

import { DeliveryStream } from '@aws-cdk/aws-kinesisfirehose-alpha';

const topic = new sns.Topic(this, 'Topic');
declare const stream: DeliveryStream;

new sns.Subscription(this, 'Subscription', {
  topic,
  endpoint: stream.deliveryStreamArn,
  protocol: sns.SubscriptionProtocol.FIREHOSE,
  subscriptionRoleArn: "SAMPLE_ARN", //role with permissions to send messages to a firehose delivery stream
});

Members

NameDescription
HTTPJSON-encoded message is POSTED to an HTTP url.
HTTPSJSON-encoded message is POSTed to an HTTPS url.
EMAILNotifications are sent via email.
EMAIL_JSONNotifications are JSON-encoded and sent via mail.
SMSNotification is delivered by SMS.
SQSNotifications are enqueued into an SQS queue.
APPLICATIONJSON-encoded notifications are sent to a mobile app endpoint.
LAMBDANotifications trigger a Lambda function.
FIREHOSENotifications put records into a firehose delivery stream.

HTTP

JSON-encoded message is POSTED to an HTTP url.


HTTPS

JSON-encoded message is POSTed to an HTTPS url.


EMAIL

Notifications are sent via email.


EMAIL_JSON

Notifications are JSON-encoded and sent via mail.


SMS

Notification is delivered by SMS.


SQS

Notifications are enqueued into an SQS queue.


APPLICATION

JSON-encoded notifications are sent to a mobile app endpoint.


LAMBDA

Notifications trigger a Lambda function.


FIREHOSE

Notifications put records into a firehose delivery stream.