'Return a TargetInstance object based on a name and optional zone.
:param  name: The name of the target instance
:type   name: ``str``
:keyword  zone: The zone to search for the target instance in (set to
\'all\' to search all zones).
:type     zone: ``str`` or :class:`GCEZone` or ``None``
:return:  A TargetInstance object for the instance
:rtype:   :class:`GCETargetInstance`'

def ex_get_targetinstance(self, name, zone=None):

    zone = (self._set_zone(zone) or self._find_zone_or_region(name, 'targetInstances', res_name='TargetInstance'))
    request = ('/zones/%s/targetInstances/%s' % (zone.name, name))
    response = self.connection.request(request, method='GET').object
    return self._to_targetinstance(response)
