Package com.azure.compute.batch.models
Class BatchPoolResizeContent
java.lang.Object
com.azure.compute.batch.models.BatchPoolResizeContent
- All Implemented Interfaces:
com.azure.json.JsonSerializable<BatchPoolResizeContent>
public final class BatchPoolResizeContent
extends Object
implements com.azure.json.JsonSerializable<BatchPoolResizeContent>
Parameters for changing the size of an Azure Batch Pool.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of BatchPoolResizeContent class. -
Method Summary
Modifier and TypeMethodDescriptionstatic BatchPoolResizeContentfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of BatchPoolResizeContent from the JsonReader.Get the nodeDeallocationOption property: Determines what to do with a Compute Node and its running task(s) if the Pool size is decreasing.Get the resizeTimeout property: The timeout for allocation of Nodes to the Pool or removal of Compute Nodes from the Pool.Get the targetDedicatedNodes property: The desired number of dedicated Compute Nodes in the Pool.Get the targetLowPriorityNodes property: The desired number of Spot/Low-priority Compute Nodes in the Pool.setNodeDeallocationOption(BatchNodeDeallocationOption nodeDeallocationOption) Set the nodeDeallocationOption property: Determines what to do with a Compute Node and its running task(s) if the Pool size is decreasing.setResizeTimeout(Duration resizeTimeout) Set the resizeTimeout property: The timeout for allocation of Nodes to the Pool or removal of Compute Nodes from the Pool.setTargetDedicatedNodes(Integer targetDedicatedNodes) Set the targetDedicatedNodes property: The desired number of dedicated Compute Nodes in the Pool.setTargetLowPriorityNodes(Integer targetLowPriorityNodes) Set the targetLowPriorityNodes property: The desired number of Spot/Low-priority Compute Nodes in the Pool.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
BatchPoolResizeContent
public BatchPoolResizeContent()Creates an instance of BatchPoolResizeContent class.
-
-
Method Details
-
getTargetDedicatedNodes
Get the targetDedicatedNodes property: The desired number of dedicated Compute Nodes in the Pool.- Returns:
- the targetDedicatedNodes value.
-
setTargetDedicatedNodes
Set the targetDedicatedNodes property: The desired number of dedicated Compute Nodes in the Pool.- Parameters:
targetDedicatedNodes- the targetDedicatedNodes value to set.- Returns:
- the BatchPoolResizeContent object itself.
-
getTargetLowPriorityNodes
Get the targetLowPriorityNodes property: The desired number of Spot/Low-priority Compute Nodes in the Pool.- Returns:
- the targetLowPriorityNodes value.
-
setTargetLowPriorityNodes
Set the targetLowPriorityNodes property: The desired number of Spot/Low-priority Compute Nodes in the Pool.- Parameters:
targetLowPriorityNodes- the targetLowPriorityNodes value to set.- Returns:
- the BatchPoolResizeContent object itself.
-
getResizeTimeout
Get the resizeTimeout property: The timeout for allocation of Nodes to the Pool or removal of Compute Nodes from the Pool. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).- Returns:
- the resizeTimeout value.
-
setResizeTimeout
Set the resizeTimeout property: The timeout for allocation of Nodes to the Pool or removal of Compute Nodes from the Pool. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).- Parameters:
resizeTimeout- the resizeTimeout value to set.- Returns:
- the BatchPoolResizeContent object itself.
-
getNodeDeallocationOption
Get the nodeDeallocationOption property: Determines what to do with a Compute Node and its running task(s) if the Pool size is decreasing. The default value is requeue.- Returns:
- the nodeDeallocationOption value.
-
setNodeDeallocationOption
public BatchPoolResizeContent setNodeDeallocationOption(BatchNodeDeallocationOption nodeDeallocationOption) Set the nodeDeallocationOption property: Determines what to do with a Compute Node and its running task(s) if the Pool size is decreasing. The default value is requeue.- Parameters:
nodeDeallocationOption- the nodeDeallocationOption value to set.- Returns:
- the BatchPoolResizeContent object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<BatchPoolResizeContent>- Throws:
IOException
-
fromJson
public static BatchPoolResizeContent fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of BatchPoolResizeContent from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of BatchPoolResizeContent 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 BatchPoolResizeContent.
-