Azure.Batch (preview:2024-07-01.20.0)

2025/08/27 • 5 updated methods

Nodes_DeallocateNode (updated)
Description You can deallocate a Compute Node only if it is in an idle or running state.
Reference Link ¶

⚶ Changes

{
  "#id": "Nodes_DeallocateNode",
  "$parameters": {
    "options": {
      "$properties": [
        {
          "#name": "nodeDeallocateOption",
          "Enum": {
            "new": [
              [
                "requeue",
                "Terminate running Task processes and requeue the Tasks. The Tasks will run again when a Compute Node is available. Deallocate the Compute Node as soon as Tasks have been terminated."
              ],
              [
                "terminate",
                "Terminate running Tasks. The Tasks will be completed with failureInfo indicating that they were terminated, and will not run again. Deallocate the Compute Node as soon as Tasks have been terminated."
              ],
              [
                "taskcompletion",
                "Allow currently running Tasks to complete. Schedule no new Tasks while waiting. Deallocate the Compute Node when all Tasks have completed."
              ],
              [
                "retaineddata",
                "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. Deallocate the Compute Node when all Task retention periods have expired."
              ]
            ],
            "old": [
              [
                "requeue",
                "Terminate running Task processes and requeue the Tasks. The Tasks will run again when a Compute Node is available. Deallocate the Compute Node as soon as Tasks have been terminated."
              ],
              [
                "terminate",
                "Terminate running Tasks. The Tasks will be completed with failureInfo indicating that they were terminated, and will not run again. Deallocate the Compute Node as soon as Tasks have been terminated."
              ],
              [
                "taskcompletion",
                "Allow currently running Tasks to complete. Schedule no new Tasks while waiting. Deallocate the Compute Node when all Tasks have completed."
              ],
              [
                "retaineddata",
                "Allow currently running Tasks to complete, then wait for all Task data retention periods to expire. Schedule no new Tasks while waiting. Deallocate the Compute Node when all Task retention periods have expired."
              ]
            ]
          }
        }
      ]
    }
  }
}

⚼ Request

POST:  /pools/{poolId}/nodes/{nodeId}/deallocate
{
api-version: string ,
timeOut: integer ,
client-request-id: string ,
return-client-request-id: boolean ,
ocp-date: string ,
poolId: string ,
nodeId: string ,
options:
{
nodeDeallocateOption: enum ,
}
,
}

⚐ Response (202)

{
dataserviceid: string ,
etag: string ,
last-modified: string ,
client-request-id: string ,
request-id: string ,
}

⚐ Response (default)

{
code: string ,
message:
{
lang: string ,
value: string ,
}
,
values:
[
{
key: string ,
value: string ,
}
,
]
,
}
Nodes_RebootNode (updated)
Description You can restart a Compute Node only if it is in an idle or running state.
Reference Link ¶

⚶ Changes

{
  "#id": "Nodes_RebootNode",
  "$parameters": {
    "options": {
      "$properties": [
        {
          "#name": "nodeRebootOption",
          "Enum": {
            "new": [
              [
                "requeue",
                "Terminate running Task processes and requeue the Tasks. The Tasks will run again when a Compute Node is available. Restart the Compute Node as soon as Tasks have been terminated."
              ],
              [
                "terminate",
                "Terminate running Tasks. The Tasks will be completed with failureInfo indicating that they were terminated, and will not run again. Restart the Compute Node as soon as Tasks have been terminated."
              ],
              [
                "taskcompletion",
                "Allow currently running Tasks to complete. Schedule no new Tasks while waiting. Restart the Compute Node when all Tasks have completed."
              ],
              [
                "retaineddata",
                "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. Restart the Compute Node when all Task retention periods have expired."
              ]
            ],
            "old": [
              [
                "requeue",
                "Terminate running Task processes and requeue the Tasks. The Tasks will run again when a Compute Node is available. Restart the Compute Node as soon as Tasks have been terminated."
              ],
              [
                "terminate",
                "Terminate running Tasks. The Tasks will be completed with failureInfo indicating that they were terminated, and will not run again. Restart the Compute Node as soon as Tasks have been terminated."
              ],
              [
                "taskcompletion",
                "Allow currently running Tasks to complete. Schedule no new Tasks while waiting. Restart the Compute Node when all Tasks have completed."
              ],
              [
                "retaineddata",
                "Allow currently running Tasks to complete, then wait for all Task data retention periods to expire. Schedule no new Tasks while waiting. Restart the Compute Node when all Task retention periods have expired."
              ]
            ]
          }
        }
      ]
    }
  }
}

