Gets information about instances on the cluster.

    @type bulk: bool
    @param bulk: whether to return all information about all instances

    @rtype: list of dict or list of str
    @return: if bulk is True, info about the instances, else a list of instances

def GetInstances(r, bulk=False):
    """
    Gets information about instances on the cluster.

    @type bulk: bool
    @param bulk: whether to return all information about all instances

    @rtype: list of dict or list of str
    @return: if bulk is True, info about the instances, else a list of instances
    """

    if bulk:
        return r.request("get", "/2/instances", query={"bulk": 1})
    else:
        instances = r.request("get", "/2/instances")
        return r.applier(itemgetters("id"), instances)