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

2025/01/10 • 6 updated methods

Tasks_CreateTaskCollection (updated)
Description Note that each Task must have a unique ID. The Batch service may not return the results for each Task in the same order the Tasks were submitted in this request. If the server times out or the connection is closed during the request, the request may have been partially or fully processed, or not at all. In such cases, the user should re-issue the request. Note that it is up to the user to correctly handle failures when re-issuing a request. For example, you should use the same Task IDs during a retry so that if the prior operation succeeded, the retry will not create extra Tasks unexpectedly. If the response contains any Tasks which failed to add, a client can retry the request. In a retry, it is most efficient to resubmit only Tasks that failed to add, and to omit Tasks that were successfully added on the first attempt. The maximum lifetime of a Task from addition to completion is 180 days. If a Task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.
Reference Link ¶

⚶ Changes

{
  "#id": "Tasks_CreateTaskCollection",
  "$parameters": {
    "taskCollection": {
      "$properties": {
        "value": {
          "$properties": [
            {
              "#name": "commandLine",
              "Description": {
                "new": "The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using \"cmd /c MyCommand\" in Windows or \"/bin/sh -c MyCommand\" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables).",
                "old": "The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using \"cmd /c MyCommand\" in Windows or \"/bin/sh -c MyCommand\" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables)."
              }
            }
          ]
        }
      }
    }
  }
}

⚼ Request

POST:  /jobs/{jobId}/addtaskcollection
{
api-version: string ,
timeOut: integer ,
client-request-id: string ,
return-client-request-id: boolean ,
ocp-date: string ,
jobId: string ,
taskCollection:
{
value:
[
{
id: string ,
displayName: string ,
exitConditions:
{
exitCodes:
[
{
code: integer ,
exitOptions:
{
jobAction: enum ,
dependencyAction: enum ,
}
,
}
,
]
,
exitCodeRanges:
[
{
start: integer ,
end: integer ,
exitOptions:
{
jobAction: enum ,
dependencyAction: enum ,
}
,
}
,
]
,
preProcessingError:
{
jobAction: enum ,
dependencyAction: enum ,
}
,
fileUploadError:
{
jobAction: enum ,
dependencyAction: enum ,
}
,
default:
{
jobAction: enum ,
dependencyAction: enum ,
}
,
}
,
commandLine: string ,
containerSettings:
{
containerRunOptions: string ,
imageName: string ,
registry:
{
username: string ,
password: string ,
registryServer: string ,
identityReference:
{
resourceId: string ,
}
,
}
,
workingDirectory: enum ,
containerHostBatchBindMounts:
[
{
source: enum ,
isReadOnly: boolean ,
}
,
]
,
}
,
resourceFiles:
[
{
autoStorageContainerName: string ,
storageContainerUrl: string ,
httpUrl: string ,
blobPrefix: string ,
filePath: string ,
fileMode: string ,
identityReference:
{
resourceId: string ,
}
,
}
,
]
,
outputFiles:
[
{
filePattern: string ,
destination:
{
container:
{
path: string ,
containerUrl: string ,
identityReference:
{
resourceId: string ,
}
,
uploadHeaders:
[
{
name: string ,
value: string ,
}
,
]
,
}
,
}
,
uploadOptions:
{
uploadCondition: enum ,
}
,
}
,
]
,
environmentSettings:
[
{
name: string ,
value: string ,
}
,
]
,
affinityInfo:
{
affinityId: string ,
}
,
constraints:
{
maxWallClockTime: string ,
retentionTime: string ,
maxTaskRetryCount: integer ,
}
,
requiredSlots: integer ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
multiInstanceSettings:
{
numberOfInstances: integer ,
coordinationCommandLine: string ,
commonResourceFiles:
[
{
autoStorageContainerName: string ,
storageContainerUrl: string ,
httpUrl: string ,
blobPrefix: string ,
filePath: string ,
fileMode: string ,
identityReference:
{
resourceId: string ,
}
,
}
,
]
,
}
,
dependsOn:
{
taskIds:
[
string ,
]
,
taskIdRanges:
[
{
start: integer ,
end: integer ,
}
,
]
,
}
,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
authenticationTokenSettings:
{
access:
[
string ,
]
,
}
,
}
,
]
,
}
,
}

⚐ Response (200)

