private void validateEndpoints(List<Endpoint> endpoints) {
        var regions = prodRegions();
        for (var endpoint : endpoints){
            for (var endpointRegion : endpoint.regions()) {
                if (! regions.contains(endpointRegion)) {
                    throw new IllegalArgumentException("Region used in endpoint that is not declared in 'prod': " + endpointRegion);
                }
            }
        }
    }
Throw an IllegalArgumentException if an endpoint refers to a region that is not declared in 'prod'
config-model-api/src/main/java/com/yahoo/config/application/api/DeploymentInstanceSpec.java