def delete_slot_types()

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


def delete_slot_types(bot_name, slot_types):
    """
    Delete slot types. (Not used)
    :param bot_name: Name of bot
    :param slot_types: Set/List of slot type names to be deleted
    :return: None
    """
    for slot_type in slot_types:
        try:
            lex_client.delete_slot_type(name=slot_type)
        except lex_client.exceptions.ConflictException:
            time.sleep(SLEEP_TIME)
            lex_client.delete_slot_type(name=slot_type)
        logger.info("Deleted slot type %s of bot %s", slot_type, bot_name)