From 5a96dd3aeb4f6fdd46db1676ed7b177799f5c9a8 Mon Sep 17 00:00:00 2001 From: GomathiselviS Date: Wed, 12 Oct 2022 13:38:47 -0400 Subject: [PATCH] Addressed review comments --- plugins/modules/cloudwatch_metric_alarm.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/modules/cloudwatch_metric_alarm.py b/plugins/modules/cloudwatch_metric_alarm.py index 854b3b2d9f8..5449a1daf94 100644 --- a/plugins/modules/cloudwatch_metric_alarm.py +++ b/plugins/modules/cloudwatch_metric_alarm.py @@ -473,9 +473,7 @@ def main(): params['OKActions'] = module.params.get('ok_actions', []) params['TreatMissingData'] = module.params.get('treat_missing_data') if module.params.get('metrics'): - params['Metrics'] = [] - for element in module.params.get('metrics'): - params['Metrics'].append(snake_dict_to_camel_dict(element, capitalize_first=True)) + params['Metrics'] = snake_dict_to_camel_dict(module.params['metrics'], capitalize_first=True) if module.params.get('extended_statistic'): params['ExtendedStatistic'] = module.params.get('extended_statistic')