MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / lambda_handler

Function lambda_handler

examples/complete_user_report.py:46–66  ·  view source on GitHub ↗
(event, context)

Source from the content-addressed store, hash-verified

44
45
46def lambda_handler(event, context):
47 params = get_params()
48 api.login(params)
49 if not params.session_token:
50 return {
51 'statusCode': 401,
52 'headers': {'Content-Type': 'text/plain'},
53 'body': 'Not Connected',
54 }
55
56 if not params.enterprise:
57 return {
58 'statusCode': 401,
59 'headers': {'Content-Type': 'text/plain'},
60 'body': 'Not enterprise administrator',
61 }
62 return {
63 'statusCode': 200,
64 'headers': {'Content-Type': 'application/json'},
65 'body': create_user_report(params),
66 }
67
68
69# Get required Commander parameters from environment variables

Callers

nothing calls this directly

Calls 3

create_user_reportFunction · 0.85
get_paramsFunction · 0.70
loginMethod · 0.45

Tested by

no test coverage detected