enum SubscriptionProtocol
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.SNS.SubscriptionProtocol |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awssns#SubscriptionProtocol |
Java | software.amazon.awscdk.services.sns.SubscriptionProtocol |
Python | aws_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
Name | Description |
---|---|
HTTP | JSON-encoded message is POSTED to an HTTP url. |
HTTPS | JSON-encoded message is POSTed to an HTTPS url. |
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. |
HTTP
JSON-encoded message is POSTED to an HTTP url.
HTTPS
JSON-encoded message is POSTed to an HTTPS url.
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.