def determine_perms()

in qs_cfn_lint_rules/IAMResourceWildcard.py [0:0]


def determine_perms():
    custom_dict_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data/granular_permissions.json")
    with open(custom_dict_path) as f:
        _gp = json.load(f)
    perms = {}
    for method_name, method_data in _gp.items():
        _r = set([f"{method_name.split(':')[0]}/{k}" for k in method_data['resource_types'].keys() if k != ''])
        if not _r:
            continue
        perms[method_name] = _r
    return perms