监控计划查询
对于您指定用于发送电子邮件通知的 Amazon SNS 主题,请使用查询编辑器 v2 创建 Amazon SNS 主题,方法是导航到 SNS 通知部分,开启监控,然后使用创建 SNS 主题来创建主题。查询编辑器 v2 创建 Amazon SNS 主题,并将服务主体添加到 Amazon EventBridge 的访问策略中。以下是在 Amazon SNS 主题中创建的示例访问策略。在示例中,使用了 Amazon Web Services 区域 us-west-2
、Amazon Web Services 账户 123456789012
以及 Amazon SNS 主题 select-version-pdx-testunload
。
{ "Version": "2008-10-17", "Id": "__default_policy_ID", "Statement": [ { "Sid": "Allow_Publish_Events", "Effect": "Allow", "Principal": { "Service": "events.amazonaws.com" }, "Action": "sns:Publish", "Resource": "arn:aws:sns:
us-west-2
:123456789012
:select-version-pdx-testunload
" } ] }
计划查询运行时,Amazon SNS 会发送 Amazon 通知电子邮件。以下示例显示了使用 Amazon SNS 通知主题 may25a-SNS
,为 Amazon Web Services 账户 123456789012
中在 Amazon Web Services 区域 eu-north-1
上运行的计划查询 QS2-may25a
发送到 myemail@example.com
的电子邮件。
{"version":"0","id":"8e4323ec-5258-7138-181b-91290e30ff9b","detail-type":"Scheduled Event","source":"aws.events","account":"123456789012
","time":"2023-05-25T15:22:00Z",
"region":"eu-north-1
","resources":["arn:aws:events:eu-north-1
:123456789012
:rule/QS2-may25a
"],"detail":{}}
--
If you wish to stop receiving notifications from this topic, please click or visit the link below to unsubscribe:
https://sns.eu-north-1
.amazonaws.com/unsubscribe.html?SubscriptionArn=arn:aws:sns:eu-north-1
:123456789012
:may25a-SNS
:0c1a3d05-39c2-4507-bc3d-47250513d7b0&Endpoint=myemail@example.com
Please do not reply directly to this email. If you have any questions or comments regarding this email, please contact us at https://aws.amazon.com/support