Microsoft.Batch (stable:2024-07-01.20.0)

2025/02/20 • 14 updated methods

Pool_ListUsageMetrics (updated)
Description Warning: This operation has been deprecated and will be removed after September 30, 2024. Please see https://azure.microsoft.com/updates?id=azure-batch-pool-list-usage-metrics-api-will-be-retired-on-30-september-2024 for more information.
Reference Link ¶

⚶ Changes

{
  "#id": "Pool_ListUsageMetrics",
  "Description": {
    "new": "Warning: This operation has been deprecated and will be removed after September 30, 2024. Please see https://azure.microsoft.com/updates?id=azure-batch-pool-list-usage-metrics-api-will-be-retired-on-30-september-2024 for more information.",
    "old": "If you do not specify a $filter clause including a poolId, the response includes all Pools that existed in the Account in the time range of the returned aggregation intervals. If you do not specify a $filter clause including a startTime or endTime these filters default to the start and end times of the last aggregation interval currently available; that is, only the last aggregation interval is returned."
  }
}

⚼ Request

GET:  /poolusagemetrics
{
starttime: string ,
endtime: string ,
$filter: string ,
maxresults: integer ,
timeout: integer ,
client-request-id: string ,
return-client-request-id: boolean ,
ocp-date: string ,
api-version: string ,
}

⚐ Response (200)

{
$headers:
{
client-request-id: string ,
request-id: string ,
etag: string ,
last-modified: string ,
}
,
$schema:
{
value:
[
{
poolId: string ,
startTime: string ,
endTime: string ,
vmSize: string ,
totalCoreHours: number ,
}
,
]
,
odata.nextLink: string ,
}
,
}

⚐ Response (default)

{
code: string ,
message:
{
lang: string ,
value: string ,
}
,
values:
[
{
key: string ,
value: string ,
}
,
]
,
}
JobSchedule_Get (updated)
Description Gets information about the specified Job Schedule.
Reference Link ¶

⚶ Changes

{
  "#id": "JobSchedule_Get",
  "$responses": {
    "200": {
      "$properties": {
        "jobSpecification": [
          {
            "jobManagerTask": [
              {
                "#name": "authenticationTokenSettings",
                "Description": {
                  "new": "Warning: This object is deprecated and will be removed after September 30, 2024. Please see https://azure.microsoft.com/updates?id=azure-batch-task-authentication-token-will-be-retired-on-30-september-2024 for more information",
                  "old": "If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job."
                }
              }
            ]
          }
        ]
      }
    }
  }
}

⚼ Request

GET:  /jobschedules/{jobScheduleId}
{
jobScheduleId: string ,
$select: string ,
$expand: string ,
timeout: integer ,
client-request-id: string ,
return-client-request-id: boolean ,
ocp-date: string ,
If-Match: string ,
If-None-Match: string ,
If-Modified-Since: string ,
If-Unmodified-Since: string ,
api-version: string ,
}

⚐ Response (200)

{
$headers:
{
client-request-id: string ,
request-id: string ,
etag: string ,
last-modified: string ,
}
,
$schema:
{
id: string ,
displayName: string ,
url: string ,
eTag: string ,
lastModified: string ,
creationTime: string ,
state: enum ,
stateTransitionTime: string ,
previousState: enum ,
previousStateTransitionTime: string ,
schedule:
{
doNotRunUntil: string ,
doNotRunAfter: string ,
startWindow: string ,
recurrenceInterval: string ,
}
,
jobSpecification:
{
priority: integer ,
allowTaskPreemption: boolean ,
maxParallelTasks: integer ,
displayName: string ,
usesTaskDependencies: boolean ,
onAllTasksComplete: enum ,
onTaskFailure: enum ,
networkConfiguration:
{
subnetId: string ,
skipWithdrawFromVNet: boolean ,
}
,
constraints:
{
maxWallClockTime: string ,
maxTaskRetryCount: integer ,
}
,
jobManagerTask:
{
id: string ,
displayName: string ,
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 ,
}
,
]
,
constraints:
{
maxWallClockTime: string ,
retentionTime: string ,
maxTaskRetryCount: integer ,
}
,
requiredSlots: integer ,
killJobOnCompletion: boolean ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
runExclusive: boolean ,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
authenticationTokenSettings:
{
access:
[
string ,
]
,
}
,
allowLowPriorityNode: boolean ,
}
,
jobPreparationTask:
{
id: string ,
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 ,
}
,
]
,
constraints:
{
maxWallClockTime: string ,
retentionTime: string ,
maxTaskRetryCount: integer ,
}
,
waitForSuccess: boolean ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
rerunOnNodeRebootAfterSuccess: boolean ,
}
,
jobReleaseTask:
{
id: string ,
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 ,
}
,
]
,
maxWallClockTime: string ,
retentionTime: string ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
}
,
commonEnvironmentSettings:
[
{
name: string ,
value: string ,
}
,
]
,
poolInfo:
{
poolId: string ,
autoPoolSpecification:
{
autoPoolIdPrefix: string ,
poolLifetimeOption: enum ,
keepAlive: boolean ,
pool:
{
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 ,
managedDisk:
{
storageAccountType: enum ,
securityProfile:
{
securityEncryptionType: enum ,
}
,
}
,
diskSizeGB: integer ,
writeAcceleratorEnabled: boolean ,
}
,
securityProfile:
{
securityType: enum ,
encryptionAtHost: boolean ,
uefiSettings:
{
secureBootEnabled: boolean ,
vTpmEnabled: boolean ,
}
,
}
,
serviceArtifactReference:
{
id: string ,
}
,
}
,
taskSlotsPerNode: integer ,
taskSchedulingPolicy:
{
nodeFillType: enum ,
}
,
resizeTimeout: string ,
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 ,
}
,
certificateReferences:
[
{
thumbprint: string ,
thumbprintAlgorithm: string ,
storeLocation: enum ,
storeName: string ,
visibility:
[
string ,
]
,
}
,
]
,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
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 ,
}
,
}
,
resourceTags: object ,
}
,
}
,
}
,
metadata:
[
{
name: string ,
value: string ,
}
,
]
,
}
,
executionInfo:
{
nextRunTime: string ,
recentJob:
{
id: string ,
url: string ,
}
,
endTime: string ,
}
,
metadata:
[
{
name: string ,
value: string ,
}
,
]
,
stats:
{
url: string ,
startTime: string ,
lastUpdateTime: string ,
userCPUTime: string ,
kernelCPUTime: string ,
wallClockTime: string ,
readIOps: integer ,
writeIOps: integer ,
readIOGiB: number ,
writeIOGiB: number ,
numSucceededTasks: integer ,
numFailedTasks: integer ,
numTaskRetries: integer ,
waitTime: string ,
}
,
}
,
}