{
$headers:
{
etag: string ,
last-modified: string ,
client-request-id: string ,
request-id: string ,
}
,
$schema:
{
value:
[
{
status: enum ,
taskId: string ,
eTag: string ,
lastModified: string ,
location: string ,
error:
{
code: string ,
message:
{
lang: string ,
value: string ,
}
,
values:
[
{
key: string ,
value: string ,
}
,
]
,
}
,
}
,
]
,
}
,
}

⚐ Response (default)

{
code: string ,
message:
{
lang: string ,
value: string ,
}
,
values:
[
{
key: string ,
value: string ,
}
,
]
,
}
Tasks_CreateTask (updated)
Description The maximum lifetime of a Task from addition to completion is 180 days. If a Task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.
Reference Link ¶

⚶ Changes

{
  "#id": "Tasks_CreateTask",
  "$parameters": {
    "task": {
      "$properties": [
        {
          "#name": "commandLine",
          "Description": {
            "new": "The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using \"cmd /c MyCommand\" in Windows or \"/bin/sh -c MyCommand\" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/azure/batch/batch-compute-node-environment-variables).",
            "old": "The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using \"cmd /c MyCommand\" in Windows or \"/bin/sh -c MyCommand\" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://learn.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables)."
          }
        }
      ]
    }
  }
}

⚼ Request

POST:  /jobs/{jobId}/tasks
{
api-version: string ,
timeOut: integer ,
client-request-id: string ,
return-client-request-id: boolean ,
ocp-date: string ,
jobId: string ,
task:
{
id: string ,
displayName: string ,
exitConditions:
{
exitCodes:
[
{
code: integer ,
exitOptions:
{
jobAction: enum ,
dependencyAction: enum ,
}
,
}
,
]
,
exitCodeRanges:
[
{
start: integer ,
end: integer ,
exitOptions:
{
jobAction: enum ,
dependencyAction: enum ,
}
,
}
,
]
,
preProcessingError:
{
jobAction: enum ,
dependencyAction: enum ,
}
,
fileUploadError:
{
jobAction: enum ,
dependencyAction: enum ,
}
,
default:
{
jobAction: enum ,
dependencyAction: enum ,
}
,
}
,
commandLine: string ,
containerSettings:
{
containerRunOptions: string ,
imageName: string ,
registry:
{
username: string ,
password: string ,
registryServer: string ,
identityReference:
{
resourceId: string ,
}
,
}
,
workingDirectory: enum ,
containerHostBatchBindMounts:
[
{
source: enum ,
isReadOnly: boolean ,
}
,
]
,
}
,
resourceFiles:
[
{
autoStorageContainerName: string ,
storageContainerUrl: string ,
httpUrl: string ,
blobPrefix: string ,
filePath: string ,
fileMode: string ,
identityReference:
{
resourceId: string ,
}
,
}
,
]
,
outputFiles:
[
{
filePattern: string ,
destination:
{
container:
{
path: string ,
containerUrl: string ,
identityReference:
{
resourceId: string ,
}
,
uploadHeaders:
[
{
name: string ,
value: string ,
}
,
]
,
}
,
}
,
uploadOptions:
{
uploadCondition: enum ,
}
,
}
,
]
,
environmentSettings:
[
{
name: string ,
value: string ,
}
,
]
,
affinityInfo:
{
affinityId: string ,
}
,
constraints:
{
maxWallClockTime: string ,
retentionTime: string ,
maxTaskRetryCount: integer ,
}
,
requiredSlots: integer ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
multiInstanceSettings:
{
numberOfInstances: integer ,
coordinationCommandLine: string ,
commonResourceFiles:
[
{
autoStorageContainerName: string ,
storageContainerUrl: string ,
httpUrl: string ,
blobPrefix: string ,
filePath: string ,
fileMode: string ,
identityReference:
{
resourceId: string ,
}
,
}
,
]
,
}
,
dependsOn:
{
taskIds:
[
string ,
]
,
taskIdRanges:
[
{
start: integer ,
end: integer ,
}
,
]
,
}
,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
authenticationTokenSettings:
{
access:
[
string ,
]
,
}
,
}
,
}

⚐ Response (201)

