@Override public Region getRegionByEndpoint(String endpoint) { String host = getHost(endpoint); for (Region region : getRegions()) { for (String serviceEndpoint : region.getAvailableEndpoints()) { if (host.equals(getHost(serviceEndpoint))) { return region; } } } throw new IllegalArgumentException( "No region found with any service for endpoint " + endpoint); }
@Override public Region getRegionByEndpoint(String endpoint) { String host = getHost(endpoint); for (Region region : getRegions()) { for (String serviceEndpoint : region.getAvailableEndpoints()) { if (host.equals(getHost(serviceEndpoint))) { return region; } } } throw new IllegalArgumentException( "No region found with any service for endpoint " + endpoint); }
@Override public Region getRegionByEndpoint(String endpoint) { String host = getHost(endpoint); for (Region region : getRegions()) { for (String serviceEndpoint : region.getAvailableEndpoints()) { if (host.equals(getHost(serviceEndpoint))) { return region; } } } throw new IllegalArgumentException( "No region found with any service for endpoint " + endpoint); }