r 使用AWS简单通知服务

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了r 使用AWS简单通知服务相关的知识,希望对你有一定的参考价值。

library(aws.sns)

Sys.setenv("AWS_ACCESS_KEY_ID" = ,
           "AWS_SECRET_ACCESS_KEY" = ,
           "AWS_DEFAULT_REGION" = "eu-central-1")

topic <- create_topic(name = "TestTopic")
set_topic_attrs(topic, attribute = c(DisplayName = "Publicly visible topic name"))

subscribe(topic, "carlos@herobalancer.nl", protocol = "email")

publish(topic = topic, message = "The timestamp is stopped", subject = "Failure")

###

failstamp <- create_topic(name = "timestamp_spanbroek_failure")
set_topic_attrs(failstamp, attribute = c(DisplayName = "Failure in Spanbroek recording"))
# subscribe(failstamp, "sjoerd@herobalancer.nl", protocol = "email")


publish(topic = failstamp, message = "According with this test script, the timestamp of the data retrieved from kropman hasn't changed in the last hour, or consists just in NA's. 
        Perhaps something is wrong.",
        subject = "The timestamp has stopped")

以上是关于r 使用AWS简单通知服务的主要内容,如果未能解决你的问题,请参考以下文章

如何使用单个 AWS 简单通知服务 ARN 来定位 APN 和 FCM

设置 AWS SNS 以向 iOS 设备发送推送通知

适用于 Web 应用程序的 AWS 推送通知服务

用于 Apple 推送通知 AWS-SNS 或 Heroku 的更好的服务器是啥?

AWS 推送通知服务集成错误

在 AWS Redshift 中插入行的简单通知