public void setServiceRunnableInstances(String appId, String serviceId, String runnableId, int instances)
throws IOException, NotFoundException, UnAuthorizedAccessTokenException {
URL url = config.resolveURL(String.format("apps/%s/services/%s/runnables/%s/instances",
appId, serviceId, runnableId));
HttpRequest request = HttpRequest.put(url).withBody(GSON.toJson(new Instances(instances))).build();
HttpResponse response = restClient.execute(request, config.getAccessToken(), HttpURLConnection.HTTP_NOT_FOUND);
if (response.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND) {
throw new NotFoundException("application or service or runnable", appId + "/" + serviceId + "/" + runnableId);
}