def ModifyInstance(r, instance, **kwargs):
    """
    Modifies an instance.

    More details for parameters can be found in the RAPI documentation.

    @type instance: string
    @param instance: Instance name
    @rtype: int
    @return: job id
    """
    return r.request('put', '/2/instances/%s/modify' % instance, content=kwargs
        )
