def METHOD_NAME(id, config):
    """
    Update the specified app with the given configuration.
    CLI Example:
    .. code-block:: bash
        salt marathon-minion-id marathon.update_app my-app '<config yaml>'
    """
    if "id" not in config:
        config["id"] = id
    config.pop("version", None)
    # mirror marathon-ui handling for uris deprecation (see
    # mesosphere/marathon-ui#594 for more details)
    config.pop("fetch", None)
    data = salt.utils.json.dumps(config)
    try:
        response = salt.utils.http.query(
            "{}/v2/apps/{}?force=true".format(_base_url(), id),
            method="PUT",
            decode_type="json",
            decode=True,
            data=data,
            header_dict={
                "Content-Type": "application/json",
                "Accept": "application/json",
            },
        )
        log.debug("update response: %s", response)
        return response["dict"]
    except Exception as ex:  # pylint: disable=broad-except
        log.error("unable to update marathon app: %s", get_error_message(ex))
        return {"exception": {"message": get_error_message(ex)}}