⚐ Response (default)

{
code: string ,
message:
{
lang: string ,
value: string ,
}
,
values:
[
{
key: string ,
value: string ,
}
,
]
,
}
JobSchedule_Patch (updated)
Description This replaces only the Job Schedule properties specified in the request. For example, if the schedule property is not specified with this request, then the Batch service will keep the existing schedule. Changes to a Job Schedule only impact Jobs created by the schedule after the update has taken place; currently running Jobs are unaffected.
Reference Link ¶

⚶ Changes

{
  "#id": "JobSchedule_Patch",
  "$parameters": {
    "jobSchedulePatchParameter": {
      "$properties": {
        "jobSpecification": [
          {
            "jobManagerTask": [
              {
                "#name": "authenticationTokenSettings",
                "Description": {
                  "new": "Warning: This object is deprecated and will be removed after September 30, 2024. Please see https://azure.microsoft.com/updates?id=azure-batch-task-authentication-token-will-be-retired-on-30-september-2024 for more information",
                  "old": "If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job."
                }
              }
            ]
          }
        ]
      }
    }
  }
}

⚼ Request

PATCH:  /jobschedules/{jobScheduleId}
{
jobScheduleId: string ,
jobSchedulePatchParameter:
{
schedule:
{
doNotRunUntil: string ,
doNotRunAfter: string ,
startWindow: string ,
recurrenceInterval: string ,
}
,
jobSpecification:
{
priority: integer ,
allowTaskPreemption: boolean ,
maxParallelTasks: integer ,
displayName: string ,
usesTaskDependencies: boolean ,
onAllTasksComplete: enum ,
onTaskFailure: enum ,
networkConfiguration:
{
subnetId: string ,
skipWithdrawFromVNet: boolean ,
}
,
constraints:
{
maxWallClockTime: string ,
maxTaskRetryCount: integer ,
}
,
jobManagerTask:
{
id: string ,
displayName: string ,
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 ,
}
,
]
,
constraints:
{
maxWallClockTime: string ,
retentionTime: string ,
maxTaskRetryCount: integer ,
}
,
requiredSlots: integer ,
killJobOnCompletion: boolean ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
runExclusive: boolean ,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
authenticationTokenSettings:
{
access:
[
string ,
]
,
}
,
allowLowPriorityNode: boolean ,
}
,
jobPreparationTask:
{
id: string ,
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 ,
}
,
]
,
constraints:
{
maxWallClockTime: string ,
retentionTime: string ,
maxTaskRetryCount: integer ,
}
,
waitForSuccess: boolean ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
rerunOnNodeRebootAfterSuccess: boolean ,
}
,
jobReleaseTask:
{
id: string ,
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 ,
}
,
]
,
maxWallClockTime: string ,
retentionTime: string ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
}
,
commonEnvironmentSettings:
[
{
name: string ,
value: string ,
}
,
]
,
poolInfo:
{
poolId: string ,
autoPoolSpecification:
{
autoPoolIdPrefix: string ,
poolLifetimeOption: enum ,
keepAlive: boolean ,
pool:
{
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 ,
managedDisk:
{
storageAccountType: enum ,
securityProfile:
{
securityEncryptionType: enum ,
}
,
}
,
diskSizeGB: integer ,
writeAcceleratorEnabled: boolean ,
}
,
securityProfile:
{
securityType: enum ,
encryptionAtHost: boolean ,
uefiSettings:
{
secureBootEnabled: boolean ,
vTpmEnabled: boolean ,
}
,
}
,
serviceArtifactReference:
{
id: string ,
}
,
}
,
taskSlotsPerNode: integer ,
taskSchedulingPolicy:
{
nodeFillType: enum ,
}
,
resizeTimeout: string ,
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 ,
}
,
certificateReferences:
[
{
thumbprint: string ,
thumbprintAlgorithm: string ,
storeLocation: enum ,
storeName: string ,
visibility:
[
string ,
]
,
}
,
]
,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
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 ,
}
,
}
,
resourceTags: object ,
}
,
}
,
}
,
metadata:
[
{
name: string ,
value: string ,
}
,
]
,
}
,
metadata:
[
{
name: string ,
value: string ,
}
,
]
,
}
,
timeout: integer ,
client-request-id: string ,
return-client-request-id: boolean ,
ocp-date: string ,
If-Match: string ,
If-None-Match: string ,
If-Modified-Since: string ,
If-Unmodified-Since: string ,
api-version: string ,
}

⚐ Response (200)

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

⚐ Response (default)

{
code: string ,
message:
{
lang: string ,
value: string ,
}
,
values:
[
{
key: string ,
value: string ,
}
,
]
,
}
JobSchedule_Update (updated)
Description This fully replaces all the updatable properties of the Job Schedule. For example, if the schedule property is not specified with this request, then the Batch service will remove the existing schedule. Changes to a Job Schedule only impact Jobs created by the schedule after the update has taken place; currently running Jobs are unaffected.
Reference Link ¶

⚶ Changes

{
  "#id": "JobSchedule_Update",
  "$parameters": {
    "jobScheduleUpdateParameter": {
      "$properties": {
        "jobSpecification": [
          {
            "jobManagerTask": [
              {
                "#name": "authenticationTokenSettings",
                "Description": {
                  "new": "Warning: This object is deprecated and will be removed after September 30, 2024. Please see https://azure.microsoft.com/updates?id=azure-batch-task-authentication-token-will-be-retired-on-30-september-2024 for more information",
                  "old": "If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job."
                }
              }
            ]
          }
        ]
      }
    }
  }
}

⚼ Request

