amazon-cloudwatch - 如何在 Cloudwatch 中屏蔽 AWS SNS SMS 传递状态日志中的数据
问题描述
我已经为 SNS 中的 SMS 消息设置了传递状态日志记录,它目前打印出云到 cloudwatch,如下所示:
{
"notification": {
"messageId": "0a90c123-7cf8-443f-bd1b-f3fd7e82d28c",
"timestamp": "2021-04-01 00:45:03.606"
},
"delivery": {
"phoneCarrier": "some random phone carrier",
"mnc": 2,
"numberOfMessageParts": 1,
"destination": "+01234567890",
"priceInUSD": 0.0345,
"smsType": "Transactional",
"mcc": 505,
"providerResponse": "Unknown error attempting to reach phone",
"dwellTimeMs": 276,
"dwellTimeMsUntilDeviceAck": 5921
},
"status": "FAILURE"
}
有没有办法可以屏蔽某些字段,例如手机号码,使其显示如下:
{
"notification": {
"messageId": "0a90c123-7cf8-443f-bd1b-f3fd7e82d28c",
"timestamp": "2021-04-01 00:45:03.606"
},
"delivery": {
"phoneCarrier": "some random phone carrier",
"mnc": 2,
"numberOfMessageParts": 1,
"destination": "*********890",
"priceInUSD": 0.0345,
"smsType": "Transactional",
"mcc": 505,
"providerResponse": "Unknown error attempting to reach phone",
"dwellTimeMs": 276,
"dwellTimeMsUntilDeviceAck": 5921
},
"status": "FAILURE"
}
解决方案
推荐阅读
- ruby-on-rails - 为什么 Auth0 会重置 Rails 会话?
- cplex - Cplex:如何为指定字符串编写约束
- java - HashMap在添加值后返回null
- javascript - 每当我导航到不同的 Vue.js 路由时,我都会被发送到导航到的视图的底部,我不知道为什么
- r - 使用 httr (在 R 上)到 webHDFS 的空主体 PUT
- asp.net -
在 Visual Studio 本地运行但不能在 IIS 上运行时可以工作吗? - java - onSave-/onRestoreInstanceState 不起作用
- antlr4 - 如何使用 ANTLR4 解析嵌套的源文件 - 再试一次
- mysql - 尝试对多个 localhost WordPress 站点使用相同的用户名和密码
- jquery - 过滤后下拉框值的JQuery高度未调整