aws-cdk-lib.aws_sns_subscriptions.UrlSubscription

class UrlSubscription

LanguageType name
.NETAmazon.CDK.AWS.SNS.Subscriptions.UrlSubscription
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awssnssubscriptions#UrlSubscription
Javasoftware.amazon.awscdk.services.sns.subscriptions.UrlSubscription
Pythonaws_cdk.aws_sns_subscriptions.UrlSubscription
TypeScript (source)aws-cdk-lib » aws_sns_subscriptions » UrlSubscription

Implements 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

Example

const myTopic = new sns.Topic(this, 'MyTopic');

myTopic.addSubscription(new subscriptions.UrlSubscription('https://foobar.com/'));

Initializer

new UrlSubscription(url: string, props?: UrlSubscriptionProps)

Parameters

  • url string
  • props UrlSubscriptionProps

Methods

NameDescription
bind(_topic)Returns a configuration for a URL to subscribe to an SNS topic.

bind(_topic)

public bind(_topic: ITopic): TopicSubscriptionConfig

Parameters

  • _topic ITopic

Returns

  • TopicSubscriptionConfig

Returns a configuration for a URL to subscribe to an SNS topic.