{
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_ListPools (updated)
Description Lists all of the Pools which be mounted.
Reference Link ¶

⚶ Changes

{
  "#id": "Pools_ListPools",
  "$responses": {
    "200": {
      "$properties": {
        "value": {
          "$properties": [
            {
              "#name": "vmSize",
              "Description": {
                "new": "The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available VM sizes, see Sizes for Virtual Machines in Azure (https://learn.microsoft.com/azure/virtual-machines/sizes/overview). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series).",
                "old": "The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available VM sizes, see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series)."
              }
            }
          ]
        }
      }
    }
  }
}

⚼ Request

GET:  /pools
{
api-version: string ,
timeOut: integer ,
client-request-id: string ,
return-client-request-id: boolean ,
ocp-date: string ,
maxresults: integer ,
$filter: string ,
$select: array ,
$expand: array ,
}

⚐ Response (200)

{
$headers:
{
etag: string ,
last-modified: string ,
client-request-id: string ,
request-id: string ,
}
,
$schema:
{
value:
[
{
id: string ,
displayName: string ,
url: string ,
eTag: string ,
lastModified: string ,
creationTime: string ,
state: enum ,
stateTransitionTime: string ,
allocationState: enum ,
allocationStateTransitionTime: string ,
vmSize: string ,
virtualMachineConfiguration:
{
imageReference:
{
publisher: string ,
offer: string ,
sku: string ,
version: string ,
virtualMachineImageId: string ,
exactVersion: string ,
sharedGalleryImageId: string ,
communityGalleryImageId: string ,
}
,
nodeAgentSKUId: string ,
windowsConfiguration:
{
enableAutomaticUpdates: boolean ,
}
,
dataDisks:
[
{
lun: integer ,
caching: enum ,
diskSizeGB: integer ,
storageAccountType: enum ,
}
,
]
,
licenseType: string ,
containerConfiguration:
{
type: enum ,
containerImageNames:
[
string ,
]
,
containerRegistries:
[
{
username: string ,
password: string ,
registryServer: string ,
identityReference:
{
resourceId: string ,
}
,
}
,
]
,
}
,
diskEncryptionConfiguration:
{
targets:
[
string ,
]
,
}
,
nodePlacementConfiguration:
{
policy: enum ,
}
,
extensions:
[
{
name: string ,
publisher: string ,
type: string ,
typeHandlerVersion: string ,
autoUpgradeMinorVersion: boolean ,
enableAutomaticUpgrade: boolean ,
settings: object ,
protectedSettings: object ,
provisionAfterExtensions:
[
string ,
]
,
}
,
]
,
osDisk:
{
ephemeralOSDiskSettings:
{
placement: enum ,
}
,
caching: enum ,
diskSizeGB: integer ,
managedDisk:
{
storageAccountType: enum ,
securityProfile:
{
securityEncryptionType: enum ,
}
,
}
,
writeAcceleratorEnabled: boolean ,
}
,
securityProfile:
{
encryptionAtHost: boolean ,
securityType: enum ,
uefiSettings:
{
secureBootEnabled: boolean ,
vTpmEnabled: boolean ,
}
,
}
,
serviceArtifactReference:
{
id: string ,
}
,
}
,
resizeTimeout: string ,
resizeErrors:
[
{
code: string ,
message: string ,
values:
[
{
name: string ,
value: string ,
}
,
]
,
}
,
]
,
resourceTags: object ,
currentDedicatedNodes: integer ,
currentLowPriorityNodes: integer ,
targetDedicatedNodes: integer ,
targetLowPriorityNodes: integer ,
enableAutoScale: boolean ,
autoScaleFormula: string ,
autoScaleEvaluationInterval: string ,
autoScaleRun:
{
timestamp: string ,
results: string ,
error:
{
code: string ,
message: string ,
values:
[
{
name: string ,
value: string ,
}
,
]
,
}
,
}
,
enableInterNodeCommunication: boolean ,
networkConfiguration:
{
subnetId: string ,
dynamicVNetAssignmentScope: enum ,
endpointConfiguration:
{
inboundNATPools:
[
{
name: string ,
protocol: enum ,
backendPort: integer ,
frontendPortRangeStart: integer ,
frontendPortRangeEnd: integer ,
networkSecurityGroupRules:
[
{
priority: integer ,
access: enum ,
sourceAddressPrefix: string ,
sourcePortRanges:
[
string ,
]
,
}
,
]
,
}
,
]
,
}
,
publicIPAddressConfiguration:
{
provision: enum ,
ipAddressIds:
[
string ,
]
,
}
,
enableAcceleratedNetworking: boolean ,
}
,
startTask:
{
commandLine: string ,
containerSettings:
{
containerRunOptions: string ,
imageName: string ,
registry:
{
username: string ,
password: string ,
registryServer: string ,
identityReference:
{
resourceId: string ,
}
,
}
,
workingDirectory: enum ,
containerHostBatchBindMounts:
[
{
source: enum ,
isReadOnly: boolean ,
}
,
]
,
}
,
resourceFiles:
[
{
autoStorageContainerName: string ,
storageContainerUrl: string ,
httpUrl: string ,
blobPrefix: string ,
filePath: string ,
fileMode: string ,
identityReference:
{
resourceId: string ,
}
,
}
,
]
,
environmentSettings:
[
{
name: string ,
value: string ,
}
,
]
,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
maxTaskRetryCount: integer ,
waitForSuccess: boolean ,
}
,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
taskSlotsPerNode: integer ,
taskSchedulingPolicy:
{
nodeFillType: enum ,
}
,
userAccounts:
[
{
name: string ,
password: string ,
elevationLevel: enum ,
linuxUserConfiguration:
{
uid: integer ,
gid: integer ,
sshPrivateKey: string ,
}
,
windowsUserConfiguration:
{
loginMode: enum ,
}
,
}
,
]
,
metadata:
[
{
name: string ,
value: string ,
}
,
]
,
stats:
{
url: string ,
startTime: string ,
lastUpdateTime: string ,
usageStats:
{
startTime: string ,
lastUpdateTime: string ,
dedicatedCoreTime: string ,
}
,
resourceStats:
{
startTime: string ,
lastUpdateTime: string ,
avgCPUPercentage: number ,
avgMemoryGiB: number ,
peakMemoryGiB: number ,
avgDiskGiB: number ,
peakDiskGiB: number ,
diskReadIOps: integer ,
diskWriteIOps: integer ,
diskReadGiB: number ,
diskWriteGiB: number ,
networkReadGiB: number ,
networkWriteGiB: number ,
}
,
}
,
mountConfiguration:
[
{
azureBlobFileSystemConfiguration:
{
accountName: string ,
containerName: string ,
accountKey: string ,
sasKey: string ,
blobfuseOptions: string ,
relativeMountPath: string ,
identityReference:
{
resourceId: string ,
}
,
}
,
nfsMountConfiguration:
{
source: string ,
relativeMountPath: string ,
mountOptions: string ,
}
,
cifsMountConfiguration:
{
username: string ,
source: string ,
relativeMountPath: string ,
mountOptions: string ,
password: string ,
}
,
azureFileShareConfiguration:
{
accountName: string ,
azureFileUrl: string ,
accountKey: string ,
relativeMountPath: string ,
mountOptions: string ,
}
,
}
,
]
,
identity:
{
type: enum ,
userAssignedIdentities:
[
{
resourceId: string ,
clientId: string ,
principalId: string ,
}
,
]
,
}
,
targetNodeCommunicationMode: enum ,
currentNodeCommunicationMode: enum ,
upgradePolicy:
{
mode: enum ,
automaticOSUpgradePolicy:
{
disableAutomaticRollback: boolean ,
enableAutomaticOSUpgrade: boolean ,
useRollingUpgradePolicy: boolean ,
osRollingUpgradeDeferral: boolean ,
}
,
rollingUpgradePolicy:
{
enableCrossZoneUpgrade: boolean ,
maxBatchInstancePercent: integer ,
maxUnhealthyInstancePercent: integer ,
maxUnhealthyUpgradedInstancePercent: integer ,
pauseTimeBetweenBatches: string ,
prioritizeUnhealthyInstances: boolean ,
rollbackFailedInstancesOnPolicyBreach: boolean ,
}
,
}
,
}
,
]
,
odata.nextLink: string ,
}
,
}

⚐ Response (default)

{
code: string ,
message:
{
lang: string ,
value: string ,
}
,
values:
[
{
key: string ,
value: string ,
}
,
]
,
}
Pools_CreatePool (updated)
Description When naming Pools, avoid including sensitive information such as user names or secret project names. This information may appear in telemetry logs accessible to Microsoft Support engineers.
Reference Link ¶

⚶ Changes

{
  "#id": "Pools_CreatePool",
  "$parameters": {
    "pool": {
      "$properties": [
        {
          "#name": "vmSize",
          "Description": {
            "new": "The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available VM sizes for Pools using Images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration), see Sizes for Virtual Machines in Azure (https://learn.microsoft.com/azure/virtual-machines/sizes/overview). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series).",
            "old": "The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available VM sizes for Pools using Images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration), see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series)."
          }
        },
        {
          "#name": "autoScaleFormula",
          "Description": {
            "new": "A formula for the desired number of Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to false. It is required if enableAutoScale is set to true. The formula is checked for validity before the Pool is created. If the formula is not valid, the Batch service rejects the request with detailed error information. For more information about specifying this formula, see 'Automatically scale Compute Nodes in an Azure Batch Pool' (https://learn.microsoft.com/azure/batch/batch-automatic-scaling).",
            "old": "A formula for the desired number of Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to false. It is required if enableAutoScale is set to true. The formula is checked for validity before the Pool is created. If the formula is not valid, the Batch service rejects the request with detailed error information. For more information about specifying this formula, see 'Automatically scale Compute Nodes in an Azure Batch Pool' (https://azure.microsoft.com/documentation/articles/batch-automatic-scaling/)."
          }
        }
      ]
    }
  }
}

⚼ Request

POST:  /pools
{
api-version: string ,
timeOut: integer ,
client-request-id: string ,
return-client-request-id: boolean ,
ocp-date: string ,
pool:
{
id: string ,
displayName: string ,
vmSize: string ,
virtualMachineConfiguration:
{
imageReference:
{
publisher: string ,
offer: string ,
sku: string ,
version: string ,
virtualMachineImageId: string ,
exactVersion: string ,
sharedGalleryImageId: string ,
communityGalleryImageId: string ,
}
,
nodeAgentSKUId: string ,
windowsConfiguration:
{
enableAutomaticUpdates: boolean ,
}
,
dataDisks:
[
{
lun: integer ,
caching: enum ,
diskSizeGB: integer ,
storageAccountType: enum ,
}
,
]
,
licenseType: string ,
containerConfiguration:
{
type: enum ,
containerImageNames:
[
string ,
]
,
containerRegistries:
[
{
username: string ,
password: string ,
registryServer: string ,
identityReference:
{
resourceId: string ,
}
,
}
,
]
,
}
,
diskEncryptionConfiguration:
{
targets:
[
string ,
]
,
}
,
nodePlacementConfiguration:
{
policy: enum ,
}
,
extensions:
[
{
name: string ,
publisher: string ,
type: string ,
typeHandlerVersion: string ,
autoUpgradeMinorVersion: boolean ,
enableAutomaticUpgrade: boolean ,
settings: object ,
protectedSettings: object ,
provisionAfterExtensions:
[
string ,
]
,
}
,
]
,
osDisk:
{
ephemeralOSDiskSettings:
{
placement: enum ,
}
,
caching: enum ,
diskSizeGB: integer ,
managedDisk:
{
storageAccountType: enum ,
securityProfile:
{
securityEncryptionType: enum ,
}
,
}
,
writeAcceleratorEnabled: boolean ,
}
,
securityProfile:
{
encryptionAtHost: boolean ,
securityType: enum ,
uefiSettings:
{
secureBootEnabled: boolean ,
vTpmEnabled: boolean ,
}
,
}
,
serviceArtifactReference:
{
id: string ,
}
,
}
,
resizeTimeout: string ,
resourceTags: object ,
targetDedicatedNodes: integer ,
targetLowPriorityNodes: integer ,
enableAutoScale: boolean ,
autoScaleFormula: string ,
autoScaleEvaluationInterval: string ,
enableInterNodeCommunication: boolean ,
networkConfiguration:
{
subnetId: string ,
dynamicVNetAssignmentScope: enum ,
endpointConfiguration:
{
inboundNATPools:
[
{
name: string ,
protocol: enum ,
backendPort: integer ,
frontendPortRangeStart: integer ,
frontendPortRangeEnd: integer ,
networkSecurityGroupRules:
[
{
priority: integer ,
access: enum ,
sourceAddressPrefix: string ,
sourcePortRanges:
[
string ,
]
,
}
,
]
,
}
,
]
,
}
,
publicIPAddressConfiguration:
{
provision: enum ,
ipAddressIds:
[
string ,
]
,
}
,
enableAcceleratedNetworking: boolean ,
}
,
startTask:
{
commandLine: string ,
containerSettings:
{
containerRunOptions: string ,
imageName: string ,
registry:
{
username: string ,
password: string ,
registryServer: string ,
identityReference:
{
resourceId: string ,
}
,
}
,
workingDirectory: enum ,
containerHostBatchBindMounts:
[
{
source: enum ,
isReadOnly: boolean ,
}
,
]
,
}
,
resourceFiles:
[
{
autoStorageContainerName: string ,
storageContainerUrl: string ,
httpUrl: string ,
blobPrefix: string ,
filePath: string ,
fileMode: string ,
identityReference:
{
resourceId: string ,
}
,
}
,
]
,
environmentSettings:
[
{
name: string ,
value: string ,
}
,
]
,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
maxTaskRetryCount: integer ,
waitForSuccess: boolean ,
}
,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
taskSlotsPerNode: integer ,
taskSchedulingPolicy:
{
nodeFillType: enum ,
}
,
userAccounts:
[
{
name: string ,
password: string ,
elevationLevel: enum ,
linuxUserConfiguration:
{
uid: integer ,
gid: integer ,
sshPrivateKey: string ,
}
,
windowsUserConfiguration:
{
loginMode: enum ,
}
,
}
,
]
,
metadata:
[
{
name: string ,
value: string ,
}
,
]
,
mountConfiguration:
[
{
azureBlobFileSystemConfiguration:
{
accountName: string ,
containerName: string ,
accountKey: string ,
sasKey: string ,
blobfuseOptions: string ,
relativeMountPath: string ,
identityReference:
{
resourceId: string ,
}
,
}
,
nfsMountConfiguration:
{
source: string ,
relativeMountPath: string ,
mountOptions: string ,
}
,
cifsMountConfiguration:
{
username: string ,
source: string ,
relativeMountPath: string ,
mountOptions: string ,
password: string ,
}
,
azureFileShareConfiguration:
{
accountName: string ,
azureFileUrl: string ,
accountKey: string ,
relativeMountPath: string ,
mountOptions: string ,
}
,
}
,
]
,
targetNodeCommunicationMode: enum ,
upgradePolicy:
{
mode: enum ,
automaticOSUpgradePolicy:
{
disableAutomaticRollback: boolean ,
enableAutomaticOSUpgrade: boolean ,
useRollingUpgradePolicy: boolean ,
osRollingUpgradeDeferral: boolean ,
}
,
rollingUpgradePolicy:
{
enableCrossZoneUpgrade: boolean ,
maxBatchInstancePercent: integer ,
maxUnhealthyInstancePercent: integer ,
maxUnhealthyUpgradedInstancePercent: integer ,
pauseTimeBetweenBatches: string ,
prioritizeUnhealthyInstances: boolean ,
rollbackFailedInstancesOnPolicyBreach: boolean ,
}
,
}
,
}
,
}

⚐ Response (201)

{
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_GetPool (updated)
Description Gets information about the specified Pool.
Reference Link ¶

⚶ Changes

{
  "#id": "Pools_GetPool",
  "$responses": {
    "200": {
      "$properties": [
        {
          "#name": "vmSize",
          "Description": {
            "new": "The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available VM sizes, see Sizes for Virtual Machines in Azure (https://learn.microsoft.com/azure/virtual-machines/sizes/overview). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series).",
            "old": "The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available VM sizes, see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series)."
          }
        }
      ]
    }
  }
}

⚼ Request

GET:  /pools/{poolId}
{
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 ,
$select: array ,
$expand: array ,
}

⚐ Response (200)

{
$headers:
{
etag: string ,
last-modified: string ,
client-request-id: string ,
request-id: string ,
}
,
$schema:
{
id: string ,
displayName: string ,
url: string ,
eTag: string ,
lastModified: string ,
creationTime: string ,
state: enum ,
stateTransitionTime: string ,
allocationState: enum ,
allocationStateTransitionTime: string ,
vmSize: string ,
virtualMachineConfiguration:
{
imageReference:
{
publisher: string ,
offer: string ,
sku: string ,
version: string ,
virtualMachineImageId: string ,
exactVersion: string ,
sharedGalleryImageId: string ,
communityGalleryImageId: string ,
}
,
nodeAgentSKUId: string ,
windowsConfiguration:
{
enableAutomaticUpdates: boolean ,
}
,
dataDisks:
[
{
lun: integer ,
caching: enum ,
diskSizeGB: integer ,
storageAccountType: enum ,
}
,
]
,
licenseType: string ,
containerConfiguration:
{
type: enum ,
containerImageNames:
[
string ,
]
,
containerRegistries:
[
{
username: string ,
password: string ,
registryServer: string ,
identityReference:
{
resourceId: string ,
}
,
}
,
]
,
}
,
diskEncryptionConfiguration:
{
targets:
[
string ,
]
,
}
,
nodePlacementConfiguration:
{
policy: enum ,
}
,
extensions:
[
{
name: string ,
publisher: string ,
type: string ,
typeHandlerVersion: string ,
autoUpgradeMinorVersion: boolean ,
enableAutomaticUpgrade: boolean ,
settings: object ,
protectedSettings: object ,
provisionAfterExtensions:
[
string ,
]
,
}
,
]
,
osDisk:
{
ephemeralOSDiskSettings:
{
placement: enum ,
}
,
caching: enum ,
diskSizeGB: integer ,
managedDisk:
{
storageAccountType: enum ,
securityProfile:
{
securityEncryptionType: enum ,
}
,
}
,
writeAcceleratorEnabled: boolean ,
}
,
securityProfile:
{
encryptionAtHost: boolean ,
securityType: enum ,
uefiSettings:
{
secureBootEnabled: boolean ,
vTpmEnabled: boolean ,
}
,
}
,
serviceArtifactReference:
{
id: string ,
}
,
}
,
resizeTimeout: string ,
resizeErrors:
[
{
code: string ,
message: string ,
values:
[
{
name: string ,
value: string ,
}
,
]
,
}
,
]
,
resourceTags: object ,
currentDedicatedNodes: integer ,
currentLowPriorityNodes: integer ,
targetDedicatedNodes: integer ,
targetLowPriorityNodes: integer ,
enableAutoScale: boolean ,
autoScaleFormula: string ,
autoScaleEvaluationInterval: string ,
autoScaleRun:
{
timestamp: string ,
results: string ,
error:
{
code: string ,
message: string ,
values:
[
{
name: string ,
value: string ,
}
,
]
,
}
,
}
,
enableInterNodeCommunication: boolean ,
networkConfiguration:
{
subnetId: string ,
dynamicVNetAssignmentScope: enum ,
endpointConfiguration:
{
inboundNATPools:
[
{
name: string ,
protocol: enum ,
backendPort: integer ,
frontendPortRangeStart: integer ,
frontendPortRangeEnd: integer ,
networkSecurityGroupRules:
[
{
priority: integer ,
access: enum ,
sourceAddressPrefix: string ,
sourcePortRanges:
[
string ,
]
,
}
,
]
,
}
,
]
,
}
,
publicIPAddressConfiguration:
{
provision: enum ,
ipAddressIds:
[
string ,
]
,
}
,
enableAcceleratedNetworking: boolean ,
}
,
startTask:
{
commandLine: string ,
containerSettings:
{
containerRunOptions: string ,
imageName: string ,
registry:
{
username: string ,
password: string ,
registryServer: string ,
identityReference:
{
resourceId: string ,
}
,
}
,
workingDirectory: enum ,
containerHostBatchBindMounts:
[
{
source: enum ,
isReadOnly: boolean ,
}
,
]
,
}
,
resourceFiles:
[
{
autoStorageContainerName: string ,
storageContainerUrl: string ,
httpUrl: string ,
blobPrefix: string ,
filePath: string ,
fileMode: string ,
identityReference:
{
resourceId: string ,
}
,
}
,
]
,
environmentSettings:
[
{
name: string ,
value: string ,
}
,
]
,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
maxTaskRetryCount: integer ,
waitForSuccess: boolean ,
}
,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
taskSlotsPerNode: integer ,
taskSchedulingPolicy:
{
nodeFillType: enum ,
}
,
userAccounts:
[
{
name: string ,
password: string ,
elevationLevel: enum ,
linuxUserConfiguration:
{
uid: integer ,
gid: integer ,
sshPrivateKey: string ,
}
,
windowsUserConfiguration:
{
loginMode: enum ,
}
,
}
,
]
,
metadata:
[
{
name: string ,
value: string ,
}
,
]
,
stats:
{
url: string ,
startTime: string ,
lastUpdateTime: string ,
usageStats:
{
startTime: string ,
lastUpdateTime: string ,
dedicatedCoreTime: string ,
}
,
resourceStats:
{
startTime: string ,
lastUpdateTime: string ,
avgCPUPercentage: number ,
avgMemoryGiB: number ,
peakMemoryGiB: number ,
avgDiskGiB: number ,
peakDiskGiB: number ,
diskReadIOps: integer ,
diskWriteIOps: integer ,
diskReadGiB: number ,
diskWriteGiB: number ,
networkReadGiB: number ,
networkWriteGiB: number ,
}
,
}
,
mountConfiguration:
[
{
azureBlobFileSystemConfiguration:
{
accountName: string ,
containerName: string ,
accountKey: string ,
sasKey: string ,
blobfuseOptions: string ,
relativeMountPath: string ,
identityReference:
{
resourceId: string ,
}
,
}
,
nfsMountConfiguration:
{
source: string ,
relativeMountPath: string ,
mountOptions: string ,
}
,
cifsMountConfiguration:
{
username: string ,
source: string ,
relativeMountPath: string ,
mountOptions: string ,
password: string ,
}
,
azureFileShareConfiguration:
{
accountName: string ,
azureFileUrl: string ,
accountKey: string ,
relativeMountPath: string ,
mountOptions: string ,
}
,
}
,
]
,
identity:
{
type: enum ,
userAssignedIdentities:
[
{
resourceId: string ,
clientId: string ,
principalId: string ,
}
,
]
,
}
,
targetNodeCommunicationMode: enum ,
currentNodeCommunicationMode: enum ,
upgradePolicy:
{
mode: enum ,
automaticOSUpgradePolicy:
{
disableAutomaticRollback: boolean ,
enableAutomaticOSUpgrade: boolean ,
useRollingUpgradePolicy: boolean ,
osRollingUpgradeDeferral: boolean ,
}
,
rollingUpgradePolicy:
{
enableCrossZoneUpgrade: boolean ,
maxBatchInstancePercent: integer ,
maxUnhealthyInstancePercent: integer ,
maxUnhealthyUpgradedInstancePercent: integer ,
pauseTimeBetweenBatches: string ,
prioritizeUnhealthyInstances: boolean ,
rollbackFailedInstancesOnPolicyBreach: boolean ,
}
,
}
,
}
,
}

⚐ Response (default)

{
code: string ,
message:
{
lang: string ,
value: string ,
}
,
values:
[
{
key: string ,
value: string ,
}
,
]
,
}
Pools_EvaluatePoolAutoScale (updated)
Description This API is primarily for validating an autoscale formula, as it simply returns the result without applying the formula to the Pool. The Pool must have auto scaling enabled in order to evaluate a formula.
Reference Link ¶

⚶ Changes

{
  "#id": "Pools_EvaluatePoolAutoScale",
  "$parameters": {
    "content": {
      "$properties": [
        {
          "#name": "autoScaleFormula",
          "Description": {
            "new": "The formula for the desired number of Compute Nodes in the Pool. The formula is validated and its results calculated, but it is not applied to the Pool. To apply the formula to the Pool, 'Enable automatic scaling on a Pool'. For more information about specifying this formula, see Automatically scale Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-automatic-scaling).",
            "old": "The formula for the desired number of Compute Nodes in the Pool. The formula is validated and its results calculated, but it is not applied to the Pool. To apply the formula to the Pool, 'Enable automatic scaling on a Pool'. For more information about specifying this formula, see Automatically scale Compute Nodes in an Azure Batch Pool (https://azure.microsoft.com/documentation/articles/batch-automatic-scaling)."
          }
        }
      ]
    }
  }
}

⚼ Request

POST:  /pools/{poolId}/evaluateautoscale
{
api-version: string ,
timeOut: integer ,
client-request-id: string ,
return-client-request-id: boolean ,
ocp-date: string ,
poolId: string ,
content:
{
autoScaleFormula: string ,
}
,
}

⚐ Response (200)

{
$headers:
{
dataserviceid: string ,
etag: string ,
last-modified: string ,
client-request-id: string ,
request-id: string ,
}
,
$schema:
{
timestamp: string ,
results: string ,
error:
{
code: string ,
message: string ,
values:
[
{
name: string ,
value: string ,
}
,
]
,
}
,
}
,
}

⚐ Response (default)

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