PUT:  /jobschedules/{jobScheduleId}
{
jobScheduleId: string ,
jobScheduleUpdateParameter:
{
schedule:
{
doNotRunUntil: string ,
doNotRunAfter: string ,
startWindow: string ,
recurrenceInterval: string ,
}
,
jobSpecification:
{
priority: integer ,
allowTaskPreemption: boolean ,
maxParallelTasks: integer ,
displayName: string ,
usesTaskDependencies: boolean ,
onAllTasksComplete: enum ,
onTaskFailure: enum ,
networkConfiguration:
{
subnetId: string ,
skipWithdrawFromVNet: boolean ,
}
,
constraints:
{
maxWallClockTime: string ,
maxTaskRetryCount: integer ,
}
,
jobManagerTask:
{
id: string ,
displayName: string ,
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 ,
}
,
]
,
constraints:
{
maxWallClockTime: string ,
retentionTime: string ,
maxTaskRetryCount: integer ,
}
,
requiredSlots: integer ,
killJobOnCompletion: boolean ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
runExclusive: boolean ,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
authenticationTokenSettings:
{
access:
[
string ,
]
,
}
,
allowLowPriorityNode: boolean ,
}
,
jobPreparationTask:
{
id: string ,
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 ,
}
,
]
,
constraints:
{
maxWallClockTime: string ,
retentionTime: string ,
maxTaskRetryCount: integer ,
}
,
waitForSuccess: boolean ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
rerunOnNodeRebootAfterSuccess: boolean ,
}
,
jobReleaseTask:
{
id: string ,
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 ,
}
,
]
,
maxWallClockTime: string ,
retentionTime: string ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
}
,
commonEnvironmentSettings:
[
{
name: string ,
value: string ,
}
,
]
,
poolInfo:
{
poolId: string ,
autoPoolSpecification:
{
autoPoolIdPrefix: string ,
poolLifetimeOption: enum ,
keepAlive: boolean ,
pool:
{
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 ,
managedDisk:
{
storageAccountType: enum ,
securityProfile:
{
securityEncryptionType: enum ,
}
,
}
,
diskSizeGB: integer ,
writeAcceleratorEnabled: boolean ,
}
,
securityProfile:
{
securityType: enum ,
encryptionAtHost: boolean ,
uefiSettings:
{
secureBootEnabled: boolean ,
vTpmEnabled: boolean ,
}
,
}
,
serviceArtifactReference:
{
id: string ,
}
,
}
,
taskSlotsPerNode: integer ,
taskSchedulingPolicy:
{
nodeFillType: enum ,
}
,
resizeTimeout: string ,
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 ,
}
,
certificateReferences:
[
{
thumbprint: string ,
thumbprintAlgorithm: string ,
storeLocation: enum ,
storeName: string ,
visibility:
[
string ,
]
,
}
,
]
,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
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 ,
}
,
}
,
resourceTags: object ,
}
,
}
,
}
,
metadata:
[
{
name: string ,
value: string ,
}
,
]
,
}
,
metadata:
[
{
name: string ,
value: string ,
}
,
]
,
}
,
timeout: integer ,
client-request-id: string ,
return-client-request-id: boolean ,
ocp-date: string ,
If-Match: string ,
If-None-Match: string ,
If-Modified-Since: string ,
If-Unmodified-Since: string ,
api-version: string ,
}

⚐ Response (200)

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

⚐ Response (default)

{
code: string ,
message:
{
lang: string ,
value: string ,
}
,
values:
[
{
key: string ,
value: string ,
}
,
]
,
}
JobSchedule_Add (updated)
Description Adds a Job Schedule to the specified Account.
Reference Link ¶

⚶ Changes

{
  "#id": "JobSchedule_Add",
  "$parameters": {
    "cloudJobSchedule": {
      "$properties": {
        "jobSpecification": [
          {
            "jobManagerTask": [
              {
                "#name": "authenticationTokenSettings",
                "Description": {
                  "new": "Warning: This object is deprecated and will be removed after September 30, 2024. Please see https://azure.microsoft.com/updates?id=azure-batch-task-authentication-token-will-be-retired-on-30-september-2024 for more information",
                  "old": "If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job."
                }
              }
            ]
          }
        ]
      }
    }
  }
}

⚼ Request

POST:  /jobschedules
{
timeout: integer ,
cloudJobSchedule:
{
id: string ,
displayName: string ,
schedule:
{
doNotRunUntil: string ,
doNotRunAfter: string ,
startWindow: string ,
recurrenceInterval: string ,
}
,
jobSpecification:
{
priority: integer ,
allowTaskPreemption: boolean ,
maxParallelTasks: integer ,
displayName: string ,
usesTaskDependencies: boolean ,
onAllTasksComplete: enum ,
onTaskFailure: enum ,
networkConfiguration:
{
subnetId: string ,
skipWithdrawFromVNet: boolean ,
}
,
constraints:
{
maxWallClockTime: string ,
maxTaskRetryCount: integer ,
}
,
jobManagerTask:
{
id: string ,
displayName: string ,
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 ,
}
,
]
,
constraints:
{
maxWallClockTime: string ,
retentionTime: string ,
maxTaskRetryCount: integer ,
}
,
requiredSlots: integer ,
killJobOnCompletion: boolean ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
runExclusive: boolean ,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
authenticationTokenSettings:
{
access:
[
string ,
]
,
}
,
allowLowPriorityNode: boolean ,
}
,
jobPreparationTask:
{
id: string ,
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 ,
}
,
]
,
constraints:
{
maxWallClockTime: string ,
retentionTime: string ,
maxTaskRetryCount: integer ,
}
,
waitForSuccess: boolean ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
rerunOnNodeRebootAfterSuccess: boolean ,
}
,
jobReleaseTask:
{
id: string ,
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 ,
}
,
]
,
maxWallClockTime: string ,
retentionTime: string ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
}
,
commonEnvironmentSettings:
[
{
name: string ,
value: string ,
}
,
]
,
poolInfo:
{
poolId: string ,
autoPoolSpecification:
{
autoPoolIdPrefix: string ,
poolLifetimeOption: enum ,
keepAlive: boolean ,
pool:
{
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 ,
managedDisk:
{
storageAccountType: enum ,
securityProfile:
{
securityEncryptionType: enum ,
}
,
}
,
diskSizeGB: integer ,
writeAcceleratorEnabled: boolean ,
}
,
securityProfile:
{
securityType: enum ,
encryptionAtHost: boolean ,
uefiSettings:
{
secureBootEnabled: boolean ,
vTpmEnabled: boolean ,
}
,
}
,
serviceArtifactReference:
{
id: string ,
}
,
}
,
taskSlotsPerNode: integer ,
taskSchedulingPolicy:
{
nodeFillType: enum ,
}
,
resizeTimeout: string ,
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 ,
}
,
certificateReferences:
[
{
thumbprint: string ,
thumbprintAlgorithm: string ,
storeLocation: enum ,
storeName: string ,
visibility:
[
string ,
]
,
}
,
]
,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
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 ,
}
,
}
,
resourceTags: object ,
}
,
}
,
}
,
metadata:
[
{
name: string ,
value: string ,
}
,
]
,
}
,
metadata:
[
{
name: string ,
value: string ,
}
,
]
,
}
,
client-request-id: string ,
return-client-request-id: boolean ,
ocp-date: string ,
api-version: string ,
}

