def extract_parameters_for_action_alias_db(
    action_alias_db, format_str, param_stream, match_multiple=False
):
    """
    Extract parameters from the user input based on the provided format string.

    Note: This function makes sure that the provided format string is indeed available in the
    action_alias_db.formats.
    """
    formats = []
    formats = action_alias_db.get_format_strings()

    if format_str not in formats:
        raise ValueError(
            'Format string "%s" is not available on the alias "%s"'
            % (format_str, action_alias_db.name)
        )

    result = extract_parameters(
        format_str=format_str, param_stream=param_stream, match_multiple=match_multiple
    )
    return result

    Extract parameters from the user input based on the provided format string.

    Note: This function makes sure that the provided format string is indeed available in the
    action_alias_db.formats.
    
st2common/st2common/models/utils/action_alias_utils.py