Amazon Simple Notification Service AWSSDK C# - S.O.S(Amazon Simple Notification Service AWSSDK C# - S.O.S)
问题描述
我正在尝试使用 Amazon 的 AWSSDK for C# 和简单通知服务进行发布.
I am trying to publish with Amazon's AWSSDK for C# and the Simple Notification Service.
没有随 SDK 一起提供的示例,在 Google 搜索 2 小时后,我在网络上的任何地方都找不到示例.我想出了这个,但它抛出了一个异常,产生的信息不超过单个字符串TopicARN"-没有内部异常-nuffin!
如果有人使用 AWSSDK 通过 C# 成功发送了带有 SNS
的消息,我希望看到即使是最基本的工作示例.我正在使用最新的 SDK 1.5x
There are no samples that come with the SDK and there are no samples anywhere on the web I could find after 2 hours of Googling. I came up with this but it is throwing an exception that yields no more information than the single string, "TopicARN" - no inner exception - nuffin!
If anyone has successfully sent a message with SNS
via C# using the AWSSDK I would love to see even the most rudimentary working example. I am using the latest SDK 1.5x
代码如下:
推荐答案
这是一个创建主题、设置主题显示名称、订阅主题的电子邮件地址、发送消息和删除主题的示例.请注意,在继续之前,您应该在两个地方等待/检查您的电子邮件.Client
是客户端实例,topicName
是任意主题名称.
Here is a sample that creates a topic, sets a topic display name, subscribes an email address to the topic, sends a message and deletes the topic. Note that there are two spots where you should wait/check your email before continuing. Client
is the client instance, topicName
is an arbitrary topic name.
这篇关于Amazon Simple Notification Service AWSSDK C# - S.O.S的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!