class UrlSubscription
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.SNS.Subscriptions.UrlSubscription |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awssnssubscriptions#UrlSubscription |
Java | software.amazon.awscdk.services.sns.subscriptions.UrlSubscription |
Python | aws_cdk.aws_sns_subscriptions.UrlSubscription |
TypeScript (source) | aws-cdk-lib » aws_sns_subscriptions » UrlSubscription |
Implements
ITopic
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
Url
Subscription Props
Methods
Name | Description |
---|---|
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
Returns a configuration for a URL to subscribe to an SNS topic.