in frauddetector/frauddetector.py [0:0]
def delete_variables(self, variables):
"""Delete Amazon FraudDetector variables. Wraps the boto3 SDK API to allow bulk operations.
Args:
:variables: list of variable-names to delete
Returns:
:response_all: {variable_name: API-response-status, variable_name: API-response-status} dict
"""
response_all = []
for vname in variables:
response = self.fd.delete_variable(
name=vname,
)
lh.info("delete_variables: variable {} deleted".format(vname))
status = {vname: response['ResponseMetadata']['HTTPStatusCode']}
response_all.append(status)
# update myself
self.variables = self.fd.get_variables()
# convert list of dicts to single dict
response_all = {k: v for d in response_all for k, v in d.items()}
return response_all