如何从AWS Health事件中获取受影响的实体?

时间:2018-06-20 21:02:10

标签: amazon-web-services amazon-cloudwatch

我有一个lambda函数订阅了健康事件: https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/EventTypes.html#health-event-types

示例事件:

{
  "version": "0",
  "id": "7bf73129-1428-4cd3-a780-95db273d1602",
  "detail-type": "AWS Health Event",
  "source": "aws.health",
  "account": "123456789012",
  "time": "2016-06-05T06:27:57Z",
  "region": "region",
  "resources": [],
  "detail": {
    "eventArn": "arn:aws:health:region::event/id",
    "service": "service",
    "eventTypeCode": "AWS_service_code",
    "eventTypeCategory": "category",
    "startTime": "Sun, 05 Jun 2016 05:01:10 GMT",
    "endTime": "Sun, 05 Jun 2016 05:30:57 GMT",
    "eventDescription": [{
     "language": "lang-code",
     "latestDescription": "description"
    }]
 }
}

如果我获得事件类型代码为AWS_EC2_INSTANCE_RETIREMENT_SCHEDULED,那么我如何知道哪个实例受此影响?

有什么办法可以从该事件中获得受影响的实体

0 个答案:

没有答案