1 | ;
|
2 | var _a;
|
3 | Object.defineProperty(exports, "__esModule", { value: true });
|
4 | exports.SmsSubscription = void 0;
|
5 | const jsiiDeprecationWarnings = require("../.warnings.jsii.js");
|
6 | const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
|
7 | const sns = require("@aws-cdk/aws-sns");
|
8 | /**
|
9 | * Use an sms address as a subscription target
|
10 | */
|
11 | class SmsSubscription {
|
12 | constructor(phoneNumber, props = {}) {
|
13 | this.phoneNumber = phoneNumber;
|
14 | this.props = props;
|
15 | try {
|
16 | jsiiDeprecationWarnings._aws_cdk_aws_sns_subscriptions_SmsSubscriptionProps(props);
|
17 | }
|
18 | catch (error) {
|
19 | if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
20 | Error.captureStackTrace(error, SmsSubscription);
|
21 | }
|
22 | throw error;
|
23 | }
|
24 | }
|
25 | bind(_topic) {
|
26 | return {
|
27 | subscriberId: this.phoneNumber,
|
28 | endpoint: this.phoneNumber,
|
29 | protocol: sns.SubscriptionProtocol.SMS,
|
30 | filterPolicy: this.props.filterPolicy,
|
31 | };
|
32 | }
|
33 | }
|
34 | exports.SmsSubscription = SmsSubscription;
|
35 | _a = JSII_RTTI_SYMBOL_1;
|
36 | SmsSubscription[_a] = { fqn: "@aws-cdk/aws-sns-subscriptions.SmsSubscription", version: "1.204.0" };
|
37 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic21zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBLHdDQUF3QztBQVN4Qzs7R0FFRztBQUNILE1BQWEsZUFBZTtJQUMxQixZQUE2QixXQUFtQixFQUFtQixRQUE4QixFQUFFO1FBQXRFLGdCQUFXLEdBQVgsV0FBVyxDQUFRO1FBQW1CLFVBQUssR0FBTCxLQUFLLENBQTJCOzs7Ozs7K0NBRHhGL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