⚼ Request

POST:  /pools/{poolId}/nodes/{nodeId}/reboot
{
api-version: string ,
timeOut: integer ,
client-request-id: string ,
return-client-request-id: boolean ,
ocp-date: string ,
poolId: string ,
nodeId: string ,
options:
{
nodeRebootOption: enum ,
}
,
}

⚐ Response (202)

{
dataserviceid: string ,
etag: string ,
last-modified: string ,
client-request-id: string ,
request-id: string ,
}

⚐ Response (default)

{
code: string ,
message:
{
lang: string ,
value: string ,
}
,
values:
[
{
key: string ,
value: string ,
}
,
]
,
}
Nodes_ReimageNode (updated)
Description You can reinstall the operating system on a Compute Node only if it is in an idle or running state. This API can be invoked only on Pools created with the cloud service configuration property.
Reference Link ¶

⚶ Changes

{
  "#id": "Nodes_ReimageNode",
  "$parameters": {
    "options": {
      "$properties": [
        {
          "#name": "nodeReimageOption",
          "Enum": {
            "new": [
              [
                "requeue",
                "Terminate running Task processes and requeue the Tasks. The Tasks will run again when a Compute Node is available. Reimage the Compute Node as soon as Tasks have been terminated."
              ],
              [
                "terminate",
                "Terminate running Tasks. The Tasks will be completed with failureInfo indicating that they were terminated, and will not run again. Reimage the Compute Node as soon as Tasks have been terminated."
              ],
              [
                "taskcompletion",
                "Allow currently running Tasks to complete. Schedule no new Tasks while waiting. Reimage the Compute Node when all Tasks have completed."
              ],
              [
                "retaineddata",
                "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. Reimage the Compute Node when all Task retention periods have expired."
              ]
            ],
            "old": [
              [
                "requeue",
                "Terminate running Task processes and requeue the Tasks. The Tasks will run again when a Compute Node is available. Reimage the Compute Node as soon as Tasks have been terminated."
              ],
              [
                "terminate",
                "Terminate running Tasks. The Tasks will be completed with failureInfo indicating that they were terminated, and will not run again. Reimage the Compute Node as soon as Tasks have been terminated."
              ],
              [
                "taskcompletion",
                "Allow currently running Tasks to complete. Schedule no new Tasks while waiting. Reimage the Compute Node when all Tasks have completed."
              ],
              [
                "retaineddata",
                "Allow currently running Tasks to complete, then wait for all Task data retention periods to expire. Schedule no new Tasks while waiting. Reimage the Compute Node when all Task retention periods have expired."
              ]
            ]
          }
        }
      ]
    }
  }
}

⚼ Request

POST:  /pools/{poolId}/nodes/{nodeId}/reimage
{
api-version: string ,
timeOut: integer ,
client-request-id: string ,
return-client-request-id: boolean ,
ocp-date: string ,
poolId: string ,
nodeId: string ,
options:
{
nodeReimageOption: enum ,
}
,
}

⚐ Response (202)

{
dataserviceid: string ,
etag: string ,
last-modified: string ,
client-request-id: string ,
request-id: string ,
}

⚐ Response (default)

{
code: string ,
message:
{
lang: string ,
value: string ,
}
,
values:
[
{
key: string ,
value: string ,
}
,
]
,
}
Pools_RemoveNodes (updated)
Description This operation can only run when the allocation state of the Pool is steady. When this operation runs, the allocation state changes from steady to resizing. Each request may remove up to 100 nodes.
Reference Link ¶

⚶ Changes

