Package com.azure.compute.batch.models
Class BatchPoolEnableAutoScaleContent
java.lang.Object
com.azure.compute.batch.models.BatchPoolEnableAutoScaleContent
- All Implemented Interfaces:
com.azure.json.JsonSerializable<BatchPoolEnableAutoScaleContent>
public final class BatchPoolEnableAutoScaleContent
extends Object
implements com.azure.json.JsonSerializable<BatchPoolEnableAutoScaleContent>
Parameters for enabling automatic scaling on an Azure Batch Pool.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of BatchPoolEnableAutoScaleContent class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of BatchPoolEnableAutoScaleContent from the JsonReader.Get the autoScaleEvaluationInterval property: The time interval at which to automatically adjust the Pool size according to the autoscale formula.Get the autoScaleFormula property: The formula for the desired number of Compute Nodes in the Pool.setAutoScaleEvaluationInterval
(Duration autoScaleEvaluationInterval) Set the autoScaleEvaluationInterval property: The time interval at which to automatically adjust the Pool size according to the autoscale formula.setAutoScaleFormula
(String autoScaleFormula) Set the autoScaleFormula property: The formula for the desired number of Compute Nodes in the Pool.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
BatchPoolEnableAutoScaleContent
public BatchPoolEnableAutoScaleContent()Creates an instance of BatchPoolEnableAutoScaleContent class.
-
-
Method Details
-
getAutoScaleFormula
Get the autoScaleFormula property: The formula for the desired number of Compute Nodes in the Pool. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If you specify a new interval, then the existing autoscale evaluation schedule will be stopped and a new autoscale evaluation schedule will be started, with its starting time being the time when this request was issued.- Returns:
- the autoScaleFormula value.
-
setAutoScaleFormula
Set the autoScaleFormula property: The formula for the desired number of Compute Nodes in the Pool. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If you specify a new interval, then the existing autoscale evaluation schedule will be stopped and a new autoscale evaluation schedule will be started, with its starting time being the time when this request was issued.- Parameters:
autoScaleFormula
- the autoScaleFormula value to set.- Returns:
- the BatchPoolEnableAutoScaleContent object itself.
-
getAutoScaleEvaluationInterval
Get the autoScaleEvaluationInterval property: The time interval at which to automatically adjust the Pool size according to the autoscale formula. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If you specify a new interval, then the existing autoscale evaluation schedule will be stopped and a new autoscale evaluation schedule will be started, with its starting time being the time when this request was issued.- Returns:
- the autoScaleEvaluationInterval value.
-
setAutoScaleEvaluationInterval
public BatchPoolEnableAutoScaleContent setAutoScaleEvaluationInterval(Duration autoScaleEvaluationInterval) Set the autoScaleEvaluationInterval property: The time interval at which to automatically adjust the Pool size according to the autoscale formula. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If you specify a new interval, then the existing autoscale evaluation schedule will be stopped and a new autoscale evaluation schedule will be started, with its starting time being the time when this request was issued.- Parameters:
autoScaleEvaluationInterval
- the autoScaleEvaluationInterval value to set.- Returns:
- the BatchPoolEnableAutoScaleContent object itself.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<BatchPoolEnableAutoScaleContent>
- Throws:
IOException
-
fromJson
public static BatchPoolEnableAutoScaleContent fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of BatchPoolEnableAutoScaleContent from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of BatchPoolEnableAutoScaleContent if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException
- If an error occurs while reading the BatchPoolEnableAutoScaleContent.
-