⚐ Response (201)

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

⚐ Response (default)

{
code: string ,
message:
{
lang: string ,
value: string ,
}
,
values:
[
{
key: string ,
value: string ,
}
,
]
,
}
JobSchedule_List (updated)
Description Lists all of the Job Schedules in the specified Account.
Reference Link ¶

⚶ Changes

{
  "#id": "JobSchedule_List",
  "$responses": {
    "200": {
      "$properties": {
        "value": {
          "$properties": {
            "jobSpecification": [
              {
                "jobManagerTask": [
                  {
                    "#name": "authenticationTokenSettings",
                    "Description": {
                      "new": "Warning: This object is deprecated and will be removed after September 30, 2024. Please see https://azure.microsoft.com/updates?id=azure-batch-task-authentication-token-will-be-retired-on-30-september-2024 for more information",
                      "old": "If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job."
                    }
                  }
                ]
              }
            ]
          }
        }
      }
    }
  }
}

⚼ Request

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

⚐ Response (200)

{
$headers:
{
client-request-id: string ,
request-id: string ,
etag: string ,
last-modified: string ,
}
,
$schema:
{
value:
[
{
id: string ,
displayName: string ,
url: string ,
eTag: string ,
lastModified: string ,
creationTime: string ,
state: enum ,
stateTransitionTime: string ,
previousState: enum ,
previousStateTransitionTime: string ,
schedule:
{
doNotRunUntil: string ,
doNotRunAfter: string ,
startWindow: string ,
recurrenceInterval: string ,
}
,
jobSpecification:
{
priority: integer ,
allowTaskPreemption: boolean ,
maxParallelTasks: integer ,
displayName: string ,
usesTaskDependencies: boolean ,
onAllTasksComplete: enum ,
onTaskFailure: enum ,
networkConfiguration:
{
subnetId: string ,
skipWithdrawFromVNet: boolean ,
}
,
constraints:
{
maxWallClockTime: string ,
maxTaskRetryCount: integer ,
}
,
jobManagerTask:
{
id: string ,
displayName: string ,
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 ,
}
,
]
,
constraints:
{
maxWallClockTime: string ,
retentionTime: string ,
maxTaskRetryCount: integer ,
}
,
requiredSlots: integer ,
killJobOnCompletion: boolean ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
runExclusive: boolean ,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
authenticationTokenSettings:
{
access:
[
string ,
]
,
}
,
allowLowPriorityNode: boolean ,
}
,
jobPreparationTask:
{
id: string ,
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 ,
}
,
]
,
constraints:
{
maxWallClockTime: string ,
retentionTime: string ,
maxTaskRetryCount: integer ,
}
,
waitForSuccess: boolean ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
rerunOnNodeRebootAfterSuccess: boolean ,
}
,
jobReleaseTask:
{
id: string ,
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 ,
}
,
]
,
maxWallClockTime: string ,
retentionTime: string ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
}
,
commonEnvironmentSettings:
[
{
name: string ,
value: string ,
}
,
]
,
poolInfo:
{
poolId: string ,
autoPoolSpecification:
{
autoPoolIdPrefix: string ,
poolLifetimeOption: enum ,
keepAlive: boolean ,
pool:
{
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 ,
managedDisk:
{
storageAccountType: enum ,
securityProfile:
{
securityEncryptionType: enum ,
}
,
}
,
diskSizeGB: integer ,
writeAcceleratorEnabled: boolean ,
}
,
securityProfile:
{
securityType: enum ,
encryptionAtHost: boolean ,
uefiSettings:
{
secureBootEnabled: boolean ,
vTpmEnabled: boolean ,
}
,
}
,
serviceArtifactReference:
{
id: string ,
}
,
}
,
taskSlotsPerNode: integer ,
taskSchedulingPolicy:
{
nodeFillType: enum ,
}
,
resizeTimeout: string ,
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 ,
}
,
certificateReferences:
[
{
thumbprint: string ,
thumbprintAlgorithm: string ,
storeLocation: enum ,
storeName: string ,
visibility:
[
string ,
]
,
}
,
]
,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
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 ,
}
,
}
,
resourceTags: object ,
}
,
}
,
}
,
metadata:
[
{
name: string ,
value: string ,
}
,
]
,
}
,
executionInfo:
{
nextRunTime: string ,
recentJob:
{
id: string ,
url: string ,
}
,
endTime: string ,
}
,
metadata:
[
{
name: string ,
value: string ,
}
,
]
,
stats:
{
url: string ,
startTime: string ,
lastUpdateTime: string ,
userCPUTime: string ,
kernelCPUTime: string ,
wallClockTime: string ,
readIOps: integer ,
writeIOps: integer ,
readIOGiB: number ,
writeIOGiB: number ,
numSucceededTasks: integer ,
numFailedTasks: integer ,
numTaskRetries: integer ,
waitTime: string ,
}
,
}
,
]
,
odata.nextLink: string ,
}
,
}

⚐ Response (default)

{
code: string ,
message:
{
lang: string ,
value: string ,
}
,
values:
[
{
key: string ,
value: string ,
}
,
]
,
}
Job_Get (updated)
Description Gets information about the specified Job.
Reference Link ¶

⚶ Changes

{
  "#id": "Job_Get",
  "$responses": {
    "200": {
      "$properties": {
        "jobManagerTask": [
          {
            "#name": "authenticationTokenSettings",
            "Description": {
              "new": "Warning: This object is deprecated and will be removed after September 30, 2024. Please see https://azure.microsoft.com/updates?id=azure-batch-task-authentication-token-will-be-retired-on-30-september-2024 for more information",
              "old": "If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job."
            }
          }
        ]
      }
    }
  }
}

⚼ Request

GET:  /jobs/{jobId}
{
jobId: string ,
$select: string ,
$expand: string ,
timeout: integer ,
client-request-id: string ,
return-client-request-id: boolean ,
ocp-date: string ,
If-Match: string ,
If-None-Match: string ,
If-Modified-Since: string ,
If-Unmodified-Since: string ,
api-version: string ,
}

⚐ Response (200)

