{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-batch/json-schema/microsoft-azure-batch-batch-pool-resize-options-schema.json",
  "title": "BatchPoolResizeOptions",
  "description": "Parameters for changing the size of an Azure Batch Pool.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/microsoft-azure-batch-pools-api-openapi.yml#/components/schemas/BatchPoolResizeOptions",
  "type": "object",
  "properties": {
    "targetDedicatedNodes": {
      "type": "integer",
      "format": "int32",
      "description": "The desired number of dedicated Compute Nodes in the Pool."
    },
    "targetLowPriorityNodes": {
      "type": "integer",
      "format": "int32",
      "description": "The desired number of Spot/Low-priority Compute Nodes in the Pool."
    },
    "resizeTimeout": {
      "type": "string",
      "format": "duration",
      "description": "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). The time duration is specified in ISO 8601 format."
    },
    "nodeDeallocationOption": {
      "$ref": "#/$defs/BatchNodeDeallocationOption",
      "description": "Determines what to do with a Compute Node and its running task(s) if the Pool size is decreasing. The default value is requeue."
    }
  },
  "$defs": {
    "BatchNodeDeallocationOption": {
      "type": "string",
      "description": "BatchNodeDeallocationOption enums",
      "enum": [
        "requeue",
        "terminate",
        "taskcompletion",
        "retaineddata"
      ],
      "x-ms-enum": {
        "name": "BatchNodeDeallocationOption",
        "modelAsString": true,
        "values": [
          {
            "name": "Requeue",
            "value": "requeue",
            "description": "Terminate running Task processes and requeue the Tasks. The Tasks will run again when a Compute Node is available. Remove Compute Nodes as soon as Tasks have been terminated."
          },
          {
            "name": "Terminate",
            "value": "terminate",
            "description": "Terminate running Tasks. The Tasks will be completed with failureInfo indicating that they were terminated, and will not run again. Remove Compute Nodes as soon as Tasks have been terminated."
          },
          {
            "name": "TaskCompletion",
            "value": "taskcompletion",
            "description": "Allow currently running Tasks to complete. Schedule no new Tasks while waiting. Remove Compute Nodes when all Tasks have completed."
          },
          {
            "name": "RetainedData",
            "value": "retaineddata",
            "description": "Deprecated, we encourage you to upload task data to Azure Storage in your task and use `TaskCompletion` instead. Allow currently running Tasks to complete, then wait for all Task data retention periods to expire. Schedule no new Tasks while waiting. Remove Compute Nodes when all Task retention periods have expired."
          }
        ]
      }
    }
  }
}