import importlib
import pkgutil


def list_resource_types(api):
    """List available resource types."""
    apimod = importlib.import_module(api)
    return sorted([
        modulename for _loader, modulename, _ispkg
        in pkgutil.iter_modules(apimod.__path__)
    ])