Publish message to AWS SNS
Send email and text notifications by publishing messages to Amazon’s Simple Notification Service.
PublishMessageToAWSSNS: function (_sOutboundTopicId, _oOptions)
+ _oOptions.Message:
+ _oOptions.Subject:
+ _oOptions.MessageDeduplicateionId:
+ _oOptions.MessageGroupId:
+ _oOptions.MessageAttributes:
++ _oMessageAttributes.DataType:
++ _oMessageAttributes.Value:
This utility doesn’t use a success or failure callback attribute in the request parameter.
Request parameter attributes
Attribute | Type | Description | Required |
---|---|---|---|
OutboundTopicID | string | The ID of the asset in the third-party application. | yes |
Options | object | The details of the message to send. | yes |
The Options
object uses the following attributes:
Attribute | Type | Description | Required |
---|---|---|---|
Message | string | The message to deliver to AWS SNS. | yes |
Subject | string | The subject of the message. | yes |
MessageDeduplicationId | string | The message deduplication ID. | no |
MessageGroupId | string | The message group ID. | no |
MessageAttributes | object | This object uses two properties:
| no |
Response Parameter
A string representing a serialized response from AWS SNS.
Structure
{
"Response": {
"Message": "The message is published to AWS SNS”
},
"HTTPCode": -1,
"Code": <SUCCESS | FAIL>
}
Example
Utils.PublishMessageToAWSSNS("2Y8TWAFUAIL", {
Message: "This is a test message",
Subject: "This is a test subject",
MessageAttributes: {
"key1": {
DataType: "String",
Value: "value1"
},
"key2": {
DataType: "Number",
Value: 1
},
"key3": {
DataType: "String.Array",
Value: ["value3","value4"]
},
"key4": {
DataType: "Binary",
Value: "value3"
}
}
});
Updated 13 days ago