def METHOD_NAME(request):
    data = json.loads(request.body)
    action_id = data["action"]
    resources = data.get("resources", [])
    subject = Subject("user", request.user.username)
    action = Action(action_id)
    resource = [Resource(r["system"], r["type"], str(r["id"]), r["attributes"]) for r in resources]
    iam = get_iam_client()
    try:
        METHOD_NAME = iam.is_allowed(Request(conf.SYSTEM_ID, subject, action, resource, None))
    except (AuthInvalidRequest, AuthAPIError) as e:
        return standard_response(False, str(e))
    return standard_response(True, "success", {"is_allow": METHOD_NAME})