OpenSearch Service 索引中的存档消息格式 - Amazon Simple Notification Service
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 Amazon Web Services 服务入门

OpenSearch Service 索引中的存档消息格式

以下示例显示了发送到名为 my-index 的 Amazon OpenSearch Service (OpenSearch Service) 索引的 Amazon SNS 通知。此索引在 Timestamp 字段中具有时间筛选字段。SNS 通知放置在负载的 _source 属性中。

注意

在此示例中,已发布消息的原始消息传输被禁用。禁用原始邮件传输时,Amazon SNS 会将 JSON 元数据添加到消息中,其中包括以下属性:

  • Type

  • MessageId

  • TopicArn

  • Subject

  • Timestamp

  • UnsubscribeURL

  • MessageAttributes

有关原始消息传输的更多信息,请参阅 Amazon SNS 原始消息传输

{ "_index": "my-index", "_type": "_doc", "_id": "49613100963111323203250405402193283794773886550985932802.0", "_version": 1, "_score": null, "_source": { "Type": "Notification", "MessageId": "bf32e294-46e3-5dd5-a6b3-bad65162e136", "TopicArn": "arn:aws:sns:us-east-1:111111111111:my-topic", "Subject": "Sample subject", "Message": "Sample message", "Timestamp": "2020-12-02T22:29:21.189Z", "UnsubscribeURL": "https://sns.us-east-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-east-1:111111111111:my-topic:b5aa9bc1-9c3d-452b-b402-aca2cefc63c9", "MessageAttributes": { "my_attribute": { "Type": "String", "Value": "my_value" } } }, "fields": { "Timestamp": [ "2020-12-02T22:29:21.189Z" ] }, "sort": [ 1606948161189 ] }