@@ -277,7 +277,7 @@ def def_mw_tasks(params: dict, window_id_response: dict, window_target_response:
277
277
window1_ids = []
278
278
window2_ids = []
279
279
window3_ids = []
280
- for response in window_id_response [' window1_ids' ]:
280
+ for response in window_id_response [" window1_ids" ]:
281
281
LOGGER .info (f"Maintenance Window Tasks in { response ['region' ]} " )
282
282
LOGGER .info (response )
283
283
ssmclient = session .client ("ssm" , region_name = response ["region" ], config = boto3_config )
@@ -288,7 +288,7 @@ def def_mw_tasks(params: dict, window_id_response: dict, window_target_response:
288
288
task_operation = params .get ("TASK1_OPERATION" , "Scan" )
289
289
task_rebootoption = params .get ("TASK1_REBOOTOPTION" , "NoReboot" )
290
290
291
- for response2 in window_target_response [' window1_targets' ]:
291
+ for response2 in window_target_response [" window1_targets" ]:
292
292
LOGGER .info (response2 )
293
293
if (
294
294
response2 ["region" ] == response ["region" ]
@@ -332,7 +332,7 @@ def def_mw_tasks(params: dict, window_id_response: dict, window_target_response:
332
332
"account_id" : account_id ,
333
333
}
334
334
)
335
- for response in window_id_response [' window2_ids' ]:
335
+ for response in window_id_response [" window2_ids" ]:
336
336
LOGGER .info (f"Maintenance Window Tasks in { response ['region' ]} " )
337
337
LOGGER .info (response )
338
338
ssmclient = session .client ("ssm" , region_name = response ["region" ], config = boto3_config )
@@ -343,7 +343,7 @@ def def_mw_tasks(params: dict, window_id_response: dict, window_target_response:
343
343
task_operation = params .get ("TASK2_OPERATION" , "Scan" )
344
344
task_rebootoption = params .get ("TASK2_REBOOTOPTION" , "NoReboot" )
345
345
346
- for response2 in window_target_response [' window2_targets' ]:
346
+ for response2 in window_target_response [" window2_targets" ]:
347
347
LOGGER .info (response2 )
348
348
if (
349
349
response2 ["region" ] == response ["region" ]
@@ -387,7 +387,7 @@ def def_mw_tasks(params: dict, window_id_response: dict, window_target_response:
387
387
"account_id" : account_id ,
388
388
}
389
389
)
390
- for response in window_id_response [' window3_ids' ]:
390
+ for response in window_id_response [" window3_ids" ]:
391
391
LOGGER .info (f"Maintenance Window Tasks in { response ['region' ]} " )
392
392
LOGGER .info (response )
393
393
ssmclient = session .client ("ssm" , region_name = response ["region" ], config = boto3_config )
@@ -398,7 +398,7 @@ def def_mw_tasks(params: dict, window_id_response: dict, window_target_response:
398
398
task_operation = params .get ("TASK3_OPERATION" , "Scan" )
399
399
task_rebootoption = params .get ("TASK3_REBOOTOPTION" , "NoReboot" )
400
400
401
- for response2 in window_target_response [' window3_targets' ]:
401
+ for response2 in window_target_response [" window3_targets" ]:
402
402
LOGGER .info (response2 )
403
403
if (
404
404
response2 ["region" ] == response ["region" ]
@@ -697,11 +697,8 @@ def process_create_update_event(params: dict, regions: list) -> Dict:
697
697
all_window_ids .append (window_ids_raw ["window2_ids" ])
698
698
all_window_ids .append (window_ids_raw ["window3_ids" ])
699
699
window_target_response = define_mw_targets (
700
- params ,
701
- window_ids_raw ["window1_ids" ],
702
- window_ids_raw ["window2_ids" ],
703
- window_ids_raw ["window3_ids" ],
704
- account_id )
700
+ params , window_ids_raw ["window1_ids" ], window_ids_raw ["window2_ids" ], window_ids_raw ["window3_ids" ], account_id
701
+ )
705
702
all_window_targets .append (window_target_response )
706
703
all_window_tasks .append (def_mw_tasks (params , window_ids_raw , window_target_response , account_id ))
707
704
return {"window_ids" : all_window_ids , "window_targets" : all_window_targets , "window_tasks" : all_window_tasks }
0 commit comments