{
$headers:
{
client-request-id: string ,
request-id: string ,
etag: string ,
last-modified: string ,
}
,
$schema:
{
id: string ,
displayName: string ,
usesTaskDependencies: boolean ,
url: string ,
eTag: string ,
lastModified: string ,
creationTime: string ,
state: enum ,
stateTransitionTime: string ,
previousState: enum ,
previousStateTransitionTime: string ,
priority: integer ,
allowTaskPreemption: boolean ,
maxParallelTasks: integer ,
constraints:
{
maxWallClockTime: string ,
maxTaskRetryCount: integer ,
}
,
jobManagerTask:
{
id: string ,
displayName: string ,
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 ,
}
,
]
,
constraints:
{
maxWallClockTime: string ,
retentionTime: string ,
maxTaskRetryCount: integer ,
}
,
requiredSlots: integer ,
killJobOnCompletion: boolean ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
runExclusive: boolean ,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
authenticationTokenSettings:
{
access:
[
string ,
]
,
}
,
allowLowPriorityNode: boolean ,
}
,
jobPreparationTask:
{
id: string ,
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 ,
}
,
]
,
constraints:
{
maxWallClockTime: string ,
retentionTime: string ,
maxTaskRetryCount: integer ,
}
,
waitForSuccess: boolean ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
rerunOnNodeRebootAfterSuccess: boolean ,
}
,
jobReleaseTask:
{
id: string ,
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 ,
}
,
]
,
maxWallClockTime: string ,
retentionTime: string ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
}
,
commonEnvironmentSettings:
[
{
name: string ,
value: string ,
}
,
]
,
poolInfo:
{
poolId: string ,
autoPoolSpecification:
{
autoPoolIdPrefix: string ,
poolLifetimeOption: enum ,
keepAlive: boolean ,
pool:
{
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 ,
managedDisk:
{
storageAccountType: enum ,
securityProfile:
{
securityEncryptionType: enum ,
}
,
}
,
diskSizeGB: integer ,
writeAcceleratorEnabled: boolean ,
}
,
securityProfile:
{
securityType: enum ,
encryptionAtHost: boolean ,
uefiSettings:
{
secureBootEnabled: boolean ,
vTpmEnabled: boolean ,
}
,
}
,
serviceArtifactReference:
{
id: string ,
}
,
}
,
taskSlotsPerNode: integer ,
taskSchedulingPolicy:
{
nodeFillType: enum ,
}
,
resizeTimeout: string ,
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 ,
}
,
certificateReferences:
[
{
thumbprint: string ,
thumbprintAlgorithm: string ,
storeLocation: enum ,
storeName: string ,
visibility:
[
string ,
]
,
}
,
]
,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
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 ,
}
,
}
,
resourceTags: object ,
}
,
}
,
}
,
onAllTasksComplete: enum ,
onTaskFailure: enum ,
networkConfiguration:
{
subnetId: string ,
skipWithdrawFromVNet: boolean ,
}
,
metadata:
[
{
name: string ,
value: string ,
}
,
]
,
executionInfo:
{
startTime: string ,
endTime: string ,
poolId: string ,
schedulingError:
{
category: enum ,
code: string ,
message: string ,
details:
[
{
name: string ,
value: string ,
}
,
]
,
}
,
terminateReason: string ,
}
,
stats:
{
url: string ,
startTime: string ,
lastUpdateTime: string ,
userCPUTime: string ,
kernelCPUTime: string ,
wallClockTime: string ,
readIOps: integer ,
writeIOps: integer ,
readIOGiB: number ,
writeIOGiB: number ,
numSucceededTasks: integer ,
numFailedTasks: integer ,
numTaskRetries: integer ,
waitTime: string ,
}
,
}
,
}

⚐ Response (default)

{
code: string ,
message:
{
lang: string ,
value: string ,
}
,
values:
[
{
key: string ,
value: string ,
}
,
]
,
}
Job_Add (updated)
Description The Batch service supports two ways to control the work done as part of a Job. In the first approach, the user specifies a Job Manager Task. The Batch service launches this Task when it is ready to start the Job. The Job Manager Task controls all other Tasks that run under this Job, by using the Task APIs. In the second approach, the user directly controls the execution of Tasks under an active Job, by using the Task APIs. Also note: when naming Jobs, 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": "Job_Add",
  "$parameters": {
    "job": {
      "$properties": {
        "jobManagerTask": [
          {
            "#name": "authenticationTokenSettings",
            "Description": {
              "new": "Warning: This object is deprecated and will be removed after September 30, 2024. Please see https://azure.microsoft.com/updates?id=azure-batch-task-authentication-token-will-be-retired-on-30-september-2024 for more information",
              "old": "If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job."
            }
          }
        ]
      }
    }
  }
}

⚼ Request

POST:  /jobs
{
job:
{
id: string ,
displayName: string ,
priority: integer ,
maxParallelTasks: integer ,
allowTaskPreemption: boolean ,
constraints:
{
maxWallClockTime: string ,
maxTaskRetryCount: integer ,
}
,
jobManagerTask:
{
id: string ,
displayName: string ,
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 ,
}
,
]
,
constraints:
{
maxWallClockTime: string ,
retentionTime: string ,
maxTaskRetryCount: integer ,
}
,
requiredSlots: integer ,
killJobOnCompletion: boolean ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
runExclusive: boolean ,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
authenticationTokenSettings:
{
access:
[
string ,
]
,
}
,
allowLowPriorityNode: boolean ,
}
,
jobPreparationTask:
{
id: string ,
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 ,
}
,
]
,
constraints:
{
maxWallClockTime: string ,
retentionTime: string ,
maxTaskRetryCount: integer ,
}
,
waitForSuccess: boolean ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
rerunOnNodeRebootAfterSuccess: boolean ,
}
,
jobReleaseTask:
{
id: string ,
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 ,
}
,
]
,
maxWallClockTime: string ,
retentionTime: string ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
}
,
commonEnvironmentSettings:
[
{
name: string ,
value: string ,
}
,
]
,
poolInfo:
{
poolId: string ,
autoPoolSpecification:
{
autoPoolIdPrefix: string ,
poolLifetimeOption: enum ,
keepAlive: boolean ,
pool:
{
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 ,
managedDisk:
{
storageAccountType: enum ,
securityProfile:
{
securityEncryptionType: enum ,
}
,
}
,
diskSizeGB: integer ,
writeAcceleratorEnabled: boolean ,
}
,
securityProfile:
{
securityType: enum ,
encryptionAtHost: boolean ,
uefiSettings:
{
secureBootEnabled: boolean ,
vTpmEnabled: boolean ,
}
,
}
,
serviceArtifactReference:
{
id: string ,
}
,
}
,
taskSlotsPerNode: integer ,
taskSchedulingPolicy:
{
nodeFillType: enum ,
}
,
resizeTimeout: string ,
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 ,
}
,
certificateReferences:
[
{
thumbprint: string ,
thumbprintAlgorithm: string ,
storeLocation: enum ,
storeName: string ,
visibility:
[
string ,
]
,
}
,
]
,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
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 ,
}
,
}
,
resourceTags: object ,
}
,
}
,
}
,
onAllTasksComplete: enum ,
onTaskFailure: enum ,
metadata:
[
{
name: string ,
value: string ,
}
,
]
,
usesTaskDependencies: boolean ,
networkConfiguration:
{
subnetId: string ,
skipWithdrawFromVNet: boolean ,
}
,
}
,
timeout: integer ,
client-request-id: string ,
return-client-request-id: boolean ,
ocp-date: string ,
api-version: string ,
}

