module RubyAemAws::SNSTopic
Mixin for interaction with AWS SNS
Public Instance Methods
publish(topicarn, message)
click to toggle source
@param topicarn the ARN of the SNS Topix to publish the message @param message the SNS Message to publish @return Message ID
# File lib/ruby_aem_aws/client/sns_topic.rb, line 21 def publish(topicarn, message) client = Aws::SNS::Topic.new(topicarn) sns_message = { subject: 'Publish', message: message, message_structure: 'json' } publish = client.publish(sns_message) publish.message_id end