class SmsSubscription
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.SNS.Subscriptions.SmsSubscription |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awssnssubscriptions#SmsSubscription |
Java | software.amazon.awscdk.services.sns.subscriptions.SmsSubscription |
Python | aws_cdk.aws_sns_subscriptions.SmsSubscription |
TypeScript (source) | aws-cdk-lib » aws_sns_subscriptions » SmsSubscription |
Implements
ITopic
Use an sms address as a subscription target.
Example
const myTopic = new sns.Topic(this, 'Topic');
myTopic.addSubscription(new subscriptions.SmsSubscription('+15551231234'));
Initializer
new SmsSubscription(phoneNumber: string, props?: SmsSubscriptionProps)
Parameters
- phoneNumber
string - props
SmsSubscription Props
Methods
| Name | Description |
|---|---|
| bind(_topic) | Returns a configuration used to subscribe to an SNS topic. |
bind(_topic)
public bind(_topic: ITopic): TopicSubscriptionConfig
Parameters
- _topic
ITopic
Returns
Returns a configuration used to subscribe to an SNS topic.

.NET
Go
Java
Python
TypeScript (