{
  "#id": "Pools_RemoveNodes",
  "$parameters": {
    "removeOptions": {
      "$properties": [
        {
          "#name": "nodeDeallocationOption",
          "Enum": {
            "new": [
              [
                "requeue",
                "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."
              ],
              [
                "terminate",
                "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."
              ],
              [
                "taskcompletion",
                "Allow currently running Tasks to complete. Schedule no new Tasks while waiting. Remove Compute Nodes when all Tasks have completed."
              ],
              [
                "retaineddata",
                "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."
              ]
            ],
            "old": [
              [
                "requeue",
                "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."
              ],
              [
                "terminate",
                "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."
              ],
              [
                "taskcompletion",
                "Allow currently running Tasks to complete. Schedule no new Tasks while waiting. Remove Compute Nodes when all Tasks have completed."
              ],
              [
                "retaineddata",
                "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."
              ]
            ]
          }
        }
      ]
    }
  }
}

⚼ Request

POST:  /pools/{poolId}/removenodes
{
api-version: string ,
timeOut: integer ,
client-request-id: string ,
return-client-request-id: boolean ,
ocp-date: string ,
If-Modified-Since: string ,
If-Unmodified-Since: string ,
If-Match: string ,
If-None-Match: string ,
poolId: string ,
removeOptions:
{
nodeList:
[
string ,
]
,
resizeTimeout: string ,
nodeDeallocationOption: enum ,
}
,
}

⚐ Response (202)

{
dataserviceid: string ,
etag: string ,
last-modified: string ,
client-request-id: string ,
request-id: string ,
}

⚐ Response (default)

{
code: string ,
message:
{
lang: string ,
value: string ,
}
,
values:
[
{
key: string ,
value: string ,
}
,
]
,
}
Pools_ResizePool (updated)
Description You can only resize a Pool when its allocation state is steady. If the Pool is already resizing, the request fails with status code 409. When you resize a Pool, the Pool's allocation state changes from steady to resizing. You cannot resize Pools which are configured for automatic scaling. If you try to do this, the Batch service returns an error 409. If you resize a Pool downwards, the Batch service chooses which Compute Nodes to remove. To remove specific Compute Nodes, use the Pool remove Compute Nodes API instead.
Reference Link ¶

⚶ Changes

{
  "#id": "Pools_ResizePool",
  "$parameters": {
    "resizeOptions": {
      "$properties": [
        {
          "#name": "nodeDeallocationOption",
          "Enum": {
            "new": [
              [
                "requeue",
                "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."
              ],
              [
                "terminate",
                "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."
              ],
              [
                "taskcompletion",
                "Allow currently running Tasks to complete. Schedule no new Tasks while waiting. Remove Compute Nodes when all Tasks have completed."
              ],
              [
                "retaineddata",
                "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."
              ]
            ],
            "old": [
              [
                "requeue",
                "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."
              ],
              [
                "terminate",
                "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."
              ],
              [
                "taskcompletion",
                "Allow currently running Tasks to complete. Schedule no new Tasks while waiting. Remove Compute Nodes when all Tasks have completed."
              ],
              [
                "retaineddata",
                "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."
              ]
            ]
          }
        }
      ]
    }
  }
}

⚼ Request

POST:  /pools/{poolId}/resize
{
api-version: string ,
timeOut: integer ,
client-request-id: string ,
return-client-request-id: boolean ,
ocp-date: string ,
If-Modified-Since: string ,
If-Unmodified-Since: string ,
If-Match: string ,
If-None-Match: string ,
poolId: string ,
resizeOptions:
{
targetDedicatedNodes: integer ,
targetLowPriorityNodes: integer ,
resizeTimeout: string ,
nodeDeallocationOption: enum ,
}
,
}

⚐ Response (202)

{
dataserviceid: string ,
etag: string ,
last-modified: string ,
client-request-id: string ,
request-id: string ,
}

⚐ Response (default)

{
code: string ,
message:
{
lang: string ,
value: string ,
}
,
values:
[
{
key: string ,
value: string ,
}
,
]
,
}