def check_required_properties()

in functions/source/kendra_custom_resource/kendra_custom_resource.py [0:0]


def check_required_properties(dictionary, key):
    """
    Check if a key is present in dictionary,
    otherwise raise KeyError stating "key is a required property"
    :param dictionary: Dictionary
    :param key: Key
    :return: None or KeyError
    """
    if key not in dictionary:
        raise KeyError(key + " is a required property")