'Retrieve all the available service types.
:param region: Optional region to retrieve service types for.
:type region: ``str``
:rtype: ``list`` of ``str``'

def get_service_types(self, region=None):

    service_types = set()
    for entry in self._entries:
        include = True
        for endpoint in entry.endpoints:
            if (region and (endpoint.region != region)):
                include = False
                break
        if include:
            service_types.add(entry.service_type)
    return sorted(list(service_types))
