You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with s3_uploader(f'{module_name}/{module_name}-resiliency_policy/payer_id={payer_id}/account_id={account_id}/region_code={region}/{policy_id}.json') as write_policy:
301
263
write_policy(policy_response['policy'])
302
264
303
265
except Exception as e: #pylint: disable=broad-exception-caught
with s3_uploader(f'{module_name}/{module_name}-app_component_recommendations_latest/payer_id={payer_id}/account_id={account_id}/region_code={region}/app_id={app_id}/latest.json') as write:
323
282
for rec in paginate(resilience_client.list_app_component_recommendations, 'componentRecommendations', assessmentArn=latest_assessment['assessmentArn']):
324
283
rec['assessment_arn'] = assessment_arn
325
-
print(f'Record Value Test {rec}')
326
284
write(rec)
327
285
328
286
with s3_uploader(f'{module_name}/{module_name}-alarm_recommendations_latest/payer_id={payer_id}/account_id={account_id}/region_code={region}/app_id={app_id}/latest.json') as write:
329
-
total = outstanding = excluded = 0
330
287
for rec in paginate(resilience_client.list_alarm_recommendations, 'alarmRecommendations', assessmentArn=latest_assessment['assessmentArn']):
331
-
status = rec.get('recommendationStatus', '') # 'recommendationStatus': 'Implemented'|'Inactive'|'NotImplemented'|'Excluded',
332
-
total += 1
333
-
if status == 'NotImplemented':
334
-
outstanding += 1
335
-
elif status == 'Excluded':
336
-
excluded += 1
337
288
rec['assessment_arn'] = assessment_arn
338
289
write(rec)
339
-
app_data['alarms_total'] = str(total)
340
-
app_data['alarms_outstanding'] = str(outstanding)
341
-
app_data['alarms_excluded'] = str(excluded)
342
290
343
291
with s3_uploader(f'{module_name}/{module_name}-sop_recommendations_latest/payer_id={payer_id}/account_id={account_id}/region_code={region}/app_id={app_id}/latest.json') as write:
344
-
total = outstanding = excluded = 0
345
292
for rec in paginate(resilience_client.list_sop_recommendations, 'sopRecommendations', assessmentArn=latest_assessment['assessmentArn']):
346
-
status = rec.get('recommendationStatus', '') # 'recommendationStatus': 'Implemented'|'Inactive'|'NotImplemented'|'Excluded',
347
-
total += 1
348
-
if status == 'NotImplemented':
349
-
outstanding += 1
350
-
elif status == 'Excluded':
351
-
excluded += 1
352
293
rec['assessment_arn'] = assessment_arn
353
294
write(rec)
354
-
app_data['sops_total'] = str(total)
355
-
app_data['sops_outstanding'] = str(outstanding)
356
-
app_data['sops_excluded'] = str(excluded)
357
295
358
296
with s3_uploader(f'{module_name}/{module_name}-test_recommendations_latest/payer_id={payer_id}/account_id={account_id}/region_code={region}/app_id={app_id}/latest.json') as write:
359
-
total = outstanding = excluded = 0
360
297
for rec in paginate(resilience_client.list_test_recommendations, 'testRecommendations', assessmentArn=latest_assessment['assessmentArn']):
with s3_uploader(f'{module_name}/{module_name}-compliance_drifts_latest/payer_id={payer_id}/account_id={account_id}/region_code={region}/app_id={app_id}/latest.json') as write:
376
-
app_component_drifts = 0
377
302
for rec in paginate(resilience_client.list_app_assessment_compliance_drifts, 'complianceDrifts', assessmentArn=latest_assessment['assessmentArn']):
with s3_uploader(f'{module_name}/{module_name}-app_assessment_latest/payer_id={payer_id}/account_id={account_id}/region_code={region}/app_id={app_id}/latest.json') as write:
@@ -394,9 +315,6 @@ Resources:
394
315
rec['app_arn'] = app_arn
395
316
write(rec)
396
317
397
-
398
-
with s3_uploader(f'{module_name}/{module_name}-applications/payer_id={payer_id}/account={account_id}/{region}-{app_id}.json') as write_app:
399
-
write_app(app_data)
400
318
with s3_uploader(f'{module_name}/{module_name}-application-details/payer_id={payer_id}/account_id={account_id}/{region}-{app_id}.json') as write_app:
0 commit comments