@@ -224,11 +224,12 @@ Resources:
224224 'TotalImpact': get_value_by_path(record, 'Impact/TotalImpact'),
225225 'TotalImpactpercentage': float(get_value_by_path(record, 'Impact/TotalImpactPercentage', 0.0)),
226226 'MonitorArn': get_value_by_path(record, 'MonitorArn'),
227- 'LinkedAccount': get_value_by_path(record, 'RootCauses/0/LinkedAccount'),
228- 'LinkedAccountName': get_value_by_path(record, 'RootCauses/0/LinkedAccountName'),
229- 'Region': get_value_by_path(record, 'RootCauses/0/Region'),
230- 'Service': get_value_by_path(record, 'RootCauses/0/Service'),
231- 'UsageType': get_value_by_path(record, 'RootCauses/0/UsageType')
227+ 'LinkedAccount': get_value_by_path(record, 'RootCauses/0/LinkedAccount'), # for backward compatibility
228+ 'LinkedAccountName': get_value_by_path(record, 'RootCauses/0/LinkedAccountName'), # for backward compatibility
229+ 'Region': get_value_by_path(record, 'RootCauses/0/Region'), # for backward compatibility
230+ 'Service': get_value_by_path(record, 'RootCauses/0/Service'), # for backward compatibility
231+ 'UsageType': get_value_by_path(record, 'RootCauses/0/UsageType'), # for backward compatibility
232+ 'RootCauses': get_value_by_path(record, 'RootCauses', []), # Store full array of root causes
232233 }
233234 logger.debug("Processing record complete")
234235 return result
0 commit comments