in source/get-tags-lambda.py [0:0]
def get_Mappings(accountId, accountName,accountEmail,date,dateTime,regions):
logger.info("Generate an Input list of JSON objects that will be passed to the StateMachine")
resourceTypes = list(os.environ[("ResourceTypes")].split(","))
finalMap={}
finalMap['resources'] = []
for resourceType in resourceTypes:
for region in regions:
finalMap['resources'].append({"ResourceType": resourceType,
"Region": region,
"AccountId": accountId,
"AccountName": accountName,
"AccountEmail": accountEmail,
"Date": date,
"DateTime": dateTime})
logger.info(sanitize_json({"ResourceType": resourceType,
"Region": region,
"AccountId": accountId,
"AccountName": accountName,
"AccountEmail": accountEmail,
"Date": date,
"DateTime": dateTime}))
return finalMap