⚐ Response (201)

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

⚐ Response (default)

{
code: string ,
message:
{
lang: string ,
value: string ,
}
,
values:
[
{
key: string ,
value: string ,
}
,
]
,
}
Job_List (updated)
Description Lists all of the Jobs in the specified Account.
Reference Link ¶

⚶ Changes

{
  "#id": "Job_List",
  "$responses": {
    "200": {
      "$properties": {
        "value": {
          "$properties": {
            "jobManagerTask": [
              {
                "#name": "authenticationTokenSettings",
                "Description": {
                  "new": "Warning: This object is deprecated and will be removed after September 30, 2024. Please see https://azure.microsoft.com/updates?id=azure-batch-task-authentication-token-will-be-retired-on-30-september-2024 for more information",
                  "old": "If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job."
                }
              }
            ]
          }
        }
      }
    }
  }
}

⚼ Request

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

⚐ Response (200)

{
$headers:
{
client-request-id: string ,
request-id: string ,
etag: string ,
last-modified: string ,
}
,
$schema:
{
value:
[
{
id: string ,
displayName: string ,
usesTaskDependencies: boolean ,
url: string ,
eTag: string ,
lastModified: string ,
creationTime: string ,
state: enum ,
stateTransitionTime: string ,
previousState: enum ,
previousStateTransitionTime: string ,
priority: integer ,
allowTaskPreemption: boolean ,
maxParallelTasks: integer ,
constraints:
{
maxWallClockTime: string ,
maxTaskRetryCount: integer ,
}
,
jobManagerTask:
{
id: string ,
displayName: string ,
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 ,
}
,
]
,
constraints:
{
maxWallClockTime: string ,
retentionTime: string ,
maxTaskRetryCount: integer ,
}
,
requiredSlots: integer ,
killJobOnCompletion: boolean ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
runExclusive: boolean ,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
authenticationTokenSettings:
{
access:
[
string ,
]
,
}
,
allowLowPriorityNode: boolean ,
}
,
jobPreparationTask:
{
id: string ,
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 ,
}
,
]
,
constraints:
{
maxWallClockTime: string ,
retentionTime: string ,
maxTaskRetryCount: integer ,
}
,
waitForSuccess: boolean ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
rerunOnNodeRebootAfterSuccess: boolean ,
}
,
jobReleaseTask:
{
id: string ,
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 ,
}
,
]
,
maxWallClockTime: string ,
retentionTime: string ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
}
,
commonEnvironmentSettings:
[
{
name: string ,
value: string ,
}
,
]
,
poolInfo:
{
poolId: string ,
autoPoolSpecification:
{
autoPoolIdPrefix: string ,
poolLifetimeOption: enum ,
keepAlive: boolean ,
pool:
{
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 ,
managedDisk:
{
storageAccountType: enum ,
securityProfile:
{
securityEncryptionType: enum ,
}
,
}
,
diskSizeGB: integer ,
writeAcceleratorEnabled: boolean ,
}
,
securityProfile:
{
securityType: enum ,
encryptionAtHost: boolean ,
uefiSettings:
{
secureBootEnabled: boolean ,
vTpmEnabled: boolean ,
}
,
}
,
serviceArtifactReference:
{
id: string ,
}
,
}
,
taskSlotsPerNode: integer ,
taskSchedulingPolicy:
{
nodeFillType: enum ,
}
,
resizeTimeout: string ,
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 ,
}
,
certificateReferences:
[
{
thumbprint: string ,
thumbprintAlgorithm: string ,
storeLocation: enum ,
storeName: string ,
visibility:
[
string ,
]
,
}
,
]
,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
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 ,
}
,
}
,
resourceTags: object ,
}
,
}
,
}
,
onAllTasksComplete: enum ,
onTaskFailure: enum ,
networkConfiguration:
{
subnetId: string ,
skipWithdrawFromVNet: boolean ,
}
,
metadata:
[
{
name: string ,
value: string ,
}
,
]
,
executionInfo:
{
startTime: string ,
endTime: string ,
poolId: string ,
schedulingError:
{
category: enum ,
code: string ,
message: string ,
details:
[
{
name: string ,
value: string ,
}
,
]
,
}
,
terminateReason: string ,
}
,
stats:
{
url: string ,
startTime: string ,
lastUpdateTime: string ,
userCPUTime: string ,
kernelCPUTime: string ,
wallClockTime: string ,
readIOps: integer ,
writeIOps: integer ,
readIOGiB: number ,
writeIOGiB: number ,
numSucceededTasks: integer ,
numFailedTasks: integer ,
numTaskRetries: integer ,
waitTime: string ,
}
,
}
,
]
,
odata.nextLink: string ,
}
,
}

⚐ Response (default)

{
code: string ,
message:
{
lang: string ,
value: string ,
}
,
values:
[
{
key: string ,
value: string ,
}
,
]
,
}
Job_ListFromJobSchedule (updated)
Description Lists the Jobs that have been created under the specified Job Schedule.
Reference Link ¶

⚶ Changes

{
  "#id": "Job_ListFromJobSchedule",
  "$responses": {
    "200": {
      "$properties": {
        "value": {
          "$properties": {
            "jobManagerTask": [
              {
                "#name": "authenticationTokenSettings",
                "Description": {
                  "new": "Warning: This object is deprecated and will be removed after September 30, 2024. Please see https://azure.microsoft.com/updates?id=azure-batch-task-authentication-token-will-be-retired-on-30-september-2024 for more information",
                  "old": "If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job."
                }
              }
            ]
          }
        }
      }
    }
  }
}

⚼ Request

GET:  /jobschedules/{jobScheduleId}/jobs
{
jobScheduleId: string ,
$filter: string ,
$select: string ,
$expand: string ,
maxresults: integer ,
timeout: integer ,
client-request-id: string ,
return-client-request-id: boolean ,
ocp-date: string ,
api-version: string ,
}

⚐ Response (200)

