def add_account(account_info): if account_info['accountNum'].isdigit() and len( account_info['accountNum']) == 12: aws_accounts = AwsAccounts() return {"response": aws_accounts.add(account_info)}, 200 else: return {"response:": "Incorrect account number given"}, 500
def add_account(account_info): """ Add an acount to the AWS accounts table :param account_info: AWS account metadata - id, alias, owner, etc """ if account_info['accountNum'].isdigit() and len(account_info['accountNum']) == 12: aws_accounts = AwsAccounts() return {"response": aws_accounts.add(account_info)}, 200 return {"response:": "Incorrect account number given"}, 500