@aws-lite/sns
Maintained by: @architect
Install
npm i @aws-lite/sns
Optionally install types:
npm i -D @aws-lite/sns-types
Methods
Publish
Properties
Message(string) [required]-
Message payload to send
MessageAttributes(string)-
String to MessageAttributeValue object map
MessageDeduplicationId(string)-
Ensures request is idempotent; may only be used for FIFO topics
MessageGroupId(string)-
Tag specifying a specific message group; may only be used for FIFO topics
MessageStructure(string)-
May be set to
jsonpublish JSON payloads PhoneNumber(string)-
SMS recipient phone number in E.164 format; if not specified, you must specify
TargetArnorTargetArn Subject(string)-
Email subject line
TargetArn(string)-
If not specified, you must specify
PhoneNumberorTopicArn TopicArn(string)-
ARN of the the topic to publish to; if not specified, you must specify
PhoneNumberorTargetArn
Example
await aws.SNS.Publish({
Message: String, // required
MessageAttributes: String,
MessageDeduplicationId: String,
MessageGroupId: String,
MessageStructure: String,
PhoneNumber: String,
Subject: String,
TargetArn: String,
TopicArn: String,
})
Methods yet to be implemented
Please help out by opening a PR!
AddPermissionCheckIfPhoneNumberIsOptedOutConfirmSubscriptionCreatePlatformApplicationCreatePlatformEndpointCreateSMSSandboxPhoneNumberCreateTopicDeleteEndpointDeletePlatformApplicationDeleteSMSSandboxPhoneNumberDeleteTopicGetDataProtectionPolicyGetEndpointAttributesGetPlatformApplicationAttributesGetSMSAttributesGetSMSSandboxAccountStatusGetSubscriptionAttributesGetTopicAttributesListEndpointsByPlatformApplicationListOriginationNumbersListPhoneNumbersOptedOutListPlatformApplicationsListSMSSandboxPhoneNumbersListSubscriptionsListSubscriptionsByTopicListTagsForResourceListTopicsOptInPhoneNumberPublishBatchPutDataProtectionPolicyRemovePermissionSetEndpointAttributesSetPlatformApplicationAttributesSetSMSAttributesSetSubscriptionAttributesSetTopicAttributesSubscribeTagResourceUnsubscribeUntagResourceVerifySMSSandboxPhoneNumber