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 Details

    • BatchPoolResizeContent

      public BatchPoolResizeContent()
      Creates an instance of BatchPoolResizeContent class.
  • Method Details

    • getTargetDedicatedNodes

      public Integer getTargetDedicatedNodes()
      Get the targetDedicatedNodes property: The desired number of dedicated Compute Nodes in the Pool.
      Returns:
      the targetDedicatedNodes value.
    • setTargetDedicatedNodes

      public BatchPoolResizeContent setTargetDedicatedNodes(Integer targetDedicatedNodes)
      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

      public Integer getTargetLowPriorityNodes()
      Get the targetLowPriorityNodes property: The desired number of Spot/Low-priority Compute Nodes in the Pool.
      Returns:
      the targetLowPriorityNodes value.
    • setTargetLowPriorityNodes

      public BatchPoolResizeContent setTargetLowPriorityNodes(Integer targetLowPriorityNodes)
      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

      public Duration 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

      public BatchPoolResizeContent setResizeTimeout(Duration resizeTimeout)
      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

      public BatchNodeDeallocationOption 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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.