UNPKG

1.19 kBTypeScriptView Raw
1import * as sns from '@aws-cdk/aws-sns';
2import { SubscriptionProps } from './subscription';
3/**
4 * Options for URL subscriptions.
5 */
6export interface UrlSubscriptionProps extends SubscriptionProps {
7 /**
8 * The message to the queue is the same as it was sent to the topic
9 *
10 * If false, the message will be wrapped in an SNS envelope.
11 *
12 * @default false
13 */
14 readonly rawMessageDelivery?: boolean;
15 /**
16 * The subscription's protocol.
17 *
18 * @default - Protocol is derived from url
19 */
20 readonly protocol?: sns.SubscriptionProtocol;
21}
22/**
23 * Use a URL as a subscription target
24 *
25 * The message will be POSTed to the given URL.
26 *
27 * @see https://docs.aws.amazon.com/sns/latest/dg/sns-http-https-endpoint-as-subscriber.html
28 */
29export declare class UrlSubscription implements sns.ITopicSubscription {
30 private readonly url;
31 private readonly props;
32 private readonly protocol;
33 private readonly unresolvedUrl;
34 constructor(url: string, props?: UrlSubscriptionProps);
35 /**
36 * Returns a configuration for a URL to subscribe to an SNS topic
37 */
38 bind(_topic: sns.ITopic): sns.TopicSubscriptionConfig;
39}