@@ -698,6 +698,15 @@ private HttpResponse put(
698698 return executeRequest (hostToUri , type , body , Method .PUT , Optional .empty ());
699699 }
700700
701+ private HttpResponse put (
702+ Function <String , String > hostToUri ,
703+ String type ,
704+ Optional <?> body ,
705+ Map <String , Object > queryParams
706+ ) {
707+ return executeRequest (hostToUri , type , body , Method .PUT , Optional .of (queryParams ));
708+ }
709+
701710 private <T > Optional <T > post (
702711 Function <String , String > hostToUri ,
703712 String type ,
@@ -1038,13 +1047,25 @@ public void unpauseSingularityRequest(
10381047 public void scaleSingularityRequest (
10391048 String requestId ,
10401049 SingularityScaleRequest scaleRequest
1050+ ) {
1051+ scaleSingularityRequest (requestId , scaleRequest , Optional .empty ());
1052+ }
1053+
1054+ public void scaleSingularityRequest (
1055+ String requestId ,
1056+ SingularityScaleRequest scaleRequest ,
1057+ Optional <Boolean > largeScaleDownAcknowledged
10411058 ) {
10421059 final Function <String , String > requestUri = host ->
10431060 String .format (REQUEST_SCALE_FORMAT , getApiBase (host ), requestId );
10441061 put (
10451062 requestUri ,
10461063 String .format ("Scale of Request %s" , requestId ),
1047- Optional .of (scaleRequest )
1064+ Optional .of (scaleRequest ),
1065+ Collections .singletonMap (
1066+ "largeScaleDownAcknowledged" ,
1067+ largeScaleDownAcknowledged .orElse (false )
1068+ )
10481069 );
10491070 }
10501071
0 commit comments