{
$headers:
{
client-request-id: string ,
request-id: string ,
etag: string ,
last-modified: string ,
}
,
$schema:
{
value:
[
{
id: string ,
displayName: string ,
usesTaskDependencies: boolean ,
url: string ,
eTag: string ,
lastModified: string ,
creationTime: string ,
state: enum ,
stateTransitionTime: string ,
previousState: enum ,
previousStateTransitionTime: string ,
priority: integer ,
allowTaskPreemption: boolean ,
maxParallelTasks: integer ,
constraints:
{
maxWallClockTime: string ,
maxTaskRetryCount: integer ,
}
,
jobManagerTask:
{
id: string ,
displayName: string ,
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 ,
}
,
]
,
constraints:
{
maxWallClockTime: string ,
retentionTime: string ,
maxTaskRetryCount: integer ,
}
,
requiredSlots: integer ,
killJobOnCompletion: boolean ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
runExclusive: boolean ,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
authenticationTokenSettings:
{
access:
[
string ,
]
,
}
,
allowLowPriorityNode: boolean ,
}
,
jobPreparationTask:
{
id: string ,
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 ,
}
,
]
,
constraints:
{
maxWallClockTime: string ,
retentionTime: string ,
maxTaskRetryCount: integer ,
}
,
waitForSuccess: boolean ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
rerunOnNodeRebootAfterSuccess: boolean ,
}
,
jobReleaseTask:
{
id: string ,
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 ,
}
,
]
,
maxWallClockTime: string ,
retentionTime: string ,
userIdentity:
{
username: string ,
autoUser:
{
scope: enum ,
elevationLevel: enum ,
}
,
}
,
}
,
commonEnvironmentSettings:
[
{
name: string ,
value: string ,
}
,
]
,
poolInfo:
{
poolId: string ,
autoPoolSpecification:
{
autoPoolIdPrefix: string ,
poolLifetimeOption: enum ,
keepAlive: boolean ,
pool:
{
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 ,
managedDisk:
{
storageAccountType: enum ,
securityProfile:
{
securityEncryptionType: enum ,
}
,
}
,
diskSizeGB: integer ,
writeAcceleratorEnabled: boolean ,
}
,
securityProfile:
{
securityType: enum ,
encryptionAtHost: boolean ,
uefiSettings:
{
secureBootEnabled: boolean ,
vTpmEnabled: boolean ,
}
,
}
,
serviceArtifactReference:
{
id: string ,
}
,
}
,
taskSlotsPerNode: integer ,
taskSchedulingPolicy:
{
nodeFillType: enum ,
}
,
resizeTimeout: string ,
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 ,
}
,
certificateReferences:
[
{
thumbprint: string ,
thumbprintAlgorithm: string ,
storeLocation: enum ,
storeName: string ,
visibility:
[
string ,
]
,
}
,
]
,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
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 ,
}
,
}
,
resourceTags: object ,
}
,
}
,
}
,
onAllTasksComplete: enum ,
onTaskFailure: enum ,
networkConfiguration:
{
subnetId: string ,
skipWithdrawFromVNet: boolean ,
}
,
metadata:
[
{
name: string ,
value: string ,
}
,
]
,
executionInfo:
{
startTime: string ,
endTime: string ,
poolId: string ,
schedulingError:
{
category: enum ,
code: string ,
message: string ,
details:
[
{
name: string ,
value: string ,
}
,
]
,
}
,
terminateReason: string ,
}
,
stats:
{
url: string ,
startTime: string ,
lastUpdateTime: string ,
userCPUTime: string ,
kernelCPUTime: string ,
wallClockTime: string ,
readIOps: integer ,
writeIOps: integer ,
readIOGiB: number ,
writeIOGiB: number ,
numSucceededTasks: integer ,
numFailedTasks: integer ,
numTaskRetries: integer ,
waitTime: string ,
}
,
}
,
]
,
odata.nextLink: string ,
}
,
}

⚐ Response (default)

{
code: string ,
message:
{
lang: string ,
value: string ,
}
,
values:
[
{
key: string ,
value: string ,
}
,
]
,
}
Task_Add (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": "Task_Add",
  "$parameters": {
    "task": {
      "$properties": [
        {
          "#name": "authenticationTokenSettings",
          "Description": {
            "new": "Warning: This object is deprecated and will be removed after September 30, 2024. Please see https://azure.microsoft.com/updates?id=azure-batch-task-authentication-token-will-be-retired-on-30-september-2024 for more information",
            "old": "If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job."
          }
        }
      ]
    }
  }
}

⚼ Request

POST:  /jobs/{jobId}/tasks
{
jobId: string ,
task:
{
id: string ,
displayName: string ,
commandLine: string ,
containerSettings:
{
containerRunOptions: string ,
imageName: string ,
registry:
{
username: string ,
password: string ,
registryServer: string ,
identityReference:
{
resourceId: string ,
}
,
}
,
workingDirectory: enum ,
containerHostBatchBindMounts:
[
{
source: enum ,
isReadOnly: boolean ,
}
,
]
,
}
,
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 ,
}
,
}
,
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 ,
]
,
}
,
}
,
timeout: integer ,
client-request-id: string ,
return-client-request-id: boolean ,
ocp-date: string ,
api-version: string ,
}

⚐ Response (201)

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

⚐ Response (default)

{
code: string ,
message:
{
lang: string ,
value: string ,
}
,
values:
[
{
key: string ,
value: string ,
}
,
]
,
}
Task_List (updated)
Description For multi-instance Tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary Task. Use the list subtasks API to retrieve information about subtasks.
Reference Link ¶

⚶ Changes

{
  "#id": "Task_List",
  "$responses": {
    "200": {
      "$properties": {
        "value": {
          "$properties": [
            {
              "#name": "authenticationTokenSettings",
              "Description": {
                "new": "Warning: This object is deprecated and will be removed after September 30, 2024. Please see https://azure.microsoft.com/updates?id=azure-batch-task-authentication-token-will-be-retired-on-30-september-2024 for more information",
                "old": "If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job."
              }
            }
          ]
        }
      }
    }
  }
}

⚼ Request

GET:  /jobs/{jobId}/tasks
{
jobId: string ,
$filter: string ,
$select: string ,
$expand: string ,
maxresults: integer ,
timeout: integer ,
client-request-id: string ,
return-client-request-id: boolean ,
ocp-date: string ,
api-version: string ,
}

⚐ Response (200)

{
$headers:
{
client-request-id: string ,
request-id: string ,
etag: string ,
last-modified: string ,
}
,
$schema:
{
value:
[
{
id: string ,
displayName: string ,
url: string ,
eTag: string ,
lastModified: string ,
creationTime: 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 ,
}
,
}
,
state: enum ,
stateTransitionTime: string ,
previousState: enum ,
previousStateTransitionTime: string ,
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 ,
}
,
}
,
executionInfo:
{
startTime: string ,
endTime: string ,
exitCode: integer ,
containerInfo:
{
containerId: string ,
state: string ,
error: string ,
}
,
failureInfo:
{
category: enum ,
code: string ,
message: string ,
details:
[
{
name: string ,
value: string ,
}
,
]
,
}
,
retryCount: integer ,
lastRetryTime: string ,
requeueCount: integer ,
lastRequeueTime: string ,
result: enum ,
}
,
nodeInfo:
{
affinityId: string ,
nodeUrl: string ,
poolId: string ,
nodeId: string ,
taskRootDirectory: string ,
taskRootDirectoryUrl: string ,
}
,
multiInstanceSettings:
{
numberOfInstances: integer ,
coordinationCommandLine: string ,
commonResourceFiles:
[
{
autoStorageContainerName: string ,
storageContainerUrl: string ,
httpUrl: string ,
blobPrefix: string ,
filePath: string ,
fileMode: string ,
identityReference:
{
resourceId: string ,
}
,
}
,
]
,
}
,
stats:
{
url: string ,
startTime: string ,
lastUpdateTime: string ,
userCPUTime: string ,
kernelCPUTime: string ,
wallClockTime: string ,
readIOps: integer ,
writeIOps: integer ,
readIOGiB: number ,
writeIOGiB: number ,
waitTime: string ,
}
,
dependsOn:
{
taskIds:
[
string ,
]
,
taskIdRanges:
[
{
start: integer ,
end: integer ,
}
,
]
,
}
,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
authenticationTokenSettings:
{
access:
[
string ,
]
,
}
,
}
,
]
,
odata.nextLink: string ,
}
,
}

⚐ Response (default)

{
code: string ,
message:
{
lang: string ,
value: string ,
}
,
values:
[
{
key: string ,
value: string ,
}
,
]
,
}
Task_AddCollection (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": "Task_AddCollection",
  "$parameters": {
    "taskCollection": {
      "$properties": {
        "value": {
          "$properties": [
            {
              "#name": "authenticationTokenSettings",
              "Description": {
                "new": "Warning: This object is deprecated and will be removed after September 30, 2024. Please see https://azure.microsoft.com/updates?id=azure-batch-task-authentication-token-will-be-retired-on-30-september-2024 for more information",
                "old": "If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job."
              }
            }
          ]
        }
      }
    }
  }
}

⚼ Request

POST:  /jobs/{jobId}/addtaskcollection
{
jobId: string ,
taskCollection:
{
value:
[
{
id: string ,
displayName: string ,
commandLine: string ,
containerSettings:
{
containerRunOptions: string ,
imageName: string ,
registry:
{
username: string ,
password: string ,
registryServer: string ,
identityReference:
{
resourceId: string ,
}
,
}
,
workingDirectory: enum ,
containerHostBatchBindMounts:
[
{
source: enum ,
isReadOnly: boolean ,
}
,
]
,
}
,
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 ,
}
,
}
,
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 ,
]
,
}
,
}
,
]
,
}
,
timeout: integer ,
client-request-id: string ,
return-client-request-id: boolean ,
ocp-date: string ,
api-version: string ,
}

⚐ Response (200)

{
$headers:
{
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 ,
}
,
]
,
}
Task_Get (updated)
Description For multi-instance Tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary Task. Use the list subtasks API to retrieve information about subtasks.
Reference Link ¶

⚶ Changes

{
  "#id": "Task_Get",
  "$responses": {
    "200": {
      "$properties": [
        {
          "#name": "authenticationTokenSettings",
          "Description": {
            "new": "Warning: This object is deprecated and will be removed after September 30, 2024. Please see https://azure.microsoft.com/updates?id=azure-batch-task-authentication-token-will-be-retired-on-30-september-2024 for more information",
            "old": "If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job."
          }
        }
      ]
    }
  }
}

⚼ Request

GET:  /jobs/{jobId}/tasks/{taskId}
{
jobId: string ,
taskId: string ,
$select: string ,
$expand: string ,
timeout: integer ,
client-request-id: string ,
return-client-request-id: boolean ,
ocp-date: string ,
If-Match: string ,
If-None-Match: string ,
If-Modified-Since: string ,
If-Unmodified-Since: string ,
api-version: string ,
}

⚐ Response (200)

{
$headers:
{
client-request-id: string ,
request-id: string ,
etag: string ,
last-modified: string ,
dataserviceid: string ,
}
,
$schema:
{
id: string ,
displayName: string ,
url: string ,
eTag: string ,
lastModified: string ,
creationTime: 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 ,
}
,
}
,
state: enum ,
stateTransitionTime: string ,
previousState: enum ,
previousStateTransitionTime: string ,
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 ,
}
,
}
,
executionInfo:
{
startTime: string ,
endTime: string ,
exitCode: integer ,
containerInfo:
{
containerId: string ,
state: string ,
error: string ,
}
,
failureInfo:
{
category: enum ,
code: string ,
message: string ,
details:
[
{
name: string ,
value: string ,
}
,
]
,
}
,
retryCount: integer ,
lastRetryTime: string ,
requeueCount: integer ,
lastRequeueTime: string ,
result: enum ,
}
,
nodeInfo:
{
affinityId: string ,
nodeUrl: string ,
poolId: string ,
nodeId: string ,
taskRootDirectory: string ,
taskRootDirectoryUrl: string ,
}
,
multiInstanceSettings:
{
numberOfInstances: integer ,
coordinationCommandLine: string ,
commonResourceFiles:
[
{
autoStorageContainerName: string ,
storageContainerUrl: string ,
httpUrl: string ,
blobPrefix: string ,
filePath: string ,
fileMode: string ,
identityReference:
{
resourceId: string ,
}
,
}
,
]
,
}
,
stats:
{
url: string ,
startTime: string ,
lastUpdateTime: string ,
userCPUTime: string ,
kernelCPUTime: string ,
wallClockTime: string ,
readIOps: integer ,
writeIOps: integer ,
readIOGiB: number ,
writeIOGiB: number ,
waitTime: string ,
}
,
dependsOn:
{
taskIds:
[
string ,
]
,
taskIdRanges:
[
{
start: integer ,
end: integer ,
}
,
]
,
}
,
applicationPackageReferences:
[
{
applicationId: string ,
version: string ,
}
,
]
,
authenticationTokenSettings:
{
access:
[
string ,
]
,
}
,
}
,
}

⚐ Response (default)

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