BatchClient Class
- java.
lang. Object - com.
azure. compute. batch. BatchClient
- com.
public final class BatchClient
Initializes a new instance of the synchronous BatchClient type.
Method Summary
Methods inherited from java.lang.Object
Method Details
beginDeallocateNode
public SyncPoller<BatchNode,BatchNode> beginDeallocateNode(String poolId, String nodeId)
Deallocates the specified Compute Node. You can deallocate a Compute Node only if it is in an idle or running state.
Parameters:
Returns:
beginDeallocateNode
public SyncPoller<BatchNode,BatchNode> beginDeallocateNode(String poolId, String nodeId, BatchNodeDeallocateOptions options)
Deallocates the specified Compute Node. You can deallocate a Compute Node only if it is in an idle or running state.
Parameters:
Returns:
beginDeleteCertificate
public SyncPoller<BatchCertificate,Void> beginDeleteCertificate(String thumbprintAlgorithm, String thumbprint)
Deletes a Certificate from the specified Account. You cannot delete a Certificate if a resource (Pool or Compute Node) is using it. Before you can delete a Certificate, you must therefore make sure that the Certificate is not associated with any existing Pools, the Certificate is not installed on any Nodes (even if you remove a Certificate from a Pool, it is not removed from existing Compute Nodes in that Pool until they restart), and no running Tasks depend on the Certificate. If you try to delete a Certificate that is in use, the deletion fails. The Certificate status changes to deleteFailed. You can use Cancel Delete Certificate to set the status back to active if you decide that you want to continue using the Certificate.
Parameters:
Returns:
null upon successful deletion.beginDeleteCertificate
public SyncPoller<BatchCertificate,Void> beginDeleteCertificate(String thumbprintAlgorithm, String thumbprint, BatchCertificateDeleteOptions options)
Deletes a Certificate from the specified Account. You cannot delete a Certificate if a resource (Pool or Compute Node) is using it. Before you can delete a Certificate, you must therefore make sure that the Certificate is not associated with any existing Pools, the Certificate is not installed on any Nodes (even if you remove a Certificate from a Pool, it is not removed from existing Compute Nodes in that Pool until they restart), and no running Tasks depend on the Certificate. If you try to delete a Certificate that is in use, the deletion fails. The Certificate status changes to deleteFailed. You can use Cancel Delete Certificate to set the status back to active if you decide that you want to continue using the Certificate.
Parameters:
Returns:
null upon successful deletion.beginDeleteJob
public SyncPoller<BatchJob,Void> beginDeleteJob(String jobId)
Deletes a Job. Deleting a Job also deletes all Tasks that are part of that Job, and all Job statistics. This also overrides the retention period for Task data; that is, if the Job contains Tasks which are still retained on Compute Nodes, the Batch services deletes those Tasks' working directories and all their contents. When a Delete Job request is received, the Batch service sets the Job to the deleting state. All update operations on a Job that is in deleting state will fail with status code 409 (Conflict), with additional information indicating that the Job is being deleted.
Parameters:
Returns:
null upon successful deletion.beginDeleteJob
public SyncPoller<BatchJob,Void> beginDeleteJob(String jobId, BatchJobDeleteOptions options, RequestConditions requestConditions)
Deletes a Job. Deleting a Job also deletes all Tasks that are part of that Job, and all Job statistics. This also overrides the retention period for Task data; that is, if the Job contains Tasks which are still retained on Compute Nodes, the Batch services deletes those Tasks' working directories and all their contents. When a Delete Job request is received, the Batch service sets the Job to the deleting state. All update operations on a Job that is in deleting state will fail with status code 409 (Conflict), with additional information indicating that the Job is being deleted.
Parameters:
Returns:
null upon successful deletion.beginDeleteJobSchedule
public SyncPoller<BatchJobSchedule,Void> beginDeleteJobSchedule(String jobScheduleId)
Deletes a Job Schedule from the specified Account. When you delete a Job Schedule, this also deletes all Jobs and Tasks under that schedule. When Tasks are deleted, all the files in their working directories on the Compute Nodes are also deleted (the retention period is ignored). The Job Schedule statistics are no longer accessible once the Job Schedule is deleted, though they are still counted towards Account lifetime statistics.
Parameters:
Returns:
null upon successful deletion.beginDeleteJobSchedule
public SyncPoller<BatchJobSchedule,Void> beginDeleteJobSchedule(String jobScheduleId, BatchJobScheduleDeleteOptions options, RequestConditions requestConditions)
Deletes a Job Schedule from the specified Account. When you delete a Job Schedule, this also deletes all Jobs and Tasks under that schedule. When Tasks are deleted, all the files in their working directories on the Compute Nodes are also deleted (the retention period is ignored). The Job Schedule statistics are no longer accessible once the Job Schedule is deleted, though they are still counted towards Account lifetime statistics.
Parameters:
Returns:
null upon successful deletion.beginDeletePool
public SyncPoller<BatchPool,Void> beginDeletePool(String poolId)
Deletes a Pool from the specified Account. When you request that a Pool be deleted, the following actions occur: the Pool state is set to deleting; any ongoing resize operation on the Pool are stopped; the Batch service starts resizing the Pool to zero Compute Nodes; any Tasks running on existing Compute Nodes are terminated and requeued (as if a resize Pool operation had been requested with the default requeue option); finally, the Pool is removed from the system. Because running Tasks are requeued, the user can rerun these Tasks by updating their Job to target a different Pool. The Tasks can then run on the new Pool. If you want to override the requeue behavior, then you should call resize Pool explicitly to shrink the Pool to zero size before deleting the Pool. If you call an Update, Patch or Delete API on a Pool in the deleting state, it will fail with HTTP status code 409 with error code PoolBeingDeleted.
Parameters:
Returns:
null upon successful deletion.beginDeletePool
public SyncPoller<BatchPool,Void> beginDeletePool(String poolId, BatchPoolDeleteOptions options, RequestConditions requestConditions)
Deletes a Pool from the specified Account. When you request that a Pool be deleted, the following actions occur: the Pool state is set to deleting; any ongoing resize operation on the Pool are stopped; the Batch service starts resizing the Pool to zero Compute Nodes; any Tasks running on existing Compute Nodes are terminated and requeued (as if a resize Pool operation had been requested with the default requeue option); finally, the Pool is removed from the system. Because running Tasks are requeued, the user can rerun these Tasks by updating their Job to target a different Pool. The Tasks can then run on the new Pool. If you want to override the requeue behavior, then you should call resize Pool explicitly to shrink the Pool to zero size before deleting the Pool. If you call an Update, Patch or Delete API on a Pool in the deleting state, it will fail with HTTP status code 409 with error code PoolBeingDeleted.
Parameters:
Returns:
null upon successful deletion.beginDisableJob
public SyncPoller<BatchJob,BatchJob> beginDisableJob(String jobId, BatchJobDisableParameters parameters)
Disables the specified Job, preventing new Tasks from running. The Batch Service immediately moves the Job to the disabling state. Batch then uses the disableTasks parameter to determine what to do with the currently running Tasks of the Job. The Job remains in the disabling state until the disable operation is completed and all Tasks have been dealt with according to the disableTasks option; the Job then moves to the disabled state. No new Tasks are started under the Job until it moves back to active state. If you try to disable a Job that is in any state other than active, disabling, or disabled, the request fails with status code 409.
Parameters:
Returns:
beginDisableJob
public SyncPoller<BatchJob,BatchJob> beginDisableJob(String jobId, BatchJobDisableParameters parameters, BatchJobDisableOptions options, RequestConditions requestConditions)
Disables the specified Job, preventing new Tasks from running. The Batch Service immediately moves the Job to the disabling state. Batch then uses the disableTasks parameter to determine what to do with the currently running Tasks of the Job. The Job remains in the disabling state until the disable operation is completed and all Tasks have been dealt with according to the disableTasks option; the Job then moves to the disabled state. No new Tasks are started under the Job until it moves back to active state. If you try to disable a Job that is in any state other than active, disabling, or disabled, the request fails with status code 409.
Parameters:
Returns:
beginEnableJob
public SyncPoller<BatchJob,BatchJob> beginEnableJob(String jobId)
Enables the specified Job, allowing new Tasks to run. When you call this API, the Batch service sets a disabled Job to the enabling state. After this operation is completed, the Job moves to the active state, and scheduling of new Tasks under the Job resumes. The Batch service does not allow a Task to remain in the active state for more than 180 days. Therefore, if you enable a Job containing active Tasks which were added more than 180 days ago, those Tasks will not run.
Parameters:
Returns:
beginEnableJob
public SyncPoller<BatchJob,BatchJob> beginEnableJob(String jobId, BatchJobEnableOptions options, RequestConditions requestConditions)
Enables the specified Job, allowing new Tasks to run. When you call this API, the Batch service sets a disabled Job to the enabling state. After this operation is completed, the Job moves to the active state, and scheduling of new Tasks under the Job resumes. The Batch service does not allow a Task to remain in the active state for more than 180 days. Therefore, if you enable a Job containing active Tasks which were added more than 180 days ago, those Tasks will not run.
Parameters:
Returns:
beginRebootNode
public SyncPoller<BatchNode,BatchNode> beginRebootNode(String poolId, String nodeId)
Restarts the specified Compute Node. You can restart a Compute Node only if it is in an idle or running state.
Parameters:
Returns:
beginRebootNode
public SyncPoller<BatchNode,BatchNode> beginRebootNode(String poolId, String nodeId, BatchNodeRebootOptions options)
Restarts the specified Compute Node. You can restart a Compute Node only if it is in an idle or running state.
Parameters:
Returns:
beginReimageNode
public SyncPoller<BatchNode,BatchNode> beginReimageNode(String poolId, String nodeId)
Reinstalls the operating system on the specified Compute Node. You can reinstall the operating system on a Compute Node only if it is in an idle or running state. This API can be invoked only on Pools created with the cloud service configuration property.
Parameters:
Returns:
beginReimageNode
public SyncPoller<BatchNode,BatchNode> beginReimageNode(String poolId, String nodeId, BatchNodeReimageOptions options)
Reinstalls the operating system on the specified Compute Node. You can reinstall the operating system on a Compute Node only if it is in an idle or running state. This API can be invoked only on Pools created with the cloud service configuration property.
Parameters:
Returns:
beginRemoveNodes
public SyncPoller<BatchPool,BatchPool> beginRemoveNodes(String poolId, BatchNodeRemoveParameters parameters)
Removes Compute Nodes from the specified Pool. This operation can only run when the allocation state of the Pool is steady. When this operation runs, the allocation state changes from steady to resizing. Each request may remove up to 100 nodes.
Parameters:
Returns:
beginRemoveNodes
public SyncPoller<BatchPool,BatchPool> beginRemoveNodes(String poolId, BatchNodeRemoveParameters parameters, BatchNodesRemoveOptions options, RequestConditions requestConditions)
Removes Compute Nodes from the specified Pool. This operation can only run when the allocation state of the Pool is steady. When this operation runs, the allocation state changes from steady to resizing. Each request may remove up to 100 nodes.
Parameters:
Returns:
beginResizePool
public SyncPoller<BatchPool,BatchPool> beginResizePool(String poolId, BatchPoolResizeParameters parameters)
Changes the number of Compute Nodes that are assigned to a Pool. You can only resize a Pool when its allocation state is steady. If the Pool is already resizing, the request fails with status code 409. When you resize a Pool, the Pool's allocation state changes from steady to resizing. You cannot resize Pools which are configured for automatic scaling. If you try to do this, the Batch service returns an error 409. If you resize a Pool downwards, the Batch service chooses which Compute Nodes to remove. To remove specific Compute Nodes, use the Pool remove Compute Nodes API instead.
Parameters:
Returns:
beginResizePool
public SyncPoller<BatchPool,BatchPool> beginResizePool(String poolId, BatchPoolResizeParameters parameters, BatchPoolResizeOptions options, RequestConditions requestConditions)
Changes the number of Compute Nodes that are assigned to a Pool. You can only resize a Pool when its allocation state is steady. If the Pool is already resizing, the request fails with status code 409. When you resize a Pool, the Pool's allocation state changes from steady to resizing. You cannot resize Pools which are configured for automatic scaling. If you try to do this, the Batch service returns an error 409. If you resize a Pool downwards, the Batch service chooses which Compute Nodes to remove. To remove specific Compute Nodes, use the Pool remove Compute Nodes API instead.
Parameters:
Returns:
beginStartNode
public SyncPoller<BatchNode,BatchNode> beginStartNode(String poolId, String nodeId)
Starts the specified Compute Node. You can start a Compute Node only if it has been deallocated.
Parameters:
Returns:
beginStartNode
public SyncPoller<BatchNode,BatchNode> beginStartNode(String poolId, String nodeId, BatchNodeStartOptions options)
Starts the specified Compute Node. You can start a Compute Node only if it has been deallocated.
Parameters:
Returns:
beginStopPoolResize
public SyncPoller<BatchPool,BatchPool> beginStopPoolResize(String poolId)
Stops an ongoing resize operation on the Pool. This does not restore the Pool to its previous state before the resize operation: it only stops any further changes being made, and the Pool maintains its current state. After stopping, the Pool stabilizes at the number of Compute Nodes it was at when the stop operation was done. During the stop operation, the Pool allocation state changes first to stopping and then to steady. A resize operation need not be an explicit resize Pool request; this API can also be used to halt the initial sizing of the Pool when it is created.
Parameters:
Returns:
beginStopPoolResize
public SyncPoller<BatchPool,BatchPool> beginStopPoolResize(String poolId, BatchPoolResizeStopOptions options, RequestConditions requestConditions)
Stops an ongoing resize operation on the Pool. This does not restore the Pool to its previous state before the resize operation: it only stops any further changes being made, and the Pool maintains its current state. After stopping, the Pool stabilizes at the number of Compute Nodes it was at when the stop operation was done. During the stop operation, the Pool allocation state changes first to stopping and then to steady. A resize operation need not be an explicit resize Pool request; this API can also be used to halt the initial sizing of the Pool when it is created.
Parameters:
Returns:
beginTerminateJob
public SyncPoller<BatchJob,BatchJob> beginTerminateJob(String jobId)
Terminates the specified Job, marking it as completed. When a Terminate Job request is received, the Batch service sets the Job to the terminating state. The Batch service then terminates any running Tasks associated with the Job and runs any required Job release Tasks. Then the Job moves into the completed state. If there are any Tasks in the Job in the active state, they will remain in the active state. Once a Job is terminated, new Tasks cannot be added and any remaining active Tasks will not be scheduled.
Parameters:
Returns:
beginTerminateJob
public SyncPoller<BatchJob,BatchJob> beginTerminateJob(String jobId, BatchJobTerminateOptions options, RequestConditions requestConditions)
Begins terminating the specified Job, marking it as completed. When a Terminate Job request is received, the Batch service sets the Job to the terminating state. The Batch service then terminates any running Tasks associated with the Job and runs any required Job release Tasks. Then the Job moves into the completed state. If there are any Tasks in the Job in the active state, they will remain in the active state. Once a Job is terminated, new Tasks cannot be added and any remaining active Tasks will not be scheduled.
Parameters:
Returns:
beginTerminateJobSchedule
public SyncPoller<BatchJobSchedule,BatchJobSchedule> beginTerminateJobSchedule(String jobScheduleId)
Terminates a Job Schedule.
Parameters:
Returns:
beginTerminateJobSchedule
public SyncPoller<BatchJobSchedule,BatchJobSchedule> beginTerminateJobSchedule(String jobScheduleId, BatchJobScheduleTerminateOptions options, RequestConditions requestConditions)
Terminates a Job Schedule.
Parameters:
Returns:
cancelCertificateDeletion
public void cancelCertificateDeletion(String thumbprintAlgorithm, String thumbprint)
Cancels a failed deletion of a Certificate from the specified Account. If you try to delete a Certificate that is being used by a Pool or Compute Node, the status of the Certificate changes to deleteFailed. If you decide that you want to continue using the Certificate, you can use this operation to set the status of the Certificate back to active. If you intend to delete the Certificate, you do not need to run this operation after the deletion failed. You must make sure that the Certificate is not being used by any resources, and then you can try again to delete the Certificate.
Parameters:
cancelCertificateDeletion
public void cancelCertificateDeletion(String thumbprintAlgorithm, String thumbprint, BatchCertificateCancelDeletionOptions options)
Cancels a failed deletion of a Certificate from the specified Account. If you try to delete a Certificate that is being used by a Pool or Compute Node, the status of the Certificate changes to deleteFailed. If you decide that you want to continue using the Certificate, you can use this operation to set the status of the Certificate back to active. If you intend to delete the Certificate, you do not need to run this operation after the deletion failed. You must make sure that the Certificate is not being used by any resources, and then you can try again to delete the Certificate.
Parameters:
cancelCertificateDeletionWithResponse
public Response<Void> cancelCertificateDeletionWithResponse(String thumbprintAlgorithm, String thumbprint, RequestOptions requestOptions)
Cancels a failed deletion of a Certificate from the specified Account. If you try to delete a Certificate that is being used by a Pool or Compute Node, the status of the Certificate changes to deleteFailed. If you decide that you want to continue using the Certificate, you can use this operation to set the status of the Certificate back to active. If you intend to delete the Certificate, you do not need to run this operation after the deletion failed. You must make sure that the Certificate is not being used by any resources, and then you can try again to delete the Certificate.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Parameters:
Returns:
createCertificate
public void createCertificate(BatchCertificate certificate)
Creates a Certificate to the specified Account.
Parameters:
createCertificate
public void createCertificate(BatchCertificate certificate, BatchCertificateCreateOptions options)
Creates a Certificate to the specified Account.
Parameters:
createCertificateWithResponse
public Response<Void> createCertificateWithResponse(BinaryData certificate, RequestOptions requestOptions)
Creates a Certificate to the specified Account.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Request Body Schema
{
thumbprint: String (Required)
thumbprintAlgorithm: String (Required)
url: String (Optional)
state: String(active/deleting/deletefailed) (Optional)
stateTransitionTime: OffsetDateTime (Optional)
previousState: String(active/deleting/deletefailed) (Optional)
previousStateTransitionTime: OffsetDateTime (Optional)
publicData: String (Optional)
deleteCertificateError (Optional): {
code: String (Optional)
message: String (Optional)
values (Optional): [
(Optional){
name: String (Optional)
value: String (Optional)
}
]
}
data: byte[] (Required)
certificateFormat: String(pfx/cer) (Optional)
password: String (Optional)
}
Parameters:
Returns:
createJob
public void createJob(BatchJobCreateParameters job)
Creates a Job to the specified Account. 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.
Parameters:
createJob
public void createJob(BatchJobCreateParameters job, BatchJobCreateOptions options)
Creates a Job to the specified Account. 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.
Parameters:
createJobSchedule
public void createJobSchedule(BatchJobScheduleCreateParameters jobSchedule)
Creates a Job Schedule to the specified Account.
Parameters:
createJobSchedule
public void createJobSchedule(BatchJobScheduleCreateParameters jobSchedule, BatchJobScheduleCreateOptions options)
Creates a Job Schedule to the specified Account.
Parameters:
createJobScheduleWithResponse
public Response<Void> createJobScheduleWithResponse(BinaryData jobSchedule, RequestOptions requestOptions)
Creates a Job Schedule to the specified Account.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Request Body Schema
{
id: String (Required)
displayName: String (Optional)
schedule (Required): {
doNotRunUntil: OffsetDateTime (Optional)
doNotRunAfter: OffsetDateTime (Optional)
startWindow: Duration (Optional)
recurrenceInterval: Duration (Optional)
}
jobSpecification (Required): {
priority: Integer (Optional)
allowTaskPreemption: Boolean (Optional)
maxParallelTasks: Integer (Optional)
displayName: String (Optional)
usesTaskDependencies: Boolean (Optional)
onAllTasksComplete: String(noaction/terminatejob) (Optional)
onTaskFailure: String(noaction/performexitoptionsjobaction) (Optional)
networkConfiguration (Optional): {
subnetId: String (Required)
skipWithdrawFromVNet: Boolean (Optional)
}
constraints (Optional): {
maxWallClockTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
jobManagerTask (Optional): {
id: String (Required)
displayName: String (Optional)
commandLine: String (Required)
containerSettings (Optional): {
containerRunOptions: String (Optional)
imageName: String (Required)
registry (Optional): {
username: String (Optional)
password: String (Optional)
registryServer: String (Optional)
identityReference (Optional): {
resourceId: String (Optional)
}
}
workingDirectory: String(taskWorkingDirectory/containerImageDefault) (Optional)
containerHostBatchBindMounts (Optional): [
(Optional){
source: String(Shared/Startup/VfsMounts/Task/JobPrep/Applications) (Optional)
isReadOnly: Boolean (Optional)
}
]
}
resourceFiles (Optional): [
(Optional){
autoStorageContainerName: String (Optional)
storageContainerUrl: String (Optional)
httpUrl: String (Optional)
blobPrefix: String (Optional)
filePath: String (Optional)
fileMode: String (Optional)
identityReference (Optional): (recursive schema, see identityReference above)
}
]
outputFiles (Optional): [
(Optional){
filePattern: String (Required)
destination (Required): {
container (Optional): {
path: String (Optional)
containerUrl: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
uploadHeaders (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
}
}
uploadOptions (Required): {
uploadCondition: String(tasksuccess/taskfailure/taskcompletion) (Required)
}
}
]
environmentSettings (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
constraints (Optional): {
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
requiredSlots: Integer (Optional)
killJobOnCompletion: Boolean (Optional)
userIdentity (Optional): {
username: String (Optional)
autoUser (Optional): {
scope: String(task/pool) (Optional)
elevationLevel: String(nonadmin/admin) (Optional)
}
}
runExclusive: Boolean (Optional)
applicationPackageReferences (Optional): [
(Optional){
applicationId: String (Required)
version: String (Optional)
}
]
authenticationTokenSettings (Optional): {
access (Optional): [
String(job) (Optional)
]
}
allowLowPriorityNode: Boolean (Optional)
}
jobPreparationTask (Optional): {
id: String (Optional)
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
constraints (Optional): (recursive schema, see constraints above)
waitForSuccess: Boolean (Optional)
userIdentity (Optional): (recursive schema, see userIdentity above)
rerunOnNodeRebootAfterSuccess: Boolean (Optional)
}
jobReleaseTask (Optional): {
id: String (Optional)
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
userIdentity (Optional): (recursive schema, see userIdentity above)
}
commonEnvironmentSettings (Optional): [
(recursive schema, see above)
]
poolInfo (Required): {
poolId: String (Optional)
autoPoolSpecification (Optional): {
autoPoolIdPrefix: String (Optional)
poolLifetimeOption: String(jobschedule/job) (Required)
keepAlive: Boolean (Optional)
pool (Optional): {
displayName: String (Optional)
vmSize: String (Required)
virtualMachineConfiguration (Optional): {
imageReference (Required): {
publisher: String (Optional)
offer: String (Optional)
sku: String (Optional)
version: String (Optional)
virtualMachineImageId: String (Optional)
exactVersion: String (Optional)
sharedGalleryImageId: String (Optional)
communityGalleryImageId: String (Optional)
}
nodeAgentSKUId: String (Required)
windowsConfiguration (Optional): {
enableAutomaticUpdates: Boolean (Optional)
}
dataDisks (Optional): [
(Optional){
lun: int (Required)
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: int (Required)
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
}
]
licenseType: String (Optional)
containerConfiguration (Optional): {
type: String(dockerCompatible/criCompatible) (Required)
containerImageNames (Optional): [
String (Optional)
]
containerRegistries (Optional): [
(recursive schema, see above)
]
}
diskEncryptionConfiguration (Optional): {
targets (Optional): [
String(osdisk/temporarydisk) (Optional)
]
}
nodePlacementConfiguration (Optional): {
policy: String(regional/zonal) (Optional)
}
extensions (Optional): [
(Optional){
name: String (Required)
publisher: String (Required)
type: String (Required)
typeHandlerVersion: String (Optional)
autoUpgradeMinorVersion: Boolean (Optional)
enableAutomaticUpgrade: Boolean (Optional)
settings (Optional): {
String: String (Required)
}
protectedSettings (Optional): {
String: String (Required)
}
provisionAfterExtensions (Optional): [
String (Optional)
]
}
]
osDisk (Optional): {
ephemeralOSDiskSettings (Optional): {
placement: String(cachedisk) (Optional)
}
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: Integer (Optional)
managedDisk (Optional): {
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
securityProfile (Optional): {
securityEncryptionType: String(NonPersistedTPM/VMGuestStateOnly) (Optional)
}
}
writeAcceleratorEnabled: Boolean (Optional)
}
securityProfile (Optional): {
encryptionAtHost: Boolean (Optional)
securityType: String(trustedLaunch/confidentialVM) (Optional)
uefiSettings (Optional): {
secureBootEnabled: Boolean (Optional)
vTpmEnabled: Boolean (Optional)
}
}
serviceArtifactReference (Optional): {
id: String (Required)
}
}
taskSlotsPerNode: Integer (Optional)
taskSchedulingPolicy (Optional): {
nodeFillType: String(spread/pack) (Required)
}
resizeTimeout: Duration (Optional)
resourceTags: String (Optional)
targetDedicatedNodes: Integer (Optional)
targetLowPriorityNodes: Integer (Optional)
enableAutoScale: Boolean (Optional)
autoScaleFormula: String (Optional)
autoScaleEvaluationInterval: Duration (Optional)
enableInterNodeCommunication: Boolean (Optional)
networkConfiguration (Optional): {
subnetId: String (Optional)
dynamicVNetAssignmentScope: String(none/job) (Optional)
endpointConfiguration (Optional): {
inboundNATPools (Required): [
(Required){
name: String (Required)
protocol: String(tcp/udp) (Required)
backendPort: int (Required)
frontendPortRangeStart: int (Required)
frontendPortRangeEnd: int (Required)
networkSecurityGroupRules (Optional): [
(Optional){
priority: int (Required)
access: String(allow/deny) (Required)
sourceAddressPrefix: String (Required)
sourcePortRanges (Optional): [
String (Optional)
]
}
]
}
]
}
publicIPAddressConfiguration (Optional): {
provision: String(batchmanaged/usermanaged/nopublicipaddresses) (Optional)
ipAddressIds (Optional): [
String (Optional)
]
}
enableAcceleratedNetworking: Boolean (Optional)
}
startTask (Optional): {
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
userIdentity (Optional): (recursive schema, see userIdentity above)
maxTaskRetryCount: Integer (Optional)
waitForSuccess: Boolean (Optional)
}
certificateReferences (Optional): [
(Optional){
thumbprint: String (Required)
thumbprintAlgorithm: String (Required)
storeLocation: String(currentuser/localmachine) (Optional)
storeName: String (Optional)
visibility (Optional): [
String(starttask/task/remoteuser) (Optional)
]
}
]
applicationPackageReferences (Optional): [
(recursive schema, see above)
]
userAccounts (Optional): [
(Optional){
name: String (Required)
password: String (Required)
elevationLevel: String(nonadmin/admin) (Optional)
linuxUserConfiguration (Optional): {
uid: Integer (Optional)
gid: Integer (Optional)
sshPrivateKey: String (Optional)
}
windowsUserConfiguration (Optional): {
loginMode: String(batch/interactive) (Optional)
}
}
]
metadata (Optional): [
(Optional){
name: String (Required)
value: String (Required)
}
]
mountConfiguration (Optional): [
(Optional){
azureBlobFileSystemConfiguration (Optional): {
accountName: String (Required)
containerName: String (Required)
accountKey: String (Optional)
sasKey: String (Optional)
blobfuseOptions: String (Optional)
relativeMountPath: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
}
nfsMountConfiguration (Optional): {
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
cifsMountConfiguration (Optional): {
username: String (Required)
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
password: String (Required)
}
azureFileShareConfiguration (Optional): {
accountName: String (Required)
accountKey: String (Required)
azureFileUrl: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
}
]
targetNodeCommunicationMode: String(default/classic/simplified) (Optional)
upgradePolicy (Optional): {
mode: String(automatic/manual/rolling) (Required)
automaticOSUpgradePolicy (Optional): {
disableAutomaticRollback: Boolean (Optional)
enableAutomaticOSUpgrade: Boolean (Optional)
useRollingUpgradePolicy: Boolean (Optional)
osRollingUpgradeDeferral: Boolean (Optional)
}
rollingUpgradePolicy (Optional): {
enableCrossZoneUpgrade: Boolean (Optional)
maxBatchInstancePercent: Integer (Optional)
maxUnhealthyInstancePercent: Integer (Optional)
maxUnhealthyUpgradedInstancePercent: Integer (Optional)
pauseTimeBetweenBatches: Duration (Optional)
prioritizeUnhealthyInstances: Boolean (Optional)
rollbackFailedInstancesOnPolicyBreach: Boolean (Optional)
}
}
}
}
}
metadata (Optional): [
(recursive schema, see above)
]
}
metadata (Optional): [
(recursive schema, see above)
]
}
Parameters:
Returns:
createJobWithResponse
public Response<Void> createJobWithResponse(BinaryData job, RequestOptions requestOptions)
Creates a Job to the specified Account. 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.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Request Body Schema
{
id: String (Required)
displayName: String (Optional)
usesTaskDependencies: Boolean (Optional)
priority: Integer (Optional)
allowTaskPreemption: Boolean (Optional)
maxParallelTasks: Integer (Optional)
constraints (Optional): {
maxWallClockTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
jobManagerTask (Optional): {
id: String (Required)
displayName: String (Optional)
commandLine: String (Required)
containerSettings (Optional): {
containerRunOptions: String (Optional)
imageName: String (Required)
registry (Optional): {
username: String (Optional)
password: String (Optional)
registryServer: String (Optional)
identityReference (Optional): {
resourceId: String (Optional)
}
}
workingDirectory: String(taskWorkingDirectory/containerImageDefault) (Optional)
containerHostBatchBindMounts (Optional): [
(Optional){
source: String(Shared/Startup/VfsMounts/Task/JobPrep/Applications) (Optional)
isReadOnly: Boolean (Optional)
}
]
}
resourceFiles (Optional): [
(Optional){
autoStorageContainerName: String (Optional)
storageContainerUrl: String (Optional)
httpUrl: String (Optional)
blobPrefix: String (Optional)
filePath: String (Optional)
fileMode: String (Optional)
identityReference (Optional): (recursive schema, see identityReference above)
}
]
outputFiles (Optional): [
(Optional){
filePattern: String (Required)
destination (Required): {
container (Optional): {
path: String (Optional)
containerUrl: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
uploadHeaders (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
}
}
uploadOptions (Required): {
uploadCondition: String(tasksuccess/taskfailure/taskcompletion) (Required)
}
}
]
environmentSettings (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
constraints (Optional): {
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
requiredSlots: Integer (Optional)
killJobOnCompletion: Boolean (Optional)
userIdentity (Optional): {
username: String (Optional)
autoUser (Optional): {
scope: String(task/pool) (Optional)
elevationLevel: String(nonadmin/admin) (Optional)
}
}
runExclusive: Boolean (Optional)
applicationPackageReferences (Optional): [
(Optional){
applicationId: String (Required)
version: String (Optional)
}
]
authenticationTokenSettings (Optional): {
access (Optional): [
String(job) (Optional)
]
}
allowLowPriorityNode: Boolean (Optional)
}
jobPreparationTask (Optional): {
id: String (Optional)
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
constraints (Optional): (recursive schema, see constraints above)
waitForSuccess: Boolean (Optional)
userIdentity (Optional): (recursive schema, see userIdentity above)
rerunOnNodeRebootAfterSuccess: Boolean (Optional)
}
jobReleaseTask (Optional): {
id: String (Optional)
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
userIdentity (Optional): (recursive schema, see userIdentity above)
}
commonEnvironmentSettings (Optional): [
(recursive schema, see above)
]
poolInfo (Required): {
poolId: String (Optional)
autoPoolSpecification (Optional): {
autoPoolIdPrefix: String (Optional)
poolLifetimeOption: String(jobschedule/job) (Required)
keepAlive: Boolean (Optional)
pool (Optional): {
displayName: String (Optional)
vmSize: String (Required)
virtualMachineConfiguration (Optional): {
imageReference (Required): {
publisher: String (Optional)
offer: String (Optional)
sku: String (Optional)
version: String (Optional)
virtualMachineImageId: String (Optional)
exactVersion: String (Optional)
sharedGalleryImageId: String (Optional)
communityGalleryImageId: String (Optional)
}
nodeAgentSKUId: String (Required)
windowsConfiguration (Optional): {
enableAutomaticUpdates: Boolean (Optional)
}
dataDisks (Optional): [
(Optional){
lun: int (Required)
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: int (Required)
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
}
]
licenseType: String (Optional)
containerConfiguration (Optional): {
type: String(dockerCompatible/criCompatible) (Required)
containerImageNames (Optional): [
String (Optional)
]
containerRegistries (Optional): [
(recursive schema, see above)
]
}
diskEncryptionConfiguration (Optional): {
targets (Optional): [
String(osdisk/temporarydisk) (Optional)
]
}
nodePlacementConfiguration (Optional): {
policy: String(regional/zonal) (Optional)
}
extensions (Optional): [
(Optional){
name: String (Required)
publisher: String (Required)
type: String (Required)
typeHandlerVersion: String (Optional)
autoUpgradeMinorVersion: Boolean (Optional)
enableAutomaticUpgrade: Boolean (Optional)
settings (Optional): {
String: String (Required)
}
protectedSettings (Optional): {
String: String (Required)
}
provisionAfterExtensions (Optional): [
String (Optional)
]
}
]
osDisk (Optional): {
ephemeralOSDiskSettings (Optional): {
placement: String(cachedisk) (Optional)
}
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: Integer (Optional)
managedDisk (Optional): {
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
securityProfile (Optional): {
securityEncryptionType: String(NonPersistedTPM/VMGuestStateOnly) (Optional)
}
}
writeAcceleratorEnabled: Boolean (Optional)
}
securityProfile (Optional): {
encryptionAtHost: Boolean (Optional)
securityType: String(trustedLaunch/confidentialVM) (Optional)
uefiSettings (Optional): {
secureBootEnabled: Boolean (Optional)
vTpmEnabled: Boolean (Optional)
}
}
serviceArtifactReference (Optional): {
id: String (Required)
}
}
taskSlotsPerNode: Integer (Optional)
taskSchedulingPolicy (Optional): {
nodeFillType: String(spread/pack) (Required)
}
resizeTimeout: Duration (Optional)
resourceTags: String (Optional)
targetDedicatedNodes: Integer (Optional)
targetLowPriorityNodes: Integer (Optional)
enableAutoScale: Boolean (Optional)
autoScaleFormula: String (Optional)
autoScaleEvaluationInterval: Duration (Optional)
enableInterNodeCommunication: Boolean (Optional)
networkConfiguration (Optional): {
subnetId: String (Optional)
dynamicVNetAssignmentScope: String(none/job) (Optional)
endpointConfiguration (Optional): {
inboundNATPools (Required): [
(Required){
name: String (Required)
protocol: String(tcp/udp) (Required)
backendPort: int (Required)
frontendPortRangeStart: int (Required)
frontendPortRangeEnd: int (Required)
networkSecurityGroupRules (Optional): [
(Optional){
priority: int (Required)
access: String(allow/deny) (Required)
sourceAddressPrefix: String (Required)
sourcePortRanges (Optional): [
String (Optional)
]
}
]
}
]
}
publicIPAddressConfiguration (Optional): {
provision: String(batchmanaged/usermanaged/nopublicipaddresses) (Optional)
ipAddressIds (Optional): [
String (Optional)
]
}
enableAcceleratedNetworking: Boolean (Optional)
}
startTask (Optional): {
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
userIdentity (Optional): (recursive schema, see userIdentity above)
maxTaskRetryCount: Integer (Optional)
waitForSuccess: Boolean (Optional)
}
certificateReferences (Optional): [
(Optional){
thumbprint: String (Required)
thumbprintAlgorithm: String (Required)
storeLocation: String(currentuser/localmachine) (Optional)
storeName: String (Optional)
visibility (Optional): [
String(starttask/task/remoteuser) (Optional)
]
}
]
applicationPackageReferences (Optional): [
(recursive schema, see above)
]
userAccounts (Optional): [
(Optional){
name: String (Required)
password: String (Required)
elevationLevel: String(nonadmin/admin) (Optional)
linuxUserConfiguration (Optional): {
uid: Integer (Optional)
gid: Integer (Optional)
sshPrivateKey: String (Optional)
}
windowsUserConfiguration (Optional): {
loginMode: String(batch/interactive) (Optional)
}
}
]
metadata (Optional): [
(Optional){
name: String (Required)
value: String (Required)
}
]
mountConfiguration (Optional): [
(Optional){
azureBlobFileSystemConfiguration (Optional): {
accountName: String (Required)
containerName: String (Required)
accountKey: String (Optional)
sasKey: String (Optional)
blobfuseOptions: String (Optional)
relativeMountPath: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
}
nfsMountConfiguration (Optional): {
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
cifsMountConfiguration (Optional): {
username: String (Required)
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
password: String (Required)
}
azureFileShareConfiguration (Optional): {
accountName: String (Required)
accountKey: String (Required)
azureFileUrl: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
}
]
targetNodeCommunicationMode: String(default/classic/simplified) (Optional)
upgradePolicy (Optional): {
mode: String(automatic/manual/rolling) (Required)
automaticOSUpgradePolicy (Optional): {
disableAutomaticRollback: Boolean (Optional)
enableAutomaticOSUpgrade: Boolean (Optional)
useRollingUpgradePolicy: Boolean (Optional)
osRollingUpgradeDeferral: Boolean (Optional)
}
rollingUpgradePolicy (Optional): {
enableCrossZoneUpgrade: Boolean (Optional)
maxBatchInstancePercent: Integer (Optional)
maxUnhealthyInstancePercent: Integer (Optional)
maxUnhealthyUpgradedInstancePercent: Integer (Optional)
pauseTimeBetweenBatches: Duration (Optional)
prioritizeUnhealthyInstances: Boolean (Optional)
rollbackFailedInstancesOnPolicyBreach: Boolean (Optional)
}
}
}
}
}
onAllTasksComplete: String(noaction/terminatejob) (Optional)
onTaskFailure: String(noaction/performexitoptionsjobaction) (Optional)
networkConfiguration (Optional): {
subnetId: String (Required)
skipWithdrawFromVNet: Boolean (Optional)
}
metadata (Optional): [
(recursive schema, see above)
]
}
Parameters:
Returns:
createNodeUser
public void createNodeUser(String poolId, String nodeId, BatchNodeUserCreateParameters user)
Adds a user Account to the specified Compute Node. You can add a user Account to a Compute Node only when it is in the idle or running state.
Parameters:
createNodeUser
public void createNodeUser(String poolId, String nodeId, BatchNodeUserCreateParameters user, BatchNodeUserCreateOptions options)
Adds a user Account to the specified Compute Node. You can add a user Account to a Compute Node only when it is in the idle or running state.
Parameters:
createNodeUserWithResponse
public Response<Void> createNodeUserWithResponse(String poolId, String nodeId, BinaryData user, RequestOptions requestOptions)
Adds a user Account to the specified Compute Node. You can add a user Account to a Compute Node only when it is in the idle or running state.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Request Body Schema
{
name: String (Required)
isAdmin: Boolean (Optional)
expiryTime: OffsetDateTime (Optional)
password: String (Optional)
sshPublicKey: String (Optional)
}
Parameters:
Returns:
createPool
public void createPool(BatchPoolCreateParameters pool)
Creates a Pool to the specified Account. When naming Pools, avoid including sensitive information such as user names or secret project names. This information may appear in telemetry logs accessible to Microsoft Support engineers.
Parameters:
createPool
public void createPool(BatchPoolCreateParameters pool, BatchPoolCreateOptions options)
Creates a Pool to the specified Account. When naming Pools, avoid including sensitive information such as user names or secret project names. This information may appear in telemetry logs accessible to Microsoft Support engineers.
Parameters:
createPoolWithResponse
public Response<Void> createPoolWithResponse(BinaryData pool, RequestOptions requestOptions)
Creates a Pool to the specified Account. When naming Pools, avoid including sensitive information such as user names or secret project names. This information may appear in telemetry logs accessible to Microsoft Support engineers.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Request Body Schema
{
id: String (Required)
displayName: String (Optional)
vmSize: String (Required)
virtualMachineConfiguration (Optional): {
imageReference (Required): {
publisher: String (Optional)
offer: String (Optional)
sku: String (Optional)
version: String (Optional)
virtualMachineImageId: String (Optional)
exactVersion: String (Optional)
sharedGalleryImageId: String (Optional)
communityGalleryImageId: String (Optional)
}
nodeAgentSKUId: String (Required)
windowsConfiguration (Optional): {
enableAutomaticUpdates: Boolean (Optional)
}
dataDisks (Optional): [
(Optional){
lun: int (Required)
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: int (Required)
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
}
]
licenseType: String (Optional)
containerConfiguration (Optional): {
type: String(dockerCompatible/criCompatible) (Required)
containerImageNames (Optional): [
String (Optional)
]
containerRegistries (Optional): [
(Optional){
username: String (Optional)
password: String (Optional)
registryServer: String (Optional)
identityReference (Optional): {
resourceId: String (Optional)
}
}
]
}
diskEncryptionConfiguration (Optional): {
targets (Optional): [
String(osdisk/temporarydisk) (Optional)
]
}
nodePlacementConfiguration (Optional): {
policy: String(regional/zonal) (Optional)
}
extensions (Optional): [
(Optional){
name: String (Required)
publisher: String (Required)
type: String (Required)
typeHandlerVersion: String (Optional)
autoUpgradeMinorVersion: Boolean (Optional)
enableAutomaticUpgrade: Boolean (Optional)
settings (Optional): {
String: String (Required)
}
protectedSettings (Optional): {
String: String (Required)
}
provisionAfterExtensions (Optional): [
String (Optional)
]
}
]
osDisk (Optional): {
ephemeralOSDiskSettings (Optional): {
placement: String(cachedisk) (Optional)
}
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: Integer (Optional)
managedDisk (Optional): {
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
securityProfile (Optional): {
securityEncryptionType: String(NonPersistedTPM/VMGuestStateOnly) (Optional)
}
}
writeAcceleratorEnabled: Boolean (Optional)
}
securityProfile (Optional): {
encryptionAtHost: Boolean (Optional)
securityType: String(trustedLaunch/confidentialVM) (Optional)
uefiSettings (Optional): {
secureBootEnabled: Boolean (Optional)
vTpmEnabled: Boolean (Optional)
}
}
serviceArtifactReference (Optional): {
id: String (Required)
}
}
resizeTimeout: Duration (Optional)
resourceTags (Optional): {
String: String (Required)
}
targetDedicatedNodes: Integer (Optional)
targetLowPriorityNodes: Integer (Optional)
enableAutoScale: Boolean (Optional)
autoScaleFormula: String (Optional)
autoScaleEvaluationInterval: Duration (Optional)
enableInterNodeCommunication: Boolean (Optional)
networkConfiguration (Optional): {
subnetId: String (Optional)
dynamicVNetAssignmentScope: String(none/job) (Optional)
endpointConfiguration (Optional): {
inboundNATPools (Required): [
(Required){
name: String (Required)
protocol: String(tcp/udp) (Required)
backendPort: int (Required)
frontendPortRangeStart: int (Required)
frontendPortRangeEnd: int (Required)
networkSecurityGroupRules (Optional): [
(Optional){
priority: int (Required)
access: String(allow/deny) (Required)
sourceAddressPrefix: String (Required)
sourcePortRanges (Optional): [
String (Optional)
]
}
]
}
]
}
publicIPAddressConfiguration (Optional): {
provision: String(batchmanaged/usermanaged/nopublicipaddresses) (Optional)
ipAddressIds (Optional): [
String (Optional)
]
}
enableAcceleratedNetworking: Boolean (Optional)
}
startTask (Optional): {
commandLine: String (Required)
containerSettings (Optional): {
containerRunOptions: String (Optional)
imageName: String (Required)
registry (Optional): (recursive schema, see registry above)
workingDirectory: String(taskWorkingDirectory/containerImageDefault) (Optional)
containerHostBatchBindMounts (Optional): [
(Optional){
source: String(Shared/Startup/VfsMounts/Task/JobPrep/Applications) (Optional)
isReadOnly: Boolean (Optional)
}
]
}
resourceFiles (Optional): [
(Optional){
autoStorageContainerName: String (Optional)
storageContainerUrl: String (Optional)
httpUrl: String (Optional)
blobPrefix: String (Optional)
filePath: String (Optional)
fileMode: String (Optional)
identityReference (Optional): (recursive schema, see identityReference above)
}
]
environmentSettings (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
userIdentity (Optional): {
username: String (Optional)
autoUser (Optional): {
scope: String(task/pool) (Optional)
elevationLevel: String(nonadmin/admin) (Optional)
}
}
maxTaskRetryCount: Integer (Optional)
waitForSuccess: Boolean (Optional)
}
certificateReferences (Optional): [
(Optional){
thumbprint: String (Required)
thumbprintAlgorithm: String (Required)
storeLocation: String(currentuser/localmachine) (Optional)
storeName: String (Optional)
visibility (Optional): [
String(starttask/task/remoteuser) (Optional)
]
}
]
applicationPackageReferences (Optional): [
(Optional){
applicationId: String (Required)
version: String (Optional)
}
]
taskSlotsPerNode: Integer (Optional)
taskSchedulingPolicy (Optional): {
nodeFillType: String(spread/pack) (Required)
}
userAccounts (Optional): [
(Optional){
name: String (Required)
password: String (Required)
elevationLevel: String(nonadmin/admin) (Optional)
linuxUserConfiguration (Optional): {
uid: Integer (Optional)
gid: Integer (Optional)
sshPrivateKey: String (Optional)
}
windowsUserConfiguration (Optional): {
loginMode: String(batch/interactive) (Optional)
}
}
]
metadata (Optional): [
(Optional){
name: String (Required)
value: String (Required)
}
]
mountConfiguration (Optional): [
(Optional){
azureBlobFileSystemConfiguration (Optional): {
accountName: String (Required)
containerName: String (Required)
accountKey: String (Optional)
sasKey: String (Optional)
blobfuseOptions: String (Optional)
relativeMountPath: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
}
nfsMountConfiguration (Optional): {
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
cifsMountConfiguration (Optional): {
username: String (Required)
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
password: String (Required)
}
azureFileShareConfiguration (Optional): {
accountName: String (Required)
accountKey: String (Required)
azureFileUrl: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
}
]
targetNodeCommunicationMode: String(default/classic/simplified) (Optional)
upgradePolicy (Optional): {
mode: String(automatic/manual/rolling) (Required)
automaticOSUpgradePolicy (Optional): {
disableAutomaticRollback: Boolean (Optional)
enableAutomaticOSUpgrade: Boolean (Optional)
useRollingUpgradePolicy: Boolean (Optional)
osRollingUpgradeDeferral: Boolean (Optional)
}
rollingUpgradePolicy (Optional): {
enableCrossZoneUpgrade: Boolean (Optional)
maxBatchInstancePercent: Integer (Optional)
maxUnhealthyInstancePercent: Integer (Optional)
maxUnhealthyUpgradedInstancePercent: Integer (Optional)
pauseTimeBetweenBatches: Duration (Optional)
prioritizeUnhealthyInstances: Boolean (Optional)
rollbackFailedInstancesOnPolicyBreach: Boolean (Optional)
}
}
}
Parameters:
Returns:
createTask
public void createTask(String jobId, BatchTaskCreateParameters task)
Creates a Task to the specified Job. 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.
Parameters:
createTask
public void createTask(String jobId, BatchTaskCreateParameters task, BatchTaskCreateOptions options)
Creates a Task to the specified Job. 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.
Parameters:
createTaskCollection
public BatchCreateTaskCollectionResult createTaskCollection(String jobId, BatchTaskGroup taskCollection)
Adds a collection of Tasks to the specified Job. 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.
Parameters:
Returns:
createTaskCollection
public BatchCreateTaskCollectionResult createTaskCollection(String jobId, BatchTaskGroup taskCollection, BatchTaskCollectionCreateOptions options)
Adds a collection of Tasks to the specified Job. 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.
Parameters:
Returns:
createTaskCollectionWithResponse
public Response<BinaryData> createTaskCollectionWithResponse(String jobId, BinaryData taskCollection, RequestOptions requestOptions)
Adds a collection of Tasks to the specified Job. 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.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Request Body Schema
{
value (Required): [
(Required){
id: String (Required)
displayName: String (Optional)
exitConditions (Optional): {
exitCodes (Optional): [
(Optional){
code: int (Required)
exitOptions (Required): {
jobAction: String(none/disable/terminate) (Optional)
dependencyAction: String(satisfy/block) (Optional)
}
}
]
exitCodeRanges (Optional): [
(Optional){
start: int (Required)
end: int (Required)
exitOptions (Required): (recursive schema, see exitOptions above)
}
]
preProcessingError (Optional): (recursive schema, see preProcessingError above)
fileUploadError (Optional): (recursive schema, see fileUploadError above)
default (Optional): (recursive schema, see default above)
}
commandLine: String (Required)
containerSettings (Optional): {
containerRunOptions: String (Optional)
imageName: String (Required)
registry (Optional): {
username: String (Optional)
password: String (Optional)
registryServer: String (Optional)
identityReference (Optional): {
resourceId: String (Optional)
}
}
workingDirectory: String(taskWorkingDirectory/containerImageDefault) (Optional)
containerHostBatchBindMounts (Optional): [
(Optional){
source: String(Shared/Startup/VfsMounts/Task/JobPrep/Applications) (Optional)
isReadOnly: Boolean (Optional)
}
]
}
resourceFiles (Optional): [
(Optional){
autoStorageContainerName: String (Optional)
storageContainerUrl: String (Optional)
httpUrl: String (Optional)
blobPrefix: String (Optional)
filePath: String (Optional)
fileMode: String (Optional)
identityReference (Optional): (recursive schema, see identityReference above)
}
]
outputFiles (Optional): [
(Optional){
filePattern: String (Required)
destination (Required): {
container (Optional): {
path: String (Optional)
containerUrl: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
uploadHeaders (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
}
}
uploadOptions (Required): {
uploadCondition: String(tasksuccess/taskfailure/taskcompletion) (Required)
}
}
]
environmentSettings (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
affinityInfo (Optional): {
affinityId: String (Required)
}
constraints (Optional): {
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
requiredSlots: Integer (Optional)
userIdentity (Optional): {
username: String (Optional)
autoUser (Optional): {
scope: String(task/pool) (Optional)
elevationLevel: String(nonadmin/admin) (Optional)
}
}
multiInstanceSettings (Optional): {
numberOfInstances: Integer (Optional)
coordinationCommandLine: String (Required)
commonResourceFiles (Optional): [
(recursive schema, see above)
]
}
dependsOn (Optional): {
taskIds (Optional): [
String (Optional)
]
taskIdRanges (Optional): [
(Optional){
start: int (Required)
end: int (Required)
}
]
}
applicationPackageReferences (Optional): [
(Optional){
applicationId: String (Required)
version: String (Optional)
}
]
authenticationTokenSettings (Optional): {
access (Optional): [
String(job) (Optional)
]
}
}
]
}
Response Body Schema
{
value (Optional): [
(Optional){
status: String(success/clienterror/servererror) (Required)
taskId: String (Required)
eTag: String (Optional)
lastModified: OffsetDateTime (Optional)
location: String (Optional)
error (Optional): {
code: String (Optional)
message (Optional): {
lang: String (Optional)
value: String (Optional)
}
values (Optional): [
(Optional){
key: String (Optional)
value: String (Optional)
}
]
}
}
]
}
Parameters:
Returns:
createTasks
public void createTasks(String jobId, Collection<BatchTaskCreateParameters> taskList)
Adds multiple tasks to a job.
Parameters:
createTasks
public void createTasks(String jobId, Collection<BatchTaskCreateParameters> taskList, BatchTaskBulkCreateOptions batchTaskBulkCreateOptions)
Creates a collection of Tasks to the specified Job.
Note that each Task must have a unique ID.This method can work with multiple threads. The parallel degree can be specified by the user. 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.
Parameters:
createTaskWithResponse
public Response<Void> createTaskWithResponse(String jobId, BinaryData task, RequestOptions requestOptions)
Creates a Task to the specified Job. 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.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Request Body Schema
{
id: String (Required)
displayName: String (Optional)
exitConditions (Optional): {
exitCodes (Optional): [
(Optional){
code: int (Required)
exitOptions (Required): {
jobAction: String(none/disable/terminate) (Optional)
dependencyAction: String(satisfy/block) (Optional)
}
}
]
exitCodeRanges (Optional): [
(Optional){
start: int (Required)
end: int (Required)
exitOptions (Required): (recursive schema, see exitOptions above)
}
]
preProcessingError (Optional): (recursive schema, see preProcessingError above)
fileUploadError (Optional): (recursive schema, see fileUploadError above)
default (Optional): (recursive schema, see default above)
}
commandLine: String (Required)
containerSettings (Optional): {
containerRunOptions: String (Optional)
imageName: String (Required)
registry (Optional): {
username: String (Optional)
password: String (Optional)
registryServer: String (Optional)
identityReference (Optional): {
resourceId: String (Optional)
}
}
workingDirectory: String(taskWorkingDirectory/containerImageDefault) (Optional)
containerHostBatchBindMounts (Optional): [
(Optional){
source: String(Shared/Startup/VfsMounts/Task/JobPrep/Applications) (Optional)
isReadOnly: Boolean (Optional)
}
]
}
resourceFiles (Optional): [
(Optional){
autoStorageContainerName: String (Optional)
storageContainerUrl: String (Optional)
httpUrl: String (Optional)
blobPrefix: String (Optional)
filePath: String (Optional)
fileMode: String (Optional)
identityReference (Optional): (recursive schema, see identityReference above)
}
]
outputFiles (Optional): [
(Optional){
filePattern: String (Required)
destination (Required): {
container (Optional): {
path: String (Optional)
containerUrl: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
uploadHeaders (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
}
}
uploadOptions (Required): {
uploadCondition: String(tasksuccess/taskfailure/taskcompletion) (Required)
}
}
]
environmentSettings (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
affinityInfo (Optional): {
affinityId: String (Required)
}
constraints (Optional): {
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
requiredSlots: Integer (Optional)
userIdentity (Optional): {
username: String (Optional)
autoUser (Optional): {
scope: String(task/pool) (Optional)
elevationLevel: String(nonadmin/admin) (Optional)
}
}
multiInstanceSettings (Optional): {
numberOfInstances: Integer (Optional)
coordinationCommandLine: String (Required)
commonResourceFiles (Optional): [
(recursive schema, see above)
]
}
dependsOn (Optional): {
taskIds (Optional): [
String (Optional)
]
taskIdRanges (Optional): [
(Optional){
start: int (Required)
end: int (Required)
}
]
}
applicationPackageReferences (Optional): [
(Optional){
applicationId: String (Required)
version: String (Optional)
}
]
authenticationTokenSettings (Optional): {
access (Optional): [
String(job) (Optional)
]
}
}
Parameters:
Returns:
deleteNodeFile
public void deleteNodeFile(String poolId, String nodeId, String filePath)
Deletes the specified file from the Compute Node.
Parameters:
deleteNodeFile
public void deleteNodeFile(String poolId, String nodeId, String filePath, BatchNodeFileDeleteOptions options)
Deletes the specified file from the Compute Node.
Parameters:
deleteNodeFileWithResponse
public Response<Void> deleteNodeFileWithResponse(String poolId, String nodeId, String filePath, RequestOptions requestOptions)
Deletes the specified file from the Compute Node.
Query Parameters
| --------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| recursive | Boolean | No | Whether to delete children of a directory. If the filePath parameter represents a directory instead of a file, you can set recursive to true to delete the directory and all of the files and subdirectories in it. If recursive is false then the directory must be empty or deletion will fail. |
You can add these to a request with RequestOptions#addQueryParam
Parameters:
Returns:
deleteNodeUser
public void deleteNodeUser(String poolId, String nodeId, String userName)
Deletes a user Account from the specified Compute Node. You can delete a user Account to a Compute Node only when it is in the idle or running state.
Parameters:
deleteNodeUser
public void deleteNodeUser(String poolId, String nodeId, String userName, BatchNodeUserDeleteOptions options)
Deletes a user Account from the specified Compute Node. You can delete a user Account to a Compute Node only when it is in the idle or running state.
Parameters:
deleteNodeUserWithResponse
public Response<Void> deleteNodeUserWithResponse(String poolId, String nodeId, String userName, RequestOptions requestOptions)
Deletes a user Account from the specified Compute Node. You can delete a user Account to a Compute Node only when it is in the idle or running state.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Parameters:
Returns:
deleteTask
public void deleteTask(String jobId, String taskId)
Deletes a Task from the specified Job. When a Task is deleted, all of the files in its directory on the Compute Node where it ran are also deleted (regardless of the retention time). For multi-instance Tasks, the delete Task operation applies synchronously to the primary task; subtasks and their files are then deleted asynchronously in the background.
Parameters:
deleteTask
public void deleteTask(String jobId, String taskId, BatchTaskDeleteOptions options, RequestConditions requestConditions)
Deletes a Task from the specified Job. When a Task is deleted, all of the files in its directory on the Compute Node where it ran are also deleted (regardless of the retention time). For multi-instance Tasks, the delete Task operation applies synchronously to the primary task; subtasks and their files are then deleted asynchronously in the background.
Parameters:
deleteTaskFile
public void deleteTaskFile(String jobId, String taskId, String filePath)
Deletes the specified Task file from the Compute Node where the Task ran.
Parameters:
deleteTaskFile
public void deleteTaskFile(String jobId, String taskId, String filePath, BatchTaskFileDeleteOptions options)
Deletes the specified Task file from the Compute Node where the Task ran.
Parameters:
deleteTaskFileWithResponse
public Response<Void> deleteTaskFileWithResponse(String jobId, String taskId, String filePath, RequestOptions requestOptions)
Deletes the specified Task file from the Compute Node where the Task ran.
Query Parameters
| --------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| recursive | Boolean | No | Whether to delete children of a directory. If the filePath parameter represents a directory instead of a file, you can set recursive to true to delete the directory and all of the files and subdirectories in it. If recursive is false then the directory must be empty or deletion will fail. |
You can add these to a request with RequestOptions#addQueryParam
Parameters:
Returns:
deleteTaskWithResponse
public Response<Void> deleteTaskWithResponse(String jobId, String taskId, RequestOptions requestOptions)
Deletes a Task from the specified Job. When a Task is deleted, all of the files in its directory on the Compute Node where it ran are also deleted (regardless of the retention time). For multi-instance Tasks, the delete Task operation applies synchronously to the primary task; subtasks and their files are then deleted asynchronously in the background.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Header Parameters
| ------------------- | -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| If-Modified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. |
| If-Unmodified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. |
| If-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. |
| If-None-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. |
You can add these to a request with RequestOptions#addHeader
Parameters:
Returns:
disableJobSchedule
public void disableJobSchedule(String jobScheduleId)
Disables a Job Schedule. No new Jobs will be created until the Job Schedule is enabled again.
Parameters:
disableJobSchedule
public void disableJobSchedule(String jobScheduleId, BatchJobScheduleDisableOptions options, RequestConditions requestConditions)
Disables a Job Schedule. No new Jobs will be created until the Job Schedule is enabled again.
Parameters:
disableJobScheduleWithResponse
public Response<Void> disableJobScheduleWithResponse(String jobScheduleId, RequestOptions requestOptions)
Disables a Job Schedule. No new Jobs will be created until the Job Schedule is enabled again.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Header Parameters
| ------------------- | -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| If-Modified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. |
| If-Unmodified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. |
| If-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. |
| If-None-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. |
You can add these to a request with RequestOptions#addHeader
Parameters:
Returns:
disableNodeScheduling
public void disableNodeScheduling(String poolId, String nodeId)
Disables Task scheduling on the specified Compute Node. You can disable Task scheduling on a Compute Node only if its current scheduling state is enabled.
Parameters:
disableNodeScheduling
public void disableNodeScheduling(String poolId, String nodeId, BatchNodeSchedulingDisableOptions options)
Disables Task scheduling on the specified Compute Node. You can disable Task scheduling on a Compute Node only if its current scheduling state is enabled.
Parameters:
disableNodeSchedulingWithResponse
public Response<Void> disableNodeSchedulingWithResponse(String poolId, String nodeId, RequestOptions requestOptions)
Disables Task scheduling on the specified Compute Node. You can disable Task scheduling on a Compute Node only if its current scheduling state is enabled.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Header Parameters
| ------------ | ------ | -------- | ---------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| Content-Type | String | No | The content type. Allowed values: "application/json; odata=minimalmetadata". |
You can add these to a request with RequestOptions#addHeader
Request Body Schema
{
nodeDisableSchedulingOption: String(requeue/terminate/taskcompletion) (Optional)
}
Parameters:
Returns:
disablePoolAutoScale
public void disablePoolAutoScale(String poolId)
Disables automatic scaling for a Pool.
Parameters:
disablePoolAutoScale
public void disablePoolAutoScale(String poolId, BatchPoolDisableAutoScaleOptions options)
Disables automatic scaling for a Pool.
Parameters:
disablePoolAutoScaleWithResponse
public Response<Void> disablePoolAutoScaleWithResponse(String poolId, RequestOptions requestOptions)
Disables automatic scaling for a Pool.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Parameters:
Returns:
enableJobSchedule
public void enableJobSchedule(String jobScheduleId)
Enables a Job Schedule.
Parameters:
enableJobSchedule
public void enableJobSchedule(String jobScheduleId, BatchJobScheduleEnableOptions options, RequestConditions requestConditions)
Enables a Job Schedule.
Parameters:
enableJobScheduleWithResponse
public Response<Void> enableJobScheduleWithResponse(String jobScheduleId, RequestOptions requestOptions)
Enables a Job Schedule.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Header Parameters
| ------------------- | -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| If-Modified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. |
| If-Unmodified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. |
| If-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. |
| If-None-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. |
You can add these to a request with RequestOptions#addHeader
Parameters:
Returns:
enableNodeScheduling
public void enableNodeScheduling(String poolId, String nodeId)
Enables Task scheduling on the specified Compute Node. You can enable Task scheduling on a Compute Node only if its current scheduling state is disabled.
Parameters:
enableNodeScheduling
public void enableNodeScheduling(String poolId, String nodeId, BatchNodeSchedulingEnableOptions options)
Enables Task scheduling on the specified Compute Node. You can enable Task scheduling on a Compute Node only if its current scheduling state is disabled.
Parameters:
enableNodeSchedulingWithResponse
public Response<Void> enableNodeSchedulingWithResponse(String poolId, String nodeId, RequestOptions requestOptions)
Enables Task scheduling on the specified Compute Node. You can enable Task scheduling on a Compute Node only if its current scheduling state is disabled.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Parameters:
Returns:
enablePoolAutoScale
public void enablePoolAutoScale(String poolId, BatchPoolEnableAutoScaleParameters parameters)
Enables automatic scaling for a Pool. You cannot enable automatic scaling on a Pool if a resize operation is in progress on the Pool. If automatic scaling of the Pool is currently disabled, you must specify a valid autoscale formula as part of the request. If automatic scaling of the Pool is already enabled, you may specify a new autoscale formula and/or a new evaluation interval. You cannot call this API for the same Pool more than once every 30 seconds.
Parameters:
enablePoolAutoScale
public void enablePoolAutoScale(String poolId, BatchPoolEnableAutoScaleParameters parameters, BatchPoolEnableAutoScaleOptions options, RequestConditions requestConditions)
Enables automatic scaling for a Pool. You cannot enable automatic scaling on a Pool if a resize operation is in progress on the Pool. If automatic scaling of the Pool is currently disabled, you must specify a valid autoscale formula as part of the request. If automatic scaling of the Pool is already enabled, you may specify a new autoscale formula and/or a new evaluation interval. You cannot call this API for the same Pool more than once every 30 seconds.
Parameters:
enablePoolAutoScaleWithResponse
public Response<Void> enablePoolAutoScaleWithResponse(String poolId, BinaryData parameters, RequestOptions requestOptions)
Enables automatic scaling for a Pool. You cannot enable automatic scaling on a Pool if a resize operation is in progress on the Pool. If automatic scaling of the Pool is currently disabled, you must specify a valid autoscale formula as part of the request. If automatic scaling of the Pool is already enabled, you may specify a new autoscale formula and/or a new evaluation interval. You cannot call this API for the same Pool more than once every 30 seconds.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Header Parameters
| ------------------- | -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| If-Modified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. |
| If-Unmodified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. |
| If-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. |
| If-None-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. |
You can add these to a request with RequestOptions#addHeader
Request Body Schema
{
autoScaleFormula: String (Optional)
autoScaleEvaluationInterval: Duration (Optional)
}
Parameters:
Returns:
evaluatePoolAutoScale
public AutoScaleRun evaluatePoolAutoScale(String poolId, BatchPoolEvaluateAutoScaleParameters parameters)
Gets the result of evaluating an automatic scaling formula on the Pool. This API is primarily for validating an autoscale formula, as it simply returns the result without applying the formula to the Pool. The Pool must have auto scaling enabled in order to evaluate a formula.
Parameters:
Returns:
evaluatePoolAutoScale
public AutoScaleRun evaluatePoolAutoScale(String poolId, BatchPoolEvaluateAutoScaleParameters parameters, BatchPoolEvaluateAutoScaleOptions options)
Gets the result of evaluating an automatic scaling formula on the Pool. This API is primarily for validating an autoscale formula, as it simply returns the result without applying the formula to the Pool. The Pool must have auto scaling enabled in order to evaluate a formula.
Parameters:
Returns:
evaluatePoolAutoScaleWithResponse
public Response<BinaryData> evaluatePoolAutoScaleWithResponse(String poolId, BinaryData parameters, RequestOptions requestOptions)
Gets the result of evaluating an automatic scaling formula on the Pool. This API is primarily for validating an autoscale formula, as it simply returns the result without applying the formula to the Pool. The Pool must have auto scaling enabled in order to evaluate a formula.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Request Body Schema
{
autoScaleFormula: String (Required)
}
Response Body Schema
{
timestamp: OffsetDateTime (Required)
results: String (Optional)
error (Optional): {
code: String (Optional)
message: String (Optional)
values (Optional): [
(Optional){
name: String (Optional)
value: String (Optional)
}
]
}
}
Parameters:
Returns:
getApplication
public BatchApplication getApplication(String applicationId)
Gets information about the specified Application. This operation returns only Applications and versions that are available for use on Compute Nodes; that is, that can be used in an Package reference. For administrator information about Applications and versions that are not yet available to Compute Nodes, use the Azure portal or the Azure Resource Manager API.
Parameters:
Returns:
getApplication
public BatchApplication getApplication(String applicationId, BatchApplicationGetOptions options)
Gets information about the specified Application. This operation returns only Applications and versions that are available for use on Compute Nodes; that is, that can be used in an Package reference. For administrator information about Applications and versions that are not yet available to Compute Nodes, use the Azure portal or the Azure Resource Manager API.
Parameters:
Returns:
getApplicationWithResponse
public Response<BinaryData> getApplicationWithResponse(String applicationId, RequestOptions requestOptions)
Gets information about the specified Application. This operation returns only Applications and versions that are available for use on Compute Nodes; that is, that can be used in an Package reference. For administrator information about Applications and versions that are not yet available to Compute Nodes, use the Azure portal or the Azure Resource Manager API.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Response Body Schema
{
id: String (Required)
displayName: String (Required)
versions (Required): [
String (Required)
]
}
Parameters:
Returns:
getCertificate
public BatchCertificate getCertificate(String thumbprintAlgorithm, String thumbprint)
Gets information about the specified Certificate.
Parameters:
Returns:
getCertificate
public BatchCertificate getCertificate(String thumbprintAlgorithm, String thumbprint, BatchCertificateGetOptions options)
Gets information about the specified Certificate.
Parameters:
Returns:
getCertificateWithResponse
public Response<BinaryData> getCertificateWithResponse(String thumbprintAlgorithm, String thumbprint, RequestOptions requestOptions)
Gets information about the specified Certificate.
Query Parameters
| ------- | ------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| $select | List<String> | No | An OData $select clause. In the form of "," separated string. |
You can add these to a request with RequestOptions#addQueryParam
Response Body Schema
{
thumbprint: String (Required)
thumbprintAlgorithm: String (Required)
url: String (Optional)
state: String(active/deleting/deletefailed) (Optional)
stateTransitionTime: OffsetDateTime (Optional)
previousState: String(active/deleting/deletefailed) (Optional)
previousStateTransitionTime: OffsetDateTime (Optional)
publicData: String (Optional)
deleteCertificateError (Optional): {
code: String (Optional)
message: String (Optional)
values (Optional): [
(Optional){
name: String (Optional)
value: String (Optional)
}
]
}
data: byte[] (Required)
certificateFormat: String(pfx/cer) (Optional)
password: String (Optional)
}
Parameters:
Returns:
getJob
public BatchJob getJob(String jobId)
Gets information about the specified Job.
Parameters:
Returns:
getJob
public BatchJob getJob(String jobId, BatchJobGetOptions options, RequestConditions requestConditions)
Gets information about the specified Job.
Parameters:
Returns:
getJobSchedule
public BatchJobSchedule getJobSchedule(String jobScheduleId)
Gets information about the specified Job Schedule.
Parameters:
Returns:
getJobSchedule
public BatchJobSchedule getJobSchedule(String jobScheduleId, BatchJobScheduleGetOptions options, RequestConditions requestConditions)
Gets information about the specified Job Schedule.
Parameters:
Returns:
getJobScheduleWithResponse
public Response<BinaryData> getJobScheduleWithResponse(String jobScheduleId, RequestOptions requestOptions)
Gets information about the specified Job Schedule.
Query Parameters
| ------- | ------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| $select | List<String> | No | An OData $select clause. In the form of "," separated string. |
| $expand | List<String> | No | An OData $expand clause. In the form of "," separated string. |
You can add these to a request with RequestOptions#addQueryParam
Header Parameters
| ------------------- | -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| If-Modified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. |
| If-Unmodified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. |
| If-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. |
| If-None-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. |
You can add these to a request with RequestOptions#addHeader
Response Body Schema
{
id: String (Optional)
displayName: String (Optional)
url: String (Optional)
eTag: String (Optional)
lastModified: OffsetDateTime (Optional)
creationTime: OffsetDateTime (Optional)
state: String(active/completed/disabled/terminating/deleting) (Optional)
stateTransitionTime: OffsetDateTime (Optional)
previousState: String(active/completed/disabled/terminating/deleting) (Optional)
previousStateTransitionTime: OffsetDateTime (Optional)
schedule (Optional): {
doNotRunUntil: OffsetDateTime (Optional)
doNotRunAfter: OffsetDateTime (Optional)
startWindow: Duration (Optional)
recurrenceInterval: Duration (Optional)
}
jobSpecification (Required): {
priority: Integer (Optional)
allowTaskPreemption: Boolean (Optional)
maxParallelTasks: Integer (Optional)
displayName: String (Optional)
usesTaskDependencies: Boolean (Optional)
onAllTasksComplete: String(noaction/terminatejob) (Optional)
onTaskFailure: String(noaction/performexitoptionsjobaction) (Optional)
networkConfiguration (Optional): {
subnetId: String (Required)
skipWithdrawFromVNet: Boolean (Optional)
}
constraints (Optional): {
maxWallClockTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
jobManagerTask (Optional): {
id: String (Required)
displayName: String (Optional)
commandLine: String (Required)
containerSettings (Optional): {
containerRunOptions: String (Optional)
imageName: String (Required)
registry (Optional): {
username: String (Optional)
password: String (Optional)
registryServer: String (Optional)
identityReference (Optional): {
resourceId: String (Optional)
}
}
workingDirectory: String(taskWorkingDirectory/containerImageDefault) (Optional)
containerHostBatchBindMounts (Optional): [
(Optional){
source: String(Shared/Startup/VfsMounts/Task/JobPrep/Applications) (Optional)
isReadOnly: Boolean (Optional)
}
]
}
resourceFiles (Optional): [
(Optional){
autoStorageContainerName: String (Optional)
storageContainerUrl: String (Optional)
httpUrl: String (Optional)
blobPrefix: String (Optional)
filePath: String (Optional)
fileMode: String (Optional)
identityReference (Optional): (recursive schema, see identityReference above)
}
]
outputFiles (Optional): [
(Optional){
filePattern: String (Required)
destination (Required): {
container (Optional): {
path: String (Optional)
containerUrl: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
uploadHeaders (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
}
}
uploadOptions (Required): {
uploadCondition: String(tasksuccess/taskfailure/taskcompletion) (Required)
}
}
]
environmentSettings (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
constraints (Optional): {
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
requiredSlots: Integer (Optional)
killJobOnCompletion: Boolean (Optional)
userIdentity (Optional): {
username: String (Optional)
autoUser (Optional): {
scope: String(task/pool) (Optional)
elevationLevel: String(nonadmin/admin) (Optional)
}
}
runExclusive: Boolean (Optional)
applicationPackageReferences (Optional): [
(Optional){
applicationId: String (Required)
version: String (Optional)
}
]
authenticationTokenSettings (Optional): {
access (Optional): [
String(job) (Optional)
]
}
allowLowPriorityNode: Boolean (Optional)
}
jobPreparationTask (Optional): {
id: String (Optional)
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
constraints (Optional): (recursive schema, see constraints above)
waitForSuccess: Boolean (Optional)
userIdentity (Optional): (recursive schema, see userIdentity above)
rerunOnNodeRebootAfterSuccess: Boolean (Optional)
}
jobReleaseTask (Optional): {
id: String (Optional)
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
userIdentity (Optional): (recursive schema, see userIdentity above)
}
commonEnvironmentSettings (Optional): [
(recursive schema, see above)
]
poolInfo (Required): {
poolId: String (Optional)
autoPoolSpecification (Optional): {
autoPoolIdPrefix: String (Optional)
poolLifetimeOption: String(jobschedule/job) (Required)
keepAlive: Boolean (Optional)
pool (Optional): {
displayName: String (Optional)
vmSize: String (Required)
virtualMachineConfiguration (Optional): {
imageReference (Required): {
publisher: String (Optional)
offer: String (Optional)
sku: String (Optional)
version: String (Optional)
virtualMachineImageId: String (Optional)
exactVersion: String (Optional)
sharedGalleryImageId: String (Optional)
communityGalleryImageId: String (Optional)
}
nodeAgentSKUId: String (Required)
windowsConfiguration (Optional): {
enableAutomaticUpdates: Boolean (Optional)
}
dataDisks (Optional): [
(Optional){
lun: int (Required)
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: int (Required)
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
}
]
licenseType: String (Optional)
containerConfiguration (Optional): {
type: String(dockerCompatible/criCompatible) (Required)
containerImageNames (Optional): [
String (Optional)
]
containerRegistries (Optional): [
(recursive schema, see above)
]
}
diskEncryptionConfiguration (Optional): {
targets (Optional): [
String(osdisk/temporarydisk) (Optional)
]
}
nodePlacementConfiguration (Optional): {
policy: String(regional/zonal) (Optional)
}
extensions (Optional): [
(Optional){
name: String (Required)
publisher: String (Required)
type: String (Required)
typeHandlerVersion: String (Optional)
autoUpgradeMinorVersion: Boolean (Optional)
enableAutomaticUpgrade: Boolean (Optional)
settings (Optional): {
String: String (Required)
}
protectedSettings (Optional): {
String: String (Required)
}
provisionAfterExtensions (Optional): [
String (Optional)
]
}
]
osDisk (Optional): {
ephemeralOSDiskSettings (Optional): {
placement: String(cachedisk) (Optional)
}
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: Integer (Optional)
managedDisk (Optional): {
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
securityProfile (Optional): {
securityEncryptionType: String(NonPersistedTPM/VMGuestStateOnly) (Optional)
}
}
writeAcceleratorEnabled: Boolean (Optional)
}
securityProfile (Optional): {
encryptionAtHost: Boolean (Optional)
securityType: String(trustedLaunch/confidentialVM) (Optional)
uefiSettings (Optional): {
secureBootEnabled: Boolean (Optional)
vTpmEnabled: Boolean (Optional)
}
}
serviceArtifactReference (Optional): {
id: String (Required)
}
}
taskSlotsPerNode: Integer (Optional)
taskSchedulingPolicy (Optional): {
nodeFillType: String(spread/pack) (Required)
}
resizeTimeout: Duration (Optional)
resourceTags: String (Optional)
targetDedicatedNodes: Integer (Optional)
targetLowPriorityNodes: Integer (Optional)
enableAutoScale: Boolean (Optional)
autoScaleFormula: String (Optional)
autoScaleEvaluationInterval: Duration (Optional)
enableInterNodeCommunication: Boolean (Optional)
networkConfiguration (Optional): {
subnetId: String (Optional)
dynamicVNetAssignmentScope: String(none/job) (Optional)
endpointConfiguration (Optional): {
inboundNATPools (Required): [
(Required){
name: String (Required)
protocol: String(tcp/udp) (Required)
backendPort: int (Required)
frontendPortRangeStart: int (Required)
frontendPortRangeEnd: int (Required)
networkSecurityGroupRules (Optional): [
(Optional){
priority: int (Required)
access: String(allow/deny) (Required)
sourceAddressPrefix: String (Required)
sourcePortRanges (Optional): [
String (Optional)
]
}
]
}
]
}
publicIPAddressConfiguration (Optional): {
provision: String(batchmanaged/usermanaged/nopublicipaddresses) (Optional)
ipAddressIds (Optional): [
String (Optional)
]
}
enableAcceleratedNetworking: Boolean (Optional)
}
startTask (Optional): {
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
userIdentity (Optional): (recursive schema, see userIdentity above)
maxTaskRetryCount: Integer (Optional)
waitForSuccess: Boolean (Optional)
}
certificateReferences (Optional): [
(Optional){
thumbprint: String (Required)
thumbprintAlgorithm: String (Required)
storeLocation: String(currentuser/localmachine) (Optional)
storeName: String (Optional)
visibility (Optional): [
String(starttask/task/remoteuser) (Optional)
]
}
]
applicationPackageReferences (Optional): [
(recursive schema, see above)
]
userAccounts (Optional): [
(Optional){
name: String (Required)
password: String (Required)
elevationLevel: String(nonadmin/admin) (Optional)
linuxUserConfiguration (Optional): {
uid: Integer (Optional)
gid: Integer (Optional)
sshPrivateKey: String (Optional)
}
windowsUserConfiguration (Optional): {
loginMode: String(batch/interactive) (Optional)
}
}
]
metadata (Optional): [
(Optional){
name: String (Required)
value: String (Required)
}
]
mountConfiguration (Optional): [
(Optional){
azureBlobFileSystemConfiguration (Optional): {
accountName: String (Required)
containerName: String (Required)
accountKey: String (Optional)
sasKey: String (Optional)
blobfuseOptions: String (Optional)
relativeMountPath: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
}
nfsMountConfiguration (Optional): {
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
cifsMountConfiguration (Optional): {
username: String (Required)
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
password: String (Required)
}
azureFileShareConfiguration (Optional): {
accountName: String (Required)
accountKey: String (Required)
azureFileUrl: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
}
]
targetNodeCommunicationMode: String(default/classic/simplified) (Optional)
upgradePolicy (Optional): {
mode: String(automatic/manual/rolling) (Required)
automaticOSUpgradePolicy (Optional): {
disableAutomaticRollback: Boolean (Optional)
enableAutomaticOSUpgrade: Boolean (Optional)
useRollingUpgradePolicy: Boolean (Optional)
osRollingUpgradeDeferral: Boolean (Optional)
}
rollingUpgradePolicy (Optional): {
enableCrossZoneUpgrade: Boolean (Optional)
maxBatchInstancePercent: Integer (Optional)
maxUnhealthyInstancePercent: Integer (Optional)
maxUnhealthyUpgradedInstancePercent: Integer (Optional)
pauseTimeBetweenBatches: Duration (Optional)
prioritizeUnhealthyInstances: Boolean (Optional)
rollbackFailedInstancesOnPolicyBreach: Boolean (Optional)
}
}
}
}
}
metadata (Optional): [
(recursive schema, see above)
]
}
executionInfo (Optional): {
nextRunTime: OffsetDateTime (Optional)
recentJob (Optional): {
id: String (Optional)
url: String (Optional)
}
endTime: OffsetDateTime (Optional)
}
metadata (Optional): [
(recursive schema, see above)
]
stats (Optional): {
url: String (Required)
startTime: OffsetDateTime (Required)
lastUpdateTime: OffsetDateTime (Required)
userCPUTime: Duration (Required)
kernelCPUTime: Duration (Required)
wallClockTime: Duration (Required)
readIOps: long (Required)
writeIOps: long (Required)
readIOGiB: double (Required)
writeIOGiB: double (Required)
numSucceededTasks: long (Required)
numFailedTasks: long (Required)
numTaskRetries: long (Required)
waitTime: Duration (Required)
}
}
Parameters:
Returns:
getJobTaskCounts
public BatchTaskCountsResult getJobTaskCounts(String jobId)
Gets the Task counts for the specified Job. Task counts provide a count of the Tasks by active, running or completed Task state, and a count of Tasks which succeeded or failed. Tasks in the preparing state are counted as running. Note that the numbers returned may not always be up to date. If you need exact task counts, use a list query.
Parameters:
Returns:
getJobTaskCounts
public BatchTaskCountsResult getJobTaskCounts(String jobId, BatchJobTaskCountsGetOptions options)
Gets the Task counts for the specified Job. Task counts provide a count of the Tasks by active, running or completed Task state, and a count of Tasks which succeeded or failed. Tasks in the preparing state are counted as running. Note that the numbers returned may not always be up to date. If you need exact task counts, use a list query.
Parameters:
Returns:
getJobTaskCountsWithResponse
public Response<BinaryData> getJobTaskCountsWithResponse(String jobId, RequestOptions requestOptions)
Gets the Task counts for the specified Job. Task counts provide a count of the Tasks by active, running or completed Task state, and a count of Tasks which succeeded or failed. Tasks in the preparing state are counted as running. Note that the numbers returned may not always be up to date. If you need exact task counts, use a list query.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Response Body Schema
{
taskCounts (Required): {
active: int (Required)
running: int (Required)
completed: int (Required)
succeeded: int (Required)
failed: int (Required)
}
taskSlotCounts (Required): {
active: int (Required)
running: int (Required)
completed: int (Required)
succeeded: int (Required)
failed: int (Required)
}
}
Parameters:
Returns:
getJobWithResponse
public Response<BinaryData> getJobWithResponse(String jobId, RequestOptions requestOptions)
Gets information about the specified Job.
Query Parameters
| ------- | ------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| $select | List<String> | No | An OData $select clause. In the form of "," separated string. |
| $expand | List<String> | No | An OData $expand clause. In the form of "," separated string. |
You can add these to a request with RequestOptions#addQueryParam
Header Parameters
| ------------------- | -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| If-Modified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. |
| If-Unmodified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. |
| If-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. |
| If-None-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. |
You can add these to a request with RequestOptions#addHeader
Response Body Schema
{
id: String (Optional)
displayName: String (Optional)
usesTaskDependencies: Boolean (Optional)
url: String (Optional)
eTag: String (Optional)
lastModified: OffsetDateTime (Optional)
creationTime: OffsetDateTime (Optional)
state: String(active/disabling/disabled/enabling/terminating/completed/deleting) (Optional)
stateTransitionTime: OffsetDateTime (Optional)
previousState: String(active/disabling/disabled/enabling/terminating/completed/deleting) (Optional)
previousStateTransitionTime: OffsetDateTime (Optional)
priority: Integer (Optional)
allowTaskPreemption: Boolean (Optional)
maxParallelTasks: Integer (Optional)
constraints (Optional): {
maxWallClockTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
jobManagerTask (Optional): {
id: String (Required)
displayName: String (Optional)
commandLine: String (Required)
containerSettings (Optional): {
containerRunOptions: String (Optional)
imageName: String (Required)
registry (Optional): {
username: String (Optional)
password: String (Optional)
registryServer: String (Optional)
identityReference (Optional): {
resourceId: String (Optional)
}
}
workingDirectory: String(taskWorkingDirectory/containerImageDefault) (Optional)
containerHostBatchBindMounts (Optional): [
(Optional){
source: String(Shared/Startup/VfsMounts/Task/JobPrep/Applications) (Optional)
isReadOnly: Boolean (Optional)
}
]
}
resourceFiles (Optional): [
(Optional){
autoStorageContainerName: String (Optional)
storageContainerUrl: String (Optional)
httpUrl: String (Optional)
blobPrefix: String (Optional)
filePath: String (Optional)
fileMode: String (Optional)
identityReference (Optional): (recursive schema, see identityReference above)
}
]
outputFiles (Optional): [
(Optional){
filePattern: String (Required)
destination (Required): {
container (Optional): {
path: String (Optional)
containerUrl: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
uploadHeaders (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
}
}
uploadOptions (Required): {
uploadCondition: String(tasksuccess/taskfailure/taskcompletion) (Required)
}
}
]
environmentSettings (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
constraints (Optional): {
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
requiredSlots: Integer (Optional)
killJobOnCompletion: Boolean (Optional)
userIdentity (Optional): {
username: String (Optional)
autoUser (Optional): {
scope: String(task/pool) (Optional)
elevationLevel: String(nonadmin/admin) (Optional)
}
}
runExclusive: Boolean (Optional)
applicationPackageReferences (Optional): [
(Optional){
applicationId: String (Required)
version: String (Optional)
}
]
authenticationTokenSettings (Optional): {
access (Optional): [
String(job) (Optional)
]
}
allowLowPriorityNode: Boolean (Optional)
}
jobPreparationTask (Optional): {
id: String (Optional)
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
constraints (Optional): (recursive schema, see constraints above)
waitForSuccess: Boolean (Optional)
userIdentity (Optional): (recursive schema, see userIdentity above)
rerunOnNodeRebootAfterSuccess: Boolean (Optional)
}
jobReleaseTask (Optional): {
id: String (Optional)
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
userIdentity (Optional): (recursive schema, see userIdentity above)
}
commonEnvironmentSettings (Optional): [
(recursive schema, see above)
]
poolInfo (Required): {
poolId: String (Optional)
autoPoolSpecification (Optional): {
autoPoolIdPrefix: String (Optional)
poolLifetimeOption: String(jobschedule/job) (Required)
keepAlive: Boolean (Optional)
pool (Optional): {
displayName: String (Optional)
vmSize: String (Required)
virtualMachineConfiguration (Optional): {
imageReference (Required): {
publisher: String (Optional)
offer: String (Optional)
sku: String (Optional)
version: String (Optional)
virtualMachineImageId: String (Optional)
exactVersion: String (Optional)
sharedGalleryImageId: String (Optional)
communityGalleryImageId: String (Optional)
}
nodeAgentSKUId: String (Required)
windowsConfiguration (Optional): {
enableAutomaticUpdates: Boolean (Optional)
}
dataDisks (Optional): [
(Optional){
lun: int (Required)
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: int (Required)
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
}
]
licenseType: String (Optional)
containerConfiguration (Optional): {
type: String(dockerCompatible/criCompatible) (Required)
containerImageNames (Optional): [
String (Optional)
]
containerRegistries (Optional): [
(recursive schema, see above)
]
}
diskEncryptionConfiguration (Optional): {
targets (Optional): [
String(osdisk/temporarydisk) (Optional)
]
}
nodePlacementConfiguration (Optional): {
policy: String(regional/zonal) (Optional)
}
extensions (Optional): [
(Optional){
name: String (Required)
publisher: String (Required)
type: String (Required)
typeHandlerVersion: String (Optional)
autoUpgradeMinorVersion: Boolean (Optional)
enableAutomaticUpgrade: Boolean (Optional)
settings (Optional): {
String: String (Required)
}
protectedSettings (Optional): {
String: String (Required)
}
provisionAfterExtensions (Optional): [
String (Optional)
]
}
]
osDisk (Optional): {
ephemeralOSDiskSettings (Optional): {
placement: String(cachedisk) (Optional)
}
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: Integer (Optional)
managedDisk (Optional): {
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
securityProfile (Optional): {
securityEncryptionType: String(NonPersistedTPM/VMGuestStateOnly) (Optional)
}
}
writeAcceleratorEnabled: Boolean (Optional)
}
securityProfile (Optional): {
encryptionAtHost: Boolean (Optional)
securityType: String(trustedLaunch/confidentialVM) (Optional)
uefiSettings (Optional): {
secureBootEnabled: Boolean (Optional)
vTpmEnabled: Boolean (Optional)
}
}
serviceArtifactReference (Optional): {
id: String (Required)
}
}
taskSlotsPerNode: Integer (Optional)
taskSchedulingPolicy (Optional): {
nodeFillType: String(spread/pack) (Required)
}
resizeTimeout: Duration (Optional)
resourceTags: String (Optional)
targetDedicatedNodes: Integer (Optional)
targetLowPriorityNodes: Integer (Optional)
enableAutoScale: Boolean (Optional)
autoScaleFormula: String (Optional)
autoScaleEvaluationInterval: Duration (Optional)
enableInterNodeCommunication: Boolean (Optional)
networkConfiguration (Optional): {
subnetId: String (Optional)
dynamicVNetAssignmentScope: String(none/job) (Optional)
endpointConfiguration (Optional): {
inboundNATPools (Required): [
(Required){
name: String (Required)
protocol: String(tcp/udp) (Required)
backendPort: int (Required)
frontendPortRangeStart: int (Required)
frontendPortRangeEnd: int (Required)
networkSecurityGroupRules (Optional): [
(Optional){
priority: int (Required)
access: String(allow/deny) (Required)
sourceAddressPrefix: String (Required)
sourcePortRanges (Optional): [
String (Optional)
]
}
]
}
]
}
publicIPAddressConfiguration (Optional): {
provision: String(batchmanaged/usermanaged/nopublicipaddresses) (Optional)
ipAddressIds (Optional): [
String (Optional)
]
}
enableAcceleratedNetworking: Boolean (Optional)
}
startTask (Optional): {
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
userIdentity (Optional): (recursive schema, see userIdentity above)
maxTaskRetryCount: Integer (Optional)
waitForSuccess: Boolean (Optional)
}
certificateReferences (Optional): [
(Optional){
thumbprint: String (Required)
thumbprintAlgorithm: String (Required)
storeLocation: String(currentuser/localmachine) (Optional)
storeName: String (Optional)
visibility (Optional): [
String(starttask/task/remoteuser) (Optional)
]
}
]
applicationPackageReferences (Optional): [
(recursive schema, see above)
]
userAccounts (Optional): [
(Optional){
name: String (Required)
password: String (Required)
elevationLevel: String(nonadmin/admin) (Optional)
linuxUserConfiguration (Optional): {
uid: Integer (Optional)
gid: Integer (Optional)
sshPrivateKey: String (Optional)
}
windowsUserConfiguration (Optional): {
loginMode: String(batch/interactive) (Optional)
}
}
]
metadata (Optional): [
(Optional){
name: String (Required)
value: String (Required)
}
]
mountConfiguration (Optional): [
(Optional){
azureBlobFileSystemConfiguration (Optional): {
accountName: String (Required)
containerName: String (Required)
accountKey: String (Optional)
sasKey: String (Optional)
blobfuseOptions: String (Optional)
relativeMountPath: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
}
nfsMountConfiguration (Optional): {
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
cifsMountConfiguration (Optional): {
username: String (Required)
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
password: String (Required)
}
azureFileShareConfiguration (Optional): {
accountName: String (Required)
accountKey: String (Required)
azureFileUrl: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
}
]
targetNodeCommunicationMode: String(default/classic/simplified) (Optional)
upgradePolicy (Optional): {
mode: String(automatic/manual/rolling) (Required)
automaticOSUpgradePolicy (Optional): {
disableAutomaticRollback: Boolean (Optional)
enableAutomaticOSUpgrade: Boolean (Optional)
useRollingUpgradePolicy: Boolean (Optional)
osRollingUpgradeDeferral: Boolean (Optional)
}
rollingUpgradePolicy (Optional): {
enableCrossZoneUpgrade: Boolean (Optional)
maxBatchInstancePercent: Integer (Optional)
maxUnhealthyInstancePercent: Integer (Optional)
maxUnhealthyUpgradedInstancePercent: Integer (Optional)
pauseTimeBetweenBatches: Duration (Optional)
prioritizeUnhealthyInstances: Boolean (Optional)
rollbackFailedInstancesOnPolicyBreach: Boolean (Optional)
}
}
}
}
}
onAllTasksComplete: String(noaction/terminatejob) (Optional)
onTaskFailure: String(noaction/performexitoptionsjobaction) (Optional)
networkConfiguration (Optional): {
subnetId: String (Required)
skipWithdrawFromVNet: Boolean (Optional)
}
metadata (Optional): [
(recursive schema, see above)
]
executionInfo (Optional): {
startTime: OffsetDateTime (Required)
endTime: OffsetDateTime (Optional)
poolId: String (Optional)
schedulingError (Optional): {
category: String(usererror/servererror) (Required)
code: String (Optional)
message: String (Optional)
details (Optional): [
(Optional){
name: String (Optional)
value: String (Optional)
}
]
}
terminateReason: String (Optional)
}
stats (Optional): {
url: String (Required)
startTime: OffsetDateTime (Required)
lastUpdateTime: OffsetDateTime (Required)
userCPUTime: Duration (Required)
kernelCPUTime: Duration (Required)
wallClockTime: Duration (Required)
readIOps: long (Required)
writeIOps: long (Required)
readIOGiB: double (Required)
writeIOGiB: double (Required)
numSucceededTasks: long (Required)
numFailedTasks: long (Required)
numTaskRetries: long (Required)
waitTime: Duration (Required)
}
}
Parameters:
Returns:
getNode
public BatchNode getNode(String poolId, String nodeId)
Gets information about the specified Compute Node.
Parameters:
Returns:
getNode
public BatchNode getNode(String poolId, String nodeId, BatchNodeGetOptions options)
Gets information about the specified Compute Node.
Parameters:
Returns:
getNodeExtension
public BatchNodeVMExtension getNodeExtension(String poolId, String nodeId, String extensionName)
Gets information about the specified Compute Node Extension.
Parameters:
Returns:
getNodeExtension
public BatchNodeVMExtension getNodeExtension(String poolId, String nodeId, String extensionName, BatchNodeExtensionGetOptions options)
Gets information about the specified Compute Node Extension.
Parameters:
Returns:
getNodeExtensionWithResponse
public Response<BinaryData> getNodeExtensionWithResponse(String poolId, String nodeId, String extensionName, RequestOptions requestOptions)
Gets information about the specified Compute Node Extension.
Query Parameters
| ------- | ------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| $select | List<String> | No | An OData $select clause. In the form of "," separated string. |
You can add these to a request with RequestOptions#addQueryParam
Response Body Schema
{
provisioningState: String (Optional)
vmExtension (Optional): {
name: String (Required)
publisher: String (Required)
type: String (Required)
typeHandlerVersion: String (Optional)
autoUpgradeMinorVersion: Boolean (Optional)
enableAutomaticUpgrade: Boolean (Optional)
settings (Optional): {
String: String (Required)
}
protectedSettings (Optional): {
String: String (Required)
}
provisionAfterExtensions (Optional): [
String (Optional)
]
}
instanceView (Optional): {
name: String (Optional)
statuses (Optional): [
(Optional){
code: String (Optional)
displayStatus: String (Optional)
level: String(Error/Info/Warning) (Optional)
message: String (Optional)
time: OffsetDateTime (Optional)
}
]
subStatuses (Optional): [
(recursive schema, see above)
]
}
}
Parameters:
Returns:
getNodeFile
public BinaryData getNodeFile(String poolId, String nodeId, String filePath)
Returns the content of the specified Compute Node file.
Parameters:
Returns:
getNodeFile
public BinaryData getNodeFile(String poolId, String nodeId, String filePath, BatchNodeFileGetOptions options)
Returns the content of the specified Compute Node file.
Parameters:
Returns:
getNodeFileProperties
public BatchFileProperties getNodeFileProperties(String poolId, String nodeId, String filePath)
Gets the properties of the specified Compute Node file.
Parameters:
Returns:
getNodeFileProperties
public BatchFileProperties getNodeFileProperties(String poolId, String nodeId, String filePath, BatchNodeFilePropertiesGetOptions options)
Gets the properties of the specified Compute Node file.
Parameters:
Returns:
getNodeFilePropertiesWithResponse
public Response<Void> getNodeFilePropertiesWithResponse(String poolId, String nodeId, String filePath, RequestOptions requestOptions)
Gets the properties of the specified Compute Node file.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Header Parameters
| ------------------- | -------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Name | Type | Required | Description |
| If-Modified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. |
| If-Unmodified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. |
You can add these to a request with RequestOptions#addHeader
Parameters:
Returns:
getNodeFileWithResponse
public Response<BinaryData> getNodeFileWithResponse(String poolId, String nodeId, String filePath, RequestOptions requestOptions)
Returns the content of the specified Compute Node file.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Header Parameters
| ------------------- | -------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Name | Type | Required | Description |
| If-Modified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. |
| If-Unmodified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. |
| ocp-range | String | No | The byte range to be retrieved. The default is to retrieve the entire file. The format is bytes=startRange-endRange. |
You can add these to a request with RequestOptions#addHeader
Response Body Schema
BinaryData
Parameters:
Returns:
getNodeRemoteLoginSettings
public BatchNodeRemoteLoginSettings getNodeRemoteLoginSettings(String poolId, String nodeId)
Gets the settings required for remote login to a Compute Node. Before you can remotely login to a Compute Node using the remote login settings, you must create a user Account on the Compute Node.
Parameters:
Returns:
getNodeRemoteLoginSettings
public BatchNodeRemoteLoginSettings getNodeRemoteLoginSettings(String poolId, String nodeId, BatchNodeRemoteLoginSettingsGetOptions options)
Gets the settings required for remote login to a Compute Node. Before you can remotely login to a Compute Node using the remote login settings, you must create a user Account on the Compute Node.
Parameters:
Returns:
getNodeRemoteLoginSettingsWithResponse
public Response<BinaryData> getNodeRemoteLoginSettingsWithResponse(String poolId, String nodeId, RequestOptions requestOptions)
Gets the settings required for remote login to a Compute Node. Before you can remotely login to a Compute Node using the remote login settings, you must create a user Account on the Compute Node.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Response Body Schema
{
remoteLoginIPAddress: String (Required)
remoteLoginPort: int (Required)
}
Parameters:
Returns:
getNodeWithResponse
public Response<BinaryData> getNodeWithResponse(String poolId, String nodeId, RequestOptions requestOptions)
Gets information about the specified Compute Node.
Query Parameters
| ------- | ------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| $select | List<String> | No | An OData $select clause. In the form of "," separated string. |
You can add these to a request with RequestOptions#addQueryParam
Response Body Schema
{
id: String (Optional)
url: String (Optional)
state: String(idle/rebooting/reimaging/running/unusable/creating/starting/waitingforstarttask/starttaskfailed/unknown/leavingpool/offline/preempted/upgradingos/deallocated/deallocating) (Optional)
schedulingState: String(enabled/disabled) (Optional)
stateTransitionTime: OffsetDateTime (Optional)
lastBootTime: OffsetDateTime (Optional)
allocationTime: OffsetDateTime (Optional)
ipAddress: String (Optional)
affinityId: String (Optional)
vmSize: String (Optional)
totalTasksRun: Integer (Optional)
runningTasksCount: Integer (Optional)
runningTaskSlotsCount: Integer (Optional)
totalTasksSucceeded: Integer (Optional)
recentTasks (Optional): [
(Optional){
taskUrl: String (Optional)
jobId: String (Optional)
taskId: String (Optional)
subtaskId: Integer (Optional)
taskState: String(active/preparing/running/completed) (Required)
executionInfo (Optional): {
startTime: OffsetDateTime (Optional)
endTime: OffsetDateTime (Optional)
exitCode: Integer (Optional)
containerInfo (Optional): {
containerId: String (Optional)
state: String (Optional)
error: String (Optional)
}
failureInfo (Optional): {
category: String(usererror/servererror) (Required)
code: String (Optional)
message: String (Optional)
details (Optional): [
(Optional){
name: String (Optional)
value: String (Optional)
}
]
}
retryCount: int (Required)
lastRetryTime: OffsetDateTime (Optional)
requeueCount: int (Required)
lastRequeueTime: OffsetDateTime (Optional)
result: String(success/failure) (Optional)
}
}
]
startTask (Optional): {
commandLine: String (Required)
containerSettings (Optional): {
containerRunOptions: String (Optional)
imageName: String (Required)
registry (Optional): {
username: String (Optional)
password: String (Optional)
registryServer: String (Optional)
identityReference (Optional): {
resourceId: String (Optional)
}
}
workingDirectory: String(taskWorkingDirectory/containerImageDefault) (Optional)
containerHostBatchBindMounts (Optional): [
(Optional){
source: String(Shared/Startup/VfsMounts/Task/JobPrep/Applications) (Optional)
isReadOnly: Boolean (Optional)
}
]
}
resourceFiles (Optional): [
(Optional){
autoStorageContainerName: String (Optional)
storageContainerUrl: String (Optional)
httpUrl: String (Optional)
blobPrefix: String (Optional)
filePath: String (Optional)
fileMode: String (Optional)
identityReference (Optional): (recursive schema, see identityReference above)
}
]
environmentSettings (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
userIdentity (Optional): {
username: String (Optional)
autoUser (Optional): {
scope: String(task/pool) (Optional)
elevationLevel: String(nonadmin/admin) (Optional)
}
}
maxTaskRetryCount: Integer (Optional)
waitForSuccess: Boolean (Optional)
}
startTaskInfo (Optional): {
state: String(running/completed) (Required)
startTime: OffsetDateTime (Required)
endTime: OffsetDateTime (Optional)
exitCode: Integer (Optional)
containerInfo (Optional): (recursive schema, see containerInfo above)
failureInfo (Optional): (recursive schema, see failureInfo above)
retryCount: int (Required)
lastRetryTime: OffsetDateTime (Optional)
result: String(success/failure) (Optional)
}
certificateReferences (Optional): [
(Optional){
thumbprint: String (Required)
thumbprintAlgorithm: String (Required)
storeLocation: String(currentuser/localmachine) (Optional)
storeName: String (Optional)
visibility (Optional): [
String(starttask/task/remoteuser) (Optional)
]
}
]
errors (Optional): [
(Optional){
code: String (Optional)
message: String (Optional)
errorDetails (Optional): [
(recursive schema, see above)
]
}
]
isDedicated: Boolean (Optional)
endpointConfiguration (Optional): {
inboundEndpoints (Required): [
(Required){
name: String (Required)
protocol: String(tcp/udp) (Required)
publicIPAddress: String (Required)
publicFQDN: String (Required)
frontendPort: int (Required)
backendPort: int (Required)
}
]
}
nodeAgentInfo (Optional): {
version: String (Required)
lastUpdateTime: OffsetDateTime (Required)
}
virtualMachineInfo (Optional): {
imageReference (Optional): {
publisher: String (Optional)
offer: String (Optional)
sku: String (Optional)
version: String (Optional)
virtualMachineImageId: String (Optional)
exactVersion: String (Optional)
sharedGalleryImageId: String (Optional)
communityGalleryImageId: String (Optional)
}
scaleSetVmResourceId: String (Optional)
}
}
Parameters:
Returns:
getPool
public BatchPool getPool(String poolId)
Gets information about the specified Pool.
Parameters:
Returns:
getPool
public BatchPool getPool(String poolId, BatchPoolGetOptions options, RequestConditions requestConditions)
Gets information about the specified Pool.
Parameters:
Returns:
getPoolWithResponse
public Response<BinaryData> getPoolWithResponse(String poolId, RequestOptions requestOptions)
Gets information about the specified Pool.
Query Parameters
| ------- | ------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| $select | List<String> | No | An OData $select clause. In the form of "," separated string. |
| $expand | List<String> | No | An OData $expand clause. In the form of "," separated string. |
You can add these to a request with RequestOptions#addQueryParam
Header Parameters
| ------------------- | -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| If-Modified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. |
| If-Unmodified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. |
| If-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. |
| If-None-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. |
You can add these to a request with RequestOptions#addHeader
Response Body Schema
{
id: String (Optional)
displayName: String (Optional)
url: String (Optional)
eTag: String (Optional)
lastModified: OffsetDateTime (Optional)
creationTime: OffsetDateTime (Optional)
state: String(active/deleting) (Optional)
stateTransitionTime: OffsetDateTime (Optional)
allocationState: String(steady/resizing/stopping) (Optional)
allocationStateTransitionTime: OffsetDateTime (Optional)
vmSize: String (Optional)
virtualMachineConfiguration (Optional): {
imageReference (Required): {
publisher: String (Optional)
offer: String (Optional)
sku: String (Optional)
version: String (Optional)
virtualMachineImageId: String (Optional)
exactVersion: String (Optional)
sharedGalleryImageId: String (Optional)
communityGalleryImageId: String (Optional)
}
nodeAgentSKUId: String (Required)
windowsConfiguration (Optional): {
enableAutomaticUpdates: Boolean (Optional)
}
dataDisks (Optional): [
(Optional){
lun: int (Required)
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: int (Required)
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
}
]
licenseType: String (Optional)
containerConfiguration (Optional): {
type: String(dockerCompatible/criCompatible) (Required)
containerImageNames (Optional): [
String (Optional)
]
containerRegistries (Optional): [
(Optional){
username: String (Optional)
password: String (Optional)
registryServer: String (Optional)
identityReference (Optional): {
resourceId: String (Optional)
}
}
]
}
diskEncryptionConfiguration (Optional): {
targets (Optional): [
String(osdisk/temporarydisk) (Optional)
]
}
nodePlacementConfiguration (Optional): {
policy: String(regional/zonal) (Optional)
}
extensions (Optional): [
(Optional){
name: String (Required)
publisher: String (Required)
type: String (Required)
typeHandlerVersion: String (Optional)
autoUpgradeMinorVersion: Boolean (Optional)
enableAutomaticUpgrade: Boolean (Optional)
settings (Optional): {
String: String (Required)
}
protectedSettings (Optional): {
String: String (Required)
}
provisionAfterExtensions (Optional): [
String (Optional)
]
}
]
osDisk (Optional): {
ephemeralOSDiskSettings (Optional): {
placement: String(cachedisk) (Optional)
}
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: Integer (Optional)
managedDisk (Optional): {
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
securityProfile (Optional): {
securityEncryptionType: String(NonPersistedTPM/VMGuestStateOnly) (Optional)
}
}
writeAcceleratorEnabled: Boolean (Optional)
}
securityProfile (Optional): {
encryptionAtHost: Boolean (Optional)
securityType: String(trustedLaunch/confidentialVM) (Optional)
uefiSettings (Optional): {
secureBootEnabled: Boolean (Optional)
vTpmEnabled: Boolean (Optional)
}
}
serviceArtifactReference (Optional): {
id: String (Required)
}
}
resizeTimeout: Duration (Optional)
resizeErrors (Optional): [
(Optional){
code: String (Optional)
message: String (Optional)
values (Optional): [
(Optional){
name: String (Optional)
value: String (Optional)
}
]
}
]
resourceTags (Optional): {
String: String (Required)
}
currentDedicatedNodes: Integer (Optional)
currentLowPriorityNodes: Integer (Optional)
targetDedicatedNodes: Integer (Optional)
targetLowPriorityNodes: Integer (Optional)
enableAutoScale: Boolean (Optional)
autoScaleFormula: String (Optional)
autoScaleEvaluationInterval: Duration (Optional)
autoScaleRun (Optional): {
timestamp: OffsetDateTime (Required)
results: String (Optional)
error (Optional): {
code: String (Optional)
message: String (Optional)
values (Optional): [
(recursive schema, see above)
]
}
}
enableInterNodeCommunication: Boolean (Optional)
networkConfiguration (Optional): {
subnetId: String (Optional)
dynamicVNetAssignmentScope: String(none/job) (Optional)
endpointConfiguration (Optional): {
inboundNATPools (Required): [
(Required){
name: String (Required)
protocol: String(tcp/udp) (Required)
backendPort: int (Required)
frontendPortRangeStart: int (Required)
frontendPortRangeEnd: int (Required)
networkSecurityGroupRules (Optional): [
(Optional){
priority: int (Required)
access: String(allow/deny) (Required)
sourceAddressPrefix: String (Required)
sourcePortRanges (Optional): [
String (Optional)
]
}
]
}
]
}
publicIPAddressConfiguration (Optional): {
provision: String(batchmanaged/usermanaged/nopublicipaddresses) (Optional)
ipAddressIds (Optional): [
String (Optional)
]
}
enableAcceleratedNetworking: Boolean (Optional)
}
startTask (Optional): {
commandLine: String (Required)
containerSettings (Optional): {
containerRunOptions: String (Optional)
imageName: String (Required)
registry (Optional): (recursive schema, see registry above)
workingDirectory: String(taskWorkingDirectory/containerImageDefault) (Optional)
containerHostBatchBindMounts (Optional): [
(Optional){
source: String(Shared/Startup/VfsMounts/Task/JobPrep/Applications) (Optional)
isReadOnly: Boolean (Optional)
}
]
}
resourceFiles (Optional): [
(Optional){
autoStorageContainerName: String (Optional)
storageContainerUrl: String (Optional)
httpUrl: String (Optional)
blobPrefix: String (Optional)
filePath: String (Optional)
fileMode: String (Optional)
identityReference (Optional): (recursive schema, see identityReference above)
}
]
environmentSettings (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
userIdentity (Optional): {
username: String (Optional)
autoUser (Optional): {
scope: String(task/pool) (Optional)
elevationLevel: String(nonadmin/admin) (Optional)
}
}
maxTaskRetryCount: Integer (Optional)
waitForSuccess: Boolean (Optional)
}
certificateReferences (Optional): [
(Optional){
thumbprint: String (Required)
thumbprintAlgorithm: String (Required)
storeLocation: String(currentuser/localmachine) (Optional)
storeName: String (Optional)
visibility (Optional): [
String(starttask/task/remoteuser) (Optional)
]
}
]
applicationPackageReferences (Optional): [
(Optional){
applicationId: String (Required)
version: String (Optional)
}
]
taskSlotsPerNode: Integer (Optional)
taskSchedulingPolicy (Optional): {
nodeFillType: String(spread/pack) (Required)
}
userAccounts (Optional): [
(Optional){
name: String (Required)
password: String (Required)
elevationLevel: String(nonadmin/admin) (Optional)
linuxUserConfiguration (Optional): {
uid: Integer (Optional)
gid: Integer (Optional)
sshPrivateKey: String (Optional)
}
windowsUserConfiguration (Optional): {
loginMode: String(batch/interactive) (Optional)
}
}
]
metadata (Optional): [
(Optional){
name: String (Required)
value: String (Required)
}
]
stats (Optional): {
url: String (Required)
startTime: OffsetDateTime (Required)
lastUpdateTime: OffsetDateTime (Required)
usageStats (Optional): {
startTime: OffsetDateTime (Required)
lastUpdateTime: OffsetDateTime (Required)
dedicatedCoreTime: Duration (Required)
}
resourceStats (Optional): {
startTime: OffsetDateTime (Required)
lastUpdateTime: OffsetDateTime (Required)
avgCPUPercentage: double (Required)
avgMemoryGiB: double (Required)
peakMemoryGiB: double (Required)
avgDiskGiB: double (Required)
peakDiskGiB: double (Required)
diskReadIOps: long (Required)
diskWriteIOps: long (Required)
diskReadGiB: double (Required)
diskWriteGiB: double (Required)
networkReadGiB: double (Required)
networkWriteGiB: double (Required)
}
}
mountConfiguration (Optional): [
(Optional){
azureBlobFileSystemConfiguration (Optional): {
accountName: String (Required)
containerName: String (Required)
accountKey: String (Optional)
sasKey: String (Optional)
blobfuseOptions: String (Optional)
relativeMountPath: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
}
nfsMountConfiguration (Optional): {
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
cifsMountConfiguration (Optional): {
username: String (Required)
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
password: String (Required)
}
azureFileShareConfiguration (Optional): {
accountName: String (Required)
accountKey: String (Required)
azureFileUrl: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
}
]
identity (Optional): {
type: String(UserAssigned/None) (Required)
userAssignedIdentities (Optional): [
(Optional){
resourceId: String (Required)
clientId: String (Optional)
principalId: String (Optional)
}
]
}
targetNodeCommunicationMode: String(default/classic/simplified) (Optional)
currentNodeCommunicationMode: String(default/classic/simplified) (Optional)
upgradePolicy (Optional): {
mode: String(automatic/manual/rolling) (Required)
automaticOSUpgradePolicy (Optional): {
disableAutomaticRollback: Boolean (Optional)
enableAutomaticOSUpgrade: Boolean (Optional)
useRollingUpgradePolicy: Boolean (Optional)
osRollingUpgradeDeferral: Boolean (Optional)
}
rollingUpgradePolicy (Optional): {
enableCrossZoneUpgrade: Boolean (Optional)
maxBatchInstancePercent: Integer (Optional)
maxUnhealthyInstancePercent: Integer (Optional)
maxUnhealthyUpgradedInstancePercent: Integer (Optional)
pauseTimeBetweenBatches: Duration (Optional)
prioritizeUnhealthyInstances: Boolean (Optional)
rollbackFailedInstancesOnPolicyBreach: Boolean (Optional)
}
}
}
Parameters:
Returns:
getTask
public BatchTask getTask(String jobId, String taskId)
Gets information about the specified Task. 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.
Parameters:
Returns:
getTask
public BatchTask getTask(String jobId, String taskId, BatchTaskGetOptions options, RequestConditions requestConditions)
Gets information about the specified Task. 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.
Parameters:
Returns:
getTaskFile
public BinaryData getTaskFile(String jobId, String taskId, String filePath)
Returns the content of the specified Task file.
Parameters:
Returns:
getTaskFile
public BinaryData getTaskFile(String jobId, String taskId, String filePath, BatchTaskFileGetOptions options)
Returns the content of the specified Task file.
Parameters:
Returns:
getTaskFileProperties
public BatchFileProperties getTaskFileProperties(String jobId, String taskId, String filePath)
Gets the properties of the specified Task file.
Parameters:
Returns:
getTaskFileProperties
public BatchFileProperties getTaskFileProperties(String jobId, String taskId, String filePath, BatchTaskFilePropertiesGetOptions options)
Gets the properties of the specified Task file.
Parameters:
Returns:
getTaskFilePropertiesWithResponse
public Response<Void> getTaskFilePropertiesWithResponse(String jobId, String taskId, String filePath, RequestOptions requestOptions)
Gets the properties of the specified Task file.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Header Parameters
| ------------------- | -------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Name | Type | Required | Description |
| If-Modified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. |
| If-Unmodified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. |
You can add these to a request with RequestOptions#addHeader
Parameters:
Returns:
getTaskFileWithResponse
public Response<BinaryData> getTaskFileWithResponse(String jobId, String taskId, String filePath, RequestOptions requestOptions)
Returns the content of the specified Task file.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Header Parameters
| ------------------- | -------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Name | Type | Required | Description |
| If-Modified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. |
| If-Unmodified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. |
| ocp-range | String | No | The byte range to be retrieved. The default is to retrieve the entire file. The format is bytes=startRange-endRange. |
You can add these to a request with RequestOptions#addHeader
Response Body Schema
BinaryData
Parameters:
Returns:
getTaskWithResponse
public Response<BinaryData> getTaskWithResponse(String jobId, String taskId, RequestOptions requestOptions)
Gets information about the specified Task. 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.
Query Parameters
| ------- | ------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| $select | List<String> | No | An OData $select clause. In the form of "," separated string. |
| $expand | List<String> | No | An OData $expand clause. In the form of "," separated string. |
You can add these to a request with RequestOptions#addQueryParam
Header Parameters
| ------------------- | -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| If-Modified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. |
| If-Unmodified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. |
| If-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. |
| If-None-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. |
You can add these to a request with RequestOptions#addHeader
Response Body Schema
{
id: String (Optional)
displayName: String (Optional)
url: String (Optional)
eTag: String (Optional)
lastModified: OffsetDateTime (Optional)
creationTime: OffsetDateTime (Optional)
exitConditions (Optional): {
exitCodes (Optional): [
(Optional){
code: int (Required)
exitOptions (Required): {
jobAction: String(none/disable/terminate) (Optional)
dependencyAction: String(satisfy/block) (Optional)
}
}
]
exitCodeRanges (Optional): [
(Optional){
start: int (Required)
end: int (Required)
exitOptions (Required): (recursive schema, see exitOptions above)
}
]
preProcessingError (Optional): (recursive schema, see preProcessingError above)
fileUploadError (Optional): (recursive schema, see fileUploadError above)
default (Optional): (recursive schema, see default above)
}
state: String(active/preparing/running/completed) (Optional)
stateTransitionTime: OffsetDateTime (Optional)
previousState: String(active/preparing/running/completed) (Optional)
previousStateTransitionTime: OffsetDateTime (Optional)
commandLine: String (Optional)
containerSettings (Optional): {
containerRunOptions: String (Optional)
imageName: String (Required)
registry (Optional): {
username: String (Optional)
password: String (Optional)
registryServer: String (Optional)
identityReference (Optional): {
resourceId: String (Optional)
}
}
workingDirectory: String(taskWorkingDirectory/containerImageDefault) (Optional)
containerHostBatchBindMounts (Optional): [
(Optional){
source: String(Shared/Startup/VfsMounts/Task/JobPrep/Applications) (Optional)
isReadOnly: Boolean (Optional)
}
]
}
resourceFiles (Optional): [
(Optional){
autoStorageContainerName: String (Optional)
storageContainerUrl: String (Optional)
httpUrl: String (Optional)
blobPrefix: String (Optional)
filePath: String (Optional)
fileMode: String (Optional)
identityReference (Optional): (recursive schema, see identityReference above)
}
]
outputFiles (Optional): [
(Optional){
filePattern: String (Required)
destination (Required): {
container (Optional): {
path: String (Optional)
containerUrl: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
uploadHeaders (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
}
}
uploadOptions (Required): {
uploadCondition: String(tasksuccess/taskfailure/taskcompletion) (Required)
}
}
]
environmentSettings (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
affinityInfo (Optional): {
affinityId: String (Required)
}
constraints (Optional): {
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
requiredSlots: Integer (Optional)
userIdentity (Optional): {
username: String (Optional)
autoUser (Optional): {
scope: String(task/pool) (Optional)
elevationLevel: String(nonadmin/admin) (Optional)
}
}
executionInfo (Optional): {
startTime: OffsetDateTime (Optional)
endTime: OffsetDateTime (Optional)
exitCode: Integer (Optional)
containerInfo (Optional): {
containerId: String (Optional)
state: String (Optional)
error: String (Optional)
}
failureInfo (Optional): {
category: String(usererror/servererror) (Required)
code: String (Optional)
message: String (Optional)
details (Optional): [
(Optional){
name: String (Optional)
value: String (Optional)
}
]
}
retryCount: int (Required)
lastRetryTime: OffsetDateTime (Optional)
requeueCount: int (Required)
lastRequeueTime: OffsetDateTime (Optional)
result: String(success/failure) (Optional)
}
nodeInfo (Optional): {
affinityId: String (Optional)
nodeUrl: String (Optional)
poolId: String (Optional)
nodeId: String (Optional)
taskRootDirectory: String (Optional)
taskRootDirectoryUrl: String (Optional)
}
multiInstanceSettings (Optional): {
numberOfInstances: Integer (Optional)
coordinationCommandLine: String (Required)
commonResourceFiles (Optional): [
(recursive schema, see above)
]
}
stats (Optional): {
url: String (Required)
startTime: OffsetDateTime (Required)
lastUpdateTime: OffsetDateTime (Required)
userCPUTime: Duration (Required)
kernelCPUTime: Duration (Required)
wallClockTime: Duration (Required)
readIOps: long (Required)
writeIOps: long (Required)
readIOGiB: double (Required)
writeIOGiB: double (Required)
waitTime: Duration (Required)
}
dependsOn (Optional): {
taskIds (Optional): [
String (Optional)
]
taskIdRanges (Optional): [
(Optional){
start: int (Required)
end: int (Required)
}
]
}
applicationPackageReferences (Optional): [
(Optional){
applicationId: String (Required)
version: String (Optional)
}
]
authenticationTokenSettings (Optional): {
access (Optional): [
String(job) (Optional)
]
}
}
Parameters:
Returns:
jobScheduleExists
public boolean jobScheduleExists(String jobScheduleId)
Checks the specified Job Schedule exists.
Parameters:
Returns:
jobScheduleExists
public boolean jobScheduleExists(String jobScheduleId, BatchJobScheduleExistsOptions options, RequestConditions requestConditions)
Checks the specified Job Schedule exists.
Parameters:
Returns:
jobScheduleExistsWithResponse
public Response<Boolean> jobScheduleExistsWithResponse(String jobScheduleId, RequestOptions requestOptions)
Checks the specified Job Schedule exists.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Header Parameters
| ------------------- | -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| If-Modified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. |
| If-Unmodified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. |
| If-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. |
| If-None-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. |
You can add these to a request with RequestOptions#addHeader
Response Body Schema
boolean
Parameters:
Returns:
listApplications
public PagedIterable<BatchApplication> listApplications()
Lists all of the applications available in the specified Account. This operation returns only Applications and versions that are available for use on Compute Nodes; that is, that can be used in an Package reference. For administrator information about applications and versions that are not yet available to Compute Nodes, use the Azure portal or the Azure Resource Manager API.
Returns:
listApplications
public PagedIterable<BatchApplication> listApplications(BatchApplicationsListOptions options)
Lists all of the applications available in the specified Account. This operation returns only Applications and versions that are available for use on Compute Nodes; that is, that can be used in an Package reference. For administrator information about applications and versions that are not yet available to Compute Nodes, use the Azure portal or the Azure Resource Manager API.
Parameters:
Returns:
listApplications
public PagedIterable<BinaryData> listApplications(RequestOptions requestOptions)
Lists all of the applications available in the specified Account. This operation returns only Applications and versions that are available for use on Compute Nodes; that is, that can be used in an Package reference. For administrator information about applications and versions that are not yet available to Compute Nodes, use the Azure portal or the Azure Resource Manager API.
Query Parameters
| ---------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| maxresults | Integer | No | The maximum number of items to return in the response. A maximum of 1000 applications can be returned. |
You can add these to a request with RequestOptions#addQueryParam
Response Body Schema
{
id: String (Required)
displayName: String (Required)
versions (Required): [
String (Required)
]
}
Parameters:
Returns:
listCertificates
public PagedIterable<BatchCertificate> listCertificates()
Lists all of the Certificates that have been added to the specified Account.
Returns:
listCertificates
public PagedIterable<BatchCertificate> listCertificates(BatchCertificatesListOptions options)
Lists all of the Certificates that have been added to the specified Account.
Parameters:
Returns:
listCertificates
public PagedIterable<BinaryData> listCertificates(RequestOptions requestOptions)
Lists all of the Certificates that have been added to the specified Account.
Query Parameters
| ---------- | ------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| maxresults | Integer | No | The maximum number of items to return in the response. A maximum of 1000 applications can be returned. |
| $filter | String | No | An OData $filter clause. For more information on constructing this filter, see https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch\#list-certificates. |
| $select | List<String> | No | An OData $select clause. In the form of "," separated string. |
You can add these to a request with RequestOptions#addQueryParam
Response Body Schema
{
thumbprint: String (Required)
thumbprintAlgorithm: String (Required)
url: String (Optional)
state: String(active/deleting/deletefailed) (Optional)
stateTransitionTime: OffsetDateTime (Optional)
previousState: String(active/deleting/deletefailed) (Optional)
previousStateTransitionTime: OffsetDateTime (Optional)
publicData: String (Optional)
deleteCertificateError (Optional): {
code: String (Optional)
message: String (Optional)
values (Optional): [
(Optional){
name: String (Optional)
value: String (Optional)
}
]
}
data: byte[] (Required)
certificateFormat: String(pfx/cer) (Optional)
password: String (Optional)
}
Parameters:
Returns:
listJobPreparationAndReleaseTaskStatus
public PagedIterable<BatchJobPreparationAndReleaseTaskStatus> listJobPreparationAndReleaseTaskStatus(String jobId)
Lists the execution status of the Job Preparation and Job Release Task for the specified Job across the Compute Nodes where the Job has run. This API returns the Job Preparation and Job Release Task status on all Compute Nodes that have run the Job Preparation or Job Release Task. This includes Compute Nodes which have since been removed from the Pool. If this API is invoked on a Job which has no Job Preparation or Job Release Task, the Batch service returns HTTP status code 409 (Conflict) with an error code of JobPreparationTaskNotSpecified.
Parameters:
Returns:
listJobPreparationAndReleaseTaskStatus
public PagedIterable<BatchJobPreparationAndReleaseTaskStatus> listJobPreparationAndReleaseTaskStatus(String jobId, BatchJobPreparationAndReleaseTaskStatusListOptions options)
Lists the execution status of the Job Preparation and Job Release Task for the specified Job across the Compute Nodes where the Job has run. This API returns the Job Preparation and Job Release Task status on all Compute Nodes that have run the Job Preparation or Job Release Task. This includes Compute Nodes which have since been removed from the Pool. If this API is invoked on a Job which has no Job Preparation or Job Release Task, the Batch service returns HTTP status code 409 (Conflict) with an error code of JobPreparationTaskNotSpecified.
Parameters:
Returns:
listJobPreparationAndReleaseTaskStatus
public PagedIterable<BinaryData> listJobPreparationAndReleaseTaskStatus(String jobId, RequestOptions requestOptions)
Lists the execution status of the Job Preparation and Job Release Task for the specified Job across the Compute Nodes where the Job has run. This API returns the Job Preparation and Job Release Task status on all Compute Nodes that have run the Job Preparation or Job Release Task. This includes Compute Nodes which have since been removed from the Pool. If this API is invoked on a Job which has no Job Preparation or Job Release Task, the Batch service returns HTTP status code 409 (Conflict) with an error code of JobPreparationTaskNotSpecified.
Query Parameters
| ---------- | ------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| maxresults | Integer | No | The maximum number of items to return in the response. A maximum of 1000 applications can be returned. |
| $filter | String | No | An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch\#list-job-preparation-and-release-status. |
| $select | List<String> | No | An OData $select clause. In the form of "," separated string. |
You can add these to a request with RequestOptions#addQueryParam
Response Body Schema
{
poolId: String (Optional)
nodeId: String (Optional)
nodeUrl: String (Optional)
jobPreparationTaskExecutionInfo (Optional): {
startTime: OffsetDateTime (Required)
endTime: OffsetDateTime (Optional)
state: String(running/completed) (Required)
taskRootDirectory: String (Optional)
taskRootDirectoryUrl: String (Optional)
exitCode: Integer (Optional)
containerInfo (Optional): {
containerId: String (Optional)
state: String (Optional)
error: String (Optional)
}
failureInfo (Optional): {
category: String(usererror/servererror) (Required)
code: String (Optional)
message: String (Optional)
details (Optional): [
(Optional){
name: String (Optional)
value: String (Optional)
}
]
}
retryCount: int (Required)
lastRetryTime: OffsetDateTime (Optional)
result: String(success/failure) (Optional)
}
jobReleaseTaskExecutionInfo (Optional): {
startTime: OffsetDateTime (Required)
endTime: OffsetDateTime (Optional)
state: String(running/completed) (Required)
taskRootDirectory: String (Optional)
taskRootDirectoryUrl: String (Optional)
exitCode: Integer (Optional)
containerInfo (Optional): (recursive schema, see containerInfo above)
failureInfo (Optional): (recursive schema, see failureInfo above)
result: String(success/failure) (Optional)
}
}
Parameters:
Returns:
listJobs
public PagedIterable<BatchJob> listJobs()
Lists all of the Jobs in the specified Account.
Returns:
listJobs
public PagedIterable<BatchJob> listJobs(BatchJobsListOptions options)
Lists all of the Jobs in the specified Account.
Parameters:
Returns:
listJobs
public PagedIterable<BinaryData> listJobs(RequestOptions requestOptions)
Lists all of the Jobs in the specified Account.
Query Parameters
| ---------- | ------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| maxresults | Integer | No | The maximum number of items to return in the response. A maximum of 1000 applications can be returned. |
| $filter | String | No | An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch\#list-jobs. |
| $select | List<String> | No | An OData $select clause. In the form of "," separated string. |
| $expand | List<String> | No | An OData $expand clause. In the form of "," separated string. |
You can add these to a request with RequestOptions#addQueryParam
Response Body Schema
{
id: String (Optional)
displayName: String (Optional)
usesTaskDependencies: Boolean (Optional)
url: String (Optional)
eTag: String (Optional)
lastModified: OffsetDateTime (Optional)
creationTime: OffsetDateTime (Optional)
state: String(active/disabling/disabled/enabling/terminating/completed/deleting) (Optional)
stateTransitionTime: OffsetDateTime (Optional)
previousState: String(active/disabling/disabled/enabling/terminating/completed/deleting) (Optional)
previousStateTransitionTime: OffsetDateTime (Optional)
priority: Integer (Optional)
allowTaskPreemption: Boolean (Optional)
maxParallelTasks: Integer (Optional)
constraints (Optional): {
maxWallClockTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
jobManagerTask (Optional): {
id: String (Required)
displayName: String (Optional)
commandLine: String (Required)
containerSettings (Optional): {
containerRunOptions: String (Optional)
imageName: String (Required)
registry (Optional): {
username: String (Optional)
password: String (Optional)
registryServer: String (Optional)
identityReference (Optional): {
resourceId: String (Optional)
}
}
workingDirectory: String(taskWorkingDirectory/containerImageDefault) (Optional)
containerHostBatchBindMounts (Optional): [
(Optional){
source: String(Shared/Startup/VfsMounts/Task/JobPrep/Applications) (Optional)
isReadOnly: Boolean (Optional)
}
]
}
resourceFiles (Optional): [
(Optional){
autoStorageContainerName: String (Optional)
storageContainerUrl: String (Optional)
httpUrl: String (Optional)
blobPrefix: String (Optional)
filePath: String (Optional)
fileMode: String (Optional)
identityReference (Optional): (recursive schema, see identityReference above)
}
]
outputFiles (Optional): [
(Optional){
filePattern: String (Required)
destination (Required): {
container (Optional): {
path: String (Optional)
containerUrl: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
uploadHeaders (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
}
}
uploadOptions (Required): {
uploadCondition: String(tasksuccess/taskfailure/taskcompletion) (Required)
}
}
]
environmentSettings (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
constraints (Optional): {
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
requiredSlots: Integer (Optional)
killJobOnCompletion: Boolean (Optional)
userIdentity (Optional): {
username: String (Optional)
autoUser (Optional): {
scope: String(task/pool) (Optional)
elevationLevel: String(nonadmin/admin) (Optional)
}
}
runExclusive: Boolean (Optional)
applicationPackageReferences (Optional): [
(Optional){
applicationId: String (Required)
version: String (Optional)
}
]
authenticationTokenSettings (Optional): {
access (Optional): [
String(job) (Optional)
]
}
allowLowPriorityNode: Boolean (Optional)
}
jobPreparationTask (Optional): {
id: String (Optional)
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
constraints (Optional): (recursive schema, see constraints above)
waitForSuccess: Boolean (Optional)
userIdentity (Optional): (recursive schema, see userIdentity above)
rerunOnNodeRebootAfterSuccess: Boolean (Optional)
}
jobReleaseTask (Optional): {
id: String (Optional)
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
userIdentity (Optional): (recursive schema, see userIdentity above)
}
commonEnvironmentSettings (Optional): [
(recursive schema, see above)
]
poolInfo (Required): {
poolId: String (Optional)
autoPoolSpecification (Optional): {
autoPoolIdPrefix: String (Optional)
poolLifetimeOption: String(jobschedule/job) (Required)
keepAlive: Boolean (Optional)
pool (Optional): {
displayName: String (Optional)
vmSize: String (Required)
virtualMachineConfiguration (Optional): {
imageReference (Required): {
publisher: String (Optional)
offer: String (Optional)
sku: String (Optional)
version: String (Optional)
virtualMachineImageId: String (Optional)
exactVersion: String (Optional)
sharedGalleryImageId: String (Optional)
communityGalleryImageId: String (Optional)
}
nodeAgentSKUId: String (Required)
windowsConfiguration (Optional): {
enableAutomaticUpdates: Boolean (Optional)
}
dataDisks (Optional): [
(Optional){
lun: int (Required)
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: int (Required)
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
}
]
licenseType: String (Optional)
containerConfiguration (Optional): {
type: String(dockerCompatible/criCompatible) (Required)
containerImageNames (Optional): [
String (Optional)
]
containerRegistries (Optional): [
(recursive schema, see above)
]
}
diskEncryptionConfiguration (Optional): {
targets (Optional): [
String(osdisk/temporarydisk) (Optional)
]
}
nodePlacementConfiguration (Optional): {
policy: String(regional/zonal) (Optional)
}
extensions (Optional): [
(Optional){
name: String (Required)
publisher: String (Required)
type: String (Required)
typeHandlerVersion: String (Optional)
autoUpgradeMinorVersion: Boolean (Optional)
enableAutomaticUpgrade: Boolean (Optional)
settings (Optional): {
String: String (Required)
}
protectedSettings (Optional): {
String: String (Required)
}
provisionAfterExtensions (Optional): [
String (Optional)
]
}
]
osDisk (Optional): {
ephemeralOSDiskSettings (Optional): {
placement: String(cachedisk) (Optional)
}
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: Integer (Optional)
managedDisk (Optional): {
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
securityProfile (Optional): {
securityEncryptionType: String(NonPersistedTPM/VMGuestStateOnly) (Optional)
}
}
writeAcceleratorEnabled: Boolean (Optional)
}
securityProfile (Optional): {
encryptionAtHost: Boolean (Optional)
securityType: String(trustedLaunch/confidentialVM) (Optional)
uefiSettings (Optional): {
secureBootEnabled: Boolean (Optional)
vTpmEnabled: Boolean (Optional)
}
}
serviceArtifactReference (Optional): {
id: String (Required)
}
}
taskSlotsPerNode: Integer (Optional)
taskSchedulingPolicy (Optional): {
nodeFillType: String(spread/pack) (Required)
}
resizeTimeout: Duration (Optional)
resourceTags: String (Optional)
targetDedicatedNodes: Integer (Optional)
targetLowPriorityNodes: Integer (Optional)
enableAutoScale: Boolean (Optional)
autoScaleFormula: String (Optional)
autoScaleEvaluationInterval: Duration (Optional)
enableInterNodeCommunication: Boolean (Optional)
networkConfiguration (Optional): {
subnetId: String (Optional)
dynamicVNetAssignmentScope: String(none/job) (Optional)
endpointConfiguration (Optional): {
inboundNATPools (Required): [
(Required){
name: String (Required)
protocol: String(tcp/udp) (Required)
backendPort: int (Required)
frontendPortRangeStart: int (Required)
frontendPortRangeEnd: int (Required)
networkSecurityGroupRules (Optional): [
(Optional){
priority: int (Required)
access: String(allow/deny) (Required)
sourceAddressPrefix: String (Required)
sourcePortRanges (Optional): [
String (Optional)
]
}
]
}
]
}
publicIPAddressConfiguration (Optional): {
provision: String(batchmanaged/usermanaged/nopublicipaddresses) (Optional)
ipAddressIds (Optional): [
String (Optional)
]
}
enableAcceleratedNetworking: Boolean (Optional)
}
startTask (Optional): {
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
userIdentity (Optional): (recursive schema, see userIdentity above)
maxTaskRetryCount: Integer (Optional)
waitForSuccess: Boolean (Optional)
}
certificateReferences (Optional): [
(Optional){
thumbprint: String (Required)
thumbprintAlgorithm: String (Required)
storeLocation: String(currentuser/localmachine) (Optional)
storeName: String (Optional)
visibility (Optional): [
String(starttask/task/remoteuser) (Optional)
]
}
]
applicationPackageReferences (Optional): [
(recursive schema, see above)
]
userAccounts (Optional): [
(Optional){
name: String (Required)
password: String (Required)
elevationLevel: String(nonadmin/admin) (Optional)
linuxUserConfiguration (Optional): {
uid: Integer (Optional)
gid: Integer (Optional)
sshPrivateKey: String (Optional)
}
windowsUserConfiguration (Optional): {
loginMode: String(batch/interactive) (Optional)
}
}
]
metadata (Optional): [
(Optional){
name: String (Required)
value: String (Required)
}
]
mountConfiguration (Optional): [
(Optional){
azureBlobFileSystemConfiguration (Optional): {
accountName: String (Required)
containerName: String (Required)
accountKey: String (Optional)
sasKey: String (Optional)
blobfuseOptions: String (Optional)
relativeMountPath: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
}
nfsMountConfiguration (Optional): {
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
cifsMountConfiguration (Optional): {
username: String (Required)
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
password: String (Required)
}
azureFileShareConfiguration (Optional): {
accountName: String (Required)
accountKey: String (Required)
azureFileUrl: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
}
]
targetNodeCommunicationMode: String(default/classic/simplified) (Optional)
upgradePolicy (Optional): {
mode: String(automatic/manual/rolling) (Required)
automaticOSUpgradePolicy (Optional): {
disableAutomaticRollback: Boolean (Optional)
enableAutomaticOSUpgrade: Boolean (Optional)
useRollingUpgradePolicy: Boolean (Optional)
osRollingUpgradeDeferral: Boolean (Optional)
}
rollingUpgradePolicy (Optional): {
enableCrossZoneUpgrade: Boolean (Optional)
maxBatchInstancePercent: Integer (Optional)
maxUnhealthyInstancePercent: Integer (Optional)
maxUnhealthyUpgradedInstancePercent: Integer (Optional)
pauseTimeBetweenBatches: Duration (Optional)
prioritizeUnhealthyInstances: Boolean (Optional)
rollbackFailedInstancesOnPolicyBreach: Boolean (Optional)
}
}
}
}
}
onAllTasksComplete: String(noaction/terminatejob) (Optional)
onTaskFailure: String(noaction/performexitoptionsjobaction) (Optional)
networkConfiguration (Optional): {
subnetId: String (Required)
skipWithdrawFromVNet: Boolean (Optional)
}
metadata (Optional): [
(recursive schema, see above)
]
executionInfo (Optional): {
startTime: OffsetDateTime (Required)
endTime: OffsetDateTime (Optional)
poolId: String (Optional)
schedulingError (Optional): {
category: String(usererror/servererror) (Required)
code: String (Optional)
message: String (Optional)
details (Optional): [
(Optional){
name: String (Optional)
value: String (Optional)
}
]
}
terminateReason: String (Optional)
}
stats (Optional): {
url: String (Required)
startTime: OffsetDateTime (Required)
lastUpdateTime: OffsetDateTime (Required)
userCPUTime: Duration (Required)
kernelCPUTime: Duration (Required)
wallClockTime: Duration (Required)
readIOps: long (Required)
writeIOps: long (Required)
readIOGiB: double (Required)
writeIOGiB: double (Required)
numSucceededTasks: long (Required)
numFailedTasks: long (Required)
numTaskRetries: long (Required)
waitTime: Duration (Required)
}
}
Parameters:
Returns:
listJobSchedules
public PagedIterable<BatchJobSchedule> listJobSchedules()
Lists all of the Job Schedules in the specified Account.
Returns:
listJobSchedules
public PagedIterable<BatchJobSchedule> listJobSchedules(BatchJobSchedulesListOptions options)
Lists all of the Job Schedules in the specified Account.
Parameters:
Returns:
listJobSchedules
public PagedIterable<BinaryData> listJobSchedules(RequestOptions requestOptions)
Lists all of the Job Schedules in the specified Account.
Query Parameters
| ---------- | ------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| maxresults | Integer | No | The maximum number of items to return in the response. A maximum of 1000 applications can be returned. |
| $filter | String | No | An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch\#list-job-schedules. |
| $select | List<String> | No | An OData $select clause. In the form of "," separated string. |
| $expand | List<String> | No | An OData $expand clause. In the form of "," separated string. |
You can add these to a request with RequestOptions#addQueryParam
Response Body Schema
{
id: String (Optional)
displayName: String (Optional)
url: String (Optional)
eTag: String (Optional)
lastModified: OffsetDateTime (Optional)
creationTime: OffsetDateTime (Optional)
state: String(active/completed/disabled/terminating/deleting) (Optional)
stateTransitionTime: OffsetDateTime (Optional)
previousState: String(active/completed/disabled/terminating/deleting) (Optional)
previousStateTransitionTime: OffsetDateTime (Optional)
schedule (Optional): {
doNotRunUntil: OffsetDateTime (Optional)
doNotRunAfter: OffsetDateTime (Optional)
startWindow: Duration (Optional)
recurrenceInterval: Duration (Optional)
}
jobSpecification (Required): {
priority: Integer (Optional)
allowTaskPreemption: Boolean (Optional)
maxParallelTasks: Integer (Optional)
displayName: String (Optional)
usesTaskDependencies: Boolean (Optional)
onAllTasksComplete: String(noaction/terminatejob) (Optional)
onTaskFailure: String(noaction/performexitoptionsjobaction) (Optional)
networkConfiguration (Optional): {
subnetId: String (Required)
skipWithdrawFromVNet: Boolean (Optional)
}
constraints (Optional): {
maxWallClockTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
jobManagerTask (Optional): {
id: String (Required)
displayName: String (Optional)
commandLine: String (Required)
containerSettings (Optional): {
containerRunOptions: String (Optional)
imageName: String (Required)
registry (Optional): {
username: String (Optional)
password: String (Optional)
registryServer: String (Optional)
identityReference (Optional): {
resourceId: String (Optional)
}
}
workingDirectory: String(taskWorkingDirectory/containerImageDefault) (Optional)
containerHostBatchBindMounts (Optional): [
(Optional){
source: String(Shared/Startup/VfsMounts/Task/JobPrep/Applications) (Optional)
isReadOnly: Boolean (Optional)
}
]
}
resourceFiles (Optional): [
(Optional){
autoStorageContainerName: String (Optional)
storageContainerUrl: String (Optional)
httpUrl: String (Optional)
blobPrefix: String (Optional)
filePath: String (Optional)
fileMode: String (Optional)
identityReference (Optional): (recursive schema, see identityReference above)
}
]
outputFiles (Optional): [
(Optional){
filePattern: String (Required)
destination (Required): {
container (Optional): {
path: String (Optional)
containerUrl: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
uploadHeaders (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
}
}
uploadOptions (Required): {
uploadCondition: String(tasksuccess/taskfailure/taskcompletion) (Required)
}
}
]
environmentSettings (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
constraints (Optional): {
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
requiredSlots: Integer (Optional)
killJobOnCompletion: Boolean (Optional)
userIdentity (Optional): {
username: String (Optional)
autoUser (Optional): {
scope: String(task/pool) (Optional)
elevationLevel: String(nonadmin/admin) (Optional)
}
}
runExclusive: Boolean (Optional)
applicationPackageReferences (Optional): [
(Optional){
applicationId: String (Required)
version: String (Optional)
}
]
authenticationTokenSettings (Optional): {
access (Optional): [
String(job) (Optional)
]
}
allowLowPriorityNode: Boolean (Optional)
}
jobPreparationTask (Optional): {
id: String (Optional)
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
constraints (Optional): (recursive schema, see constraints above)
waitForSuccess: Boolean (Optional)
userIdentity (Optional): (recursive schema, see userIdentity above)
rerunOnNodeRebootAfterSuccess: Boolean (Optional)
}
jobReleaseTask (Optional): {
id: String (Optional)
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
userIdentity (Optional): (recursive schema, see userIdentity above)
}
commonEnvironmentSettings (Optional): [
(recursive schema, see above)
]
poolInfo (Required): {
poolId: String (Optional)
autoPoolSpecification (Optional): {
autoPoolIdPrefix: String (Optional)
poolLifetimeOption: String(jobschedule/job) (Required)
keepAlive: Boolean (Optional)
pool (Optional): {
displayName: String (Optional)
vmSize: String (Required)
virtualMachineConfiguration (Optional): {
imageReference (Required): {
publisher: String (Optional)
offer: String (Optional)
sku: String (Optional)
version: String (Optional)
virtualMachineImageId: String (Optional)
exactVersion: String (Optional)
sharedGalleryImageId: String (Optional)
communityGalleryImageId: String (Optional)
}
nodeAgentSKUId: String (Required)
windowsConfiguration (Optional): {
enableAutomaticUpdates: Boolean (Optional)
}
dataDisks (Optional): [
(Optional){
lun: int (Required)
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: int (Required)
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
}
]
licenseType: String (Optional)
containerConfiguration (Optional): {
type: String(dockerCompatible/criCompatible) (Required)
containerImageNames (Optional): [
String (Optional)
]
containerRegistries (Optional): [
(recursive schema, see above)
]
}
diskEncryptionConfiguration (Optional): {
targets (Optional): [
String(osdisk/temporarydisk) (Optional)
]
}
nodePlacementConfiguration (Optional): {
policy: String(regional/zonal) (Optional)
}
extensions (Optional): [
(Optional){
name: String (Required)
publisher: String (Required)
type: String (Required)
typeHandlerVersion: String (Optional)
autoUpgradeMinorVersion: Boolean (Optional)
enableAutomaticUpgrade: Boolean (Optional)
settings (Optional): {
String: String (Required)
}
protectedSettings (Optional): {
String: String (Required)
}
provisionAfterExtensions (Optional): [
String (Optional)
]
}
]
osDisk (Optional): {
ephemeralOSDiskSettings (Optional): {
placement: String(cachedisk) (Optional)
}
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: Integer (Optional)
managedDisk (Optional): {
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
securityProfile (Optional): {
securityEncryptionType: String(NonPersistedTPM/VMGuestStateOnly) (Optional)
}
}
writeAcceleratorEnabled: Boolean (Optional)
}
securityProfile (Optional): {
encryptionAtHost: Boolean (Optional)
securityType: String(trustedLaunch/confidentialVM) (Optional)
uefiSettings (Optional): {
secureBootEnabled: Boolean (Optional)
vTpmEnabled: Boolean (Optional)
}
}
serviceArtifactReference (Optional): {
id: String (Required)
}
}
taskSlotsPerNode: Integer (Optional)
taskSchedulingPolicy (Optional): {
nodeFillType: String(spread/pack) (Required)
}
resizeTimeout: Duration (Optional)
resourceTags: String (Optional)
targetDedicatedNodes: Integer (Optional)
targetLowPriorityNodes: Integer (Optional)
enableAutoScale: Boolean (Optional)
autoScaleFormula: String (Optional)
autoScaleEvaluationInterval: Duration (Optional)
enableInterNodeCommunication: Boolean (Optional)
networkConfiguration (Optional): {
subnetId: String (Optional)
dynamicVNetAssignmentScope: String(none/job) (Optional)
endpointConfiguration (Optional): {
inboundNATPools (Required): [
(Required){
name: String (Required)
protocol: String(tcp/udp) (Required)
backendPort: int (Required)
frontendPortRangeStart: int (Required)
frontendPortRangeEnd: int (Required)
networkSecurityGroupRules (Optional): [
(Optional){
priority: int (Required)
access: String(allow/deny) (Required)
sourceAddressPrefix: String (Required)
sourcePortRanges (Optional): [
String (Optional)
]
}
]
}
]
}
publicIPAddressConfiguration (Optional): {
provision: String(batchmanaged/usermanaged/nopublicipaddresses) (Optional)
ipAddressIds (Optional): [
String (Optional)
]
}
enableAcceleratedNetworking: Boolean (Optional)
}
startTask (Optional): {
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
userIdentity (Optional): (recursive schema, see userIdentity above)
maxTaskRetryCount: Integer (Optional)
waitForSuccess: Boolean (Optional)
}
certificateReferences (Optional): [
(Optional){
thumbprint: String (Required)
thumbprintAlgorithm: String (Required)
storeLocation: String(currentuser/localmachine) (Optional)
storeName: String (Optional)
visibility (Optional): [
String(starttask/task/remoteuser) (Optional)
]
}
]
applicationPackageReferences (Optional): [
(recursive schema, see above)
]
userAccounts (Optional): [
(Optional){
name: String (Required)
password: String (Required)
elevationLevel: String(nonadmin/admin) (Optional)
linuxUserConfiguration (Optional): {
uid: Integer (Optional)
gid: Integer (Optional)
sshPrivateKey: String (Optional)
}
windowsUserConfiguration (Optional): {
loginMode: String(batch/interactive) (Optional)
}
}
]
metadata (Optional): [
(Optional){
name: String (Required)
value: String (Required)
}
]
mountConfiguration (Optional): [
(Optional){
azureBlobFileSystemConfiguration (Optional): {
accountName: String (Required)
containerName: String (Required)
accountKey: String (Optional)
sasKey: String (Optional)
blobfuseOptions: String (Optional)
relativeMountPath: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
}
nfsMountConfiguration (Optional): {
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
cifsMountConfiguration (Optional): {
username: String (Required)
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
password: String (Required)
}
azureFileShareConfiguration (Optional): {
accountName: String (Required)
accountKey: String (Required)
azureFileUrl: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
}
]
targetNodeCommunicationMode: String(default/classic/simplified) (Optional)
upgradePolicy (Optional): {
mode: String(automatic/manual/rolling) (Required)
automaticOSUpgradePolicy (Optional): {
disableAutomaticRollback: Boolean (Optional)
enableAutomaticOSUpgrade: Boolean (Optional)
useRollingUpgradePolicy: Boolean (Optional)
osRollingUpgradeDeferral: Boolean (Optional)
}
rollingUpgradePolicy (Optional): {
enableCrossZoneUpgrade: Boolean (Optional)
maxBatchInstancePercent: Integer (Optional)
maxUnhealthyInstancePercent: Integer (Optional)
maxUnhealthyUpgradedInstancePercent: Integer (Optional)
pauseTimeBetweenBatches: Duration (Optional)
prioritizeUnhealthyInstances: Boolean (Optional)
rollbackFailedInstancesOnPolicyBreach: Boolean (Optional)
}
}
}
}
}
metadata (Optional): [
(recursive schema, see above)
]
}
executionInfo (Optional): {
nextRunTime: OffsetDateTime (Optional)
recentJob (Optional): {
id: String (Optional)
url: String (Optional)
}
endTime: OffsetDateTime (Optional)
}
metadata (Optional): [
(recursive schema, see above)
]
stats (Optional): {
url: String (Required)
startTime: OffsetDateTime (Required)
lastUpdateTime: OffsetDateTime (Required)
userCPUTime: Duration (Required)
kernelCPUTime: Duration (Required)
wallClockTime: Duration (Required)
readIOps: long (Required)
writeIOps: long (Required)
readIOGiB: double (Required)
writeIOGiB: double (Required)
numSucceededTasks: long (Required)
numFailedTasks: long (Required)
numTaskRetries: long (Required)
waitTime: Duration (Required)
}
}
Parameters:
Returns:
listJobsFromSchedule
public PagedIterable<BatchJob> listJobsFromSchedule(String jobScheduleId)
Lists the Jobs that have been created under the specified Job Schedule.
Parameters:
Returns:
listJobsFromSchedule
public PagedIterable<BatchJob> listJobsFromSchedule(String jobScheduleId, BatchJobsFromScheduleListOptions options)
Lists the Jobs that have been created under the specified Job Schedule.
Parameters:
Returns:
listJobsFromSchedule
public PagedIterable<BinaryData> listJobsFromSchedule(String jobScheduleId, RequestOptions requestOptions)
Lists the Jobs that have been created under the specified Job Schedule.
Query Parameters
| ---------- | ------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| maxresults | Integer | No | The maximum number of items to return in the response. A maximum of 1000 applications can be returned. |
| $filter | String | No | An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch\#list-jobs-in-a-job-schedule. |
| $select | List<String> | No | An OData $select clause. In the form of "," separated string. |
| $expand | List<String> | No | An OData $expand clause. In the form of "," separated string. |
You can add these to a request with RequestOptions#addQueryParam
Response Body Schema
{
id: String (Optional)
displayName: String (Optional)
usesTaskDependencies: Boolean (Optional)
url: String (Optional)
eTag: String (Optional)
lastModified: OffsetDateTime (Optional)
creationTime: OffsetDateTime (Optional)
state: String(active/disabling/disabled/enabling/terminating/completed/deleting) (Optional)
stateTransitionTime: OffsetDateTime (Optional)
previousState: String(active/disabling/disabled/enabling/terminating/completed/deleting) (Optional)
previousStateTransitionTime: OffsetDateTime (Optional)
priority: Integer (Optional)
allowTaskPreemption: Boolean (Optional)
maxParallelTasks: Integer (Optional)
constraints (Optional): {
maxWallClockTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
jobManagerTask (Optional): {
id: String (Required)
displayName: String (Optional)
commandLine: String (Required)
containerSettings (Optional): {
containerRunOptions: String (Optional)
imageName: String (Required)
registry (Optional): {
username: String (Optional)
password: String (Optional)
registryServer: String (Optional)
identityReference (Optional): {
resourceId: String (Optional)
}
}
workingDirectory: String(taskWorkingDirectory/containerImageDefault) (Optional)
containerHostBatchBindMounts (Optional): [
(Optional){
source: String(Shared/Startup/VfsMounts/Task/JobPrep/Applications) (Optional)
isReadOnly: Boolean (Optional)
}
]
}
resourceFiles (Optional): [
(Optional){
autoStorageContainerName: String (Optional)
storageContainerUrl: String (Optional)
httpUrl: String (Optional)
blobPrefix: String (Optional)
filePath: String (Optional)
fileMode: String (Optional)
identityReference (Optional): (recursive schema, see identityReference above)
}
]
outputFiles (Optional): [
(Optional){
filePattern: String (Required)
destination (Required): {
container (Optional): {
path: String (Optional)
containerUrl: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
uploadHeaders (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
}
}
uploadOptions (Required): {
uploadCondition: String(tasksuccess/taskfailure/taskcompletion) (Required)
}
}
]
environmentSettings (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
constraints (Optional): {
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
requiredSlots: Integer (Optional)
killJobOnCompletion: Boolean (Optional)
userIdentity (Optional): {
username: String (Optional)
autoUser (Optional): {
scope: String(task/pool) (Optional)
elevationLevel: String(nonadmin/admin) (Optional)
}
}
runExclusive: Boolean (Optional)
applicationPackageReferences (Optional): [
(Optional){
applicationId: String (Required)
version: String (Optional)
}
]
authenticationTokenSettings (Optional): {
access (Optional): [
String(job) (Optional)
]
}
allowLowPriorityNode: Boolean (Optional)
}
jobPreparationTask (Optional): {
id: String (Optional)
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
constraints (Optional): (recursive schema, see constraints above)
waitForSuccess: Boolean (Optional)
userIdentity (Optional): (recursive schema, see userIdentity above)
rerunOnNodeRebootAfterSuccess: Boolean (Optional)
}
jobReleaseTask (Optional): {
id: String (Optional)
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
userIdentity (Optional): (recursive schema, see userIdentity above)
}
commonEnvironmentSettings (Optional): [
(recursive schema, see above)
]
poolInfo (Required): {
poolId: String (Optional)
autoPoolSpecification (Optional): {
autoPoolIdPrefix: String (Optional)
poolLifetimeOption: String(jobschedule/job) (Required)
keepAlive: Boolean (Optional)
pool (Optional): {
displayName: String (Optional)
vmSize: String (Required)
virtualMachineConfiguration (Optional): {
imageReference (Required): {
publisher: String (Optional)
offer: String (Optional)
sku: String (Optional)
version: String (Optional)
virtualMachineImageId: String (Optional)
exactVersion: String (Optional)
sharedGalleryImageId: String (Optional)
communityGalleryImageId: String (Optional)
}
nodeAgentSKUId: String (Required)
windowsConfiguration (Optional): {
enableAutomaticUpdates: Boolean (Optional)
}
dataDisks (Optional): [
(Optional){
lun: int (Required)
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: int (Required)
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
}
]
licenseType: String (Optional)
containerConfiguration (Optional): {
type: String(dockerCompatible/criCompatible) (Required)
containerImageNames (Optional): [
String (Optional)
]
containerRegistries (Optional): [
(recursive schema, see above)
]
}
diskEncryptionConfiguration (Optional): {
targets (Optional): [
String(osdisk/temporarydisk) (Optional)
]
}
nodePlacementConfiguration (Optional): {
policy: String(regional/zonal) (Optional)
}
extensions (Optional): [
(Optional){
name: String (Required)
publisher: String (Required)
type: String (Required)
typeHandlerVersion: String (Optional)
autoUpgradeMinorVersion: Boolean (Optional)
enableAutomaticUpgrade: Boolean (Optional)
settings (Optional): {
String: String (Required)
}
protectedSettings (Optional): {
String: String (Required)
}
provisionAfterExtensions (Optional): [
String (Optional)
]
}
]
osDisk (Optional): {
ephemeralOSDiskSettings (Optional): {
placement: String(cachedisk) (Optional)
}
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: Integer (Optional)
managedDisk (Optional): {
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
securityProfile (Optional): {
securityEncryptionType: String(NonPersistedTPM/VMGuestStateOnly) (Optional)
}
}
writeAcceleratorEnabled: Boolean (Optional)
}
securityProfile (Optional): {
encryptionAtHost: Boolean (Optional)
securityType: String(trustedLaunch/confidentialVM) (Optional)
uefiSettings (Optional): {
secureBootEnabled: Boolean (Optional)
vTpmEnabled: Boolean (Optional)
}
}
serviceArtifactReference (Optional): {
id: String (Required)
}
}
taskSlotsPerNode: Integer (Optional)
taskSchedulingPolicy (Optional): {
nodeFillType: String(spread/pack) (Required)
}
resizeTimeout: Duration (Optional)
resourceTags: String (Optional)
targetDedicatedNodes: Integer (Optional)
targetLowPriorityNodes: Integer (Optional)
enableAutoScale: Boolean (Optional)
autoScaleFormula: String (Optional)
autoScaleEvaluationInterval: Duration (Optional)
enableInterNodeCommunication: Boolean (Optional)
networkConfiguration (Optional): {
subnetId: String (Optional)
dynamicVNetAssignmentScope: String(none/job) (Optional)
endpointConfiguration (Optional): {
inboundNATPools (Required): [
(Required){
name: String (Required)
protocol: String(tcp/udp) (Required)
backendPort: int (Required)
frontendPortRangeStart: int (Required)
frontendPortRangeEnd: int (Required)
networkSecurityGroupRules (Optional): [
(Optional){
priority: int (Required)
access: String(allow/deny) (Required)
sourceAddressPrefix: String (Required)
sourcePortRanges (Optional): [
String (Optional)
]
}
]
}
]
}
publicIPAddressConfiguration (Optional): {
provision: String(batchmanaged/usermanaged/nopublicipaddresses) (Optional)
ipAddressIds (Optional): [
String (Optional)
]
}
enableAcceleratedNetworking: Boolean (Optional)
}
startTask (Optional): {
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
userIdentity (Optional): (recursive schema, see userIdentity above)
maxTaskRetryCount: Integer (Optional)
waitForSuccess: Boolean (Optional)
}
certificateReferences (Optional): [
(Optional){
thumbprint: String (Required)
thumbprintAlgorithm: String (Required)
storeLocation: String(currentuser/localmachine) (Optional)
storeName: String (Optional)
visibility (Optional): [
String(starttask/task/remoteuser) (Optional)
]
}
]
applicationPackageReferences (Optional): [
(recursive schema, see above)
]
userAccounts (Optional): [
(Optional){
name: String (Required)
password: String (Required)
elevationLevel: String(nonadmin/admin) (Optional)
linuxUserConfiguration (Optional): {
uid: Integer (Optional)
gid: Integer (Optional)
sshPrivateKey: String (Optional)
}
windowsUserConfiguration (Optional): {
loginMode: String(batch/interactive) (Optional)
}
}
]
metadata (Optional): [
(Optional){
name: String (Required)
value: String (Required)
}
]
mountConfiguration (Optional): [
(Optional){
azureBlobFileSystemConfiguration (Optional): {
accountName: String (Required)
containerName: String (Required)
accountKey: String (Optional)
sasKey: String (Optional)
blobfuseOptions: String (Optional)
relativeMountPath: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
}
nfsMountConfiguration (Optional): {
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
cifsMountConfiguration (Optional): {
username: String (Required)
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
password: String (Required)
}
azureFileShareConfiguration (Optional): {
accountName: String (Required)
accountKey: String (Required)
azureFileUrl: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
}
]
targetNodeCommunicationMode: String(default/classic/simplified) (Optional)
upgradePolicy (Optional): {
mode: String(automatic/manual/rolling) (Required)
automaticOSUpgradePolicy (Optional): {
disableAutomaticRollback: Boolean (Optional)
enableAutomaticOSUpgrade: Boolean (Optional)
useRollingUpgradePolicy: Boolean (Optional)
osRollingUpgradeDeferral: Boolean (Optional)
}
rollingUpgradePolicy (Optional): {
enableCrossZoneUpgrade: Boolean (Optional)
maxBatchInstancePercent: Integer (Optional)
maxUnhealthyInstancePercent: Integer (Optional)
maxUnhealthyUpgradedInstancePercent: Integer (Optional)
pauseTimeBetweenBatches: Duration (Optional)
prioritizeUnhealthyInstances: Boolean (Optional)
rollbackFailedInstancesOnPolicyBreach: Boolean (Optional)
}
}
}
}
}
onAllTasksComplete: String(noaction/terminatejob) (Optional)
onTaskFailure: String(noaction/performexitoptionsjobaction) (Optional)
networkConfiguration (Optional): {
subnetId: String (Required)
skipWithdrawFromVNet: Boolean (Optional)
}
metadata (Optional): [
(recursive schema, see above)
]
executionInfo (Optional): {
startTime: OffsetDateTime (Required)
endTime: OffsetDateTime (Optional)
poolId: String (Optional)
schedulingError (Optional): {
category: String(usererror/servererror) (Required)
code: String (Optional)
message: String (Optional)
details (Optional): [
(Optional){
name: String (Optional)
value: String (Optional)
}
]
}
terminateReason: String (Optional)
}
stats (Optional): {
url: String (Required)
startTime: OffsetDateTime (Required)
lastUpdateTime: OffsetDateTime (Required)
userCPUTime: Duration (Required)
kernelCPUTime: Duration (Required)
wallClockTime: Duration (Required)
readIOps: long (Required)
writeIOps: long (Required)
readIOGiB: double (Required)
writeIOGiB: double (Required)
numSucceededTasks: long (Required)
numFailedTasks: long (Required)
numTaskRetries: long (Required)
waitTime: Duration (Required)
}
}
Parameters:
Returns:
listNodeExtensions
public PagedIterable<BatchNodeVMExtension> listNodeExtensions(String poolId, String nodeId)
Lists the Compute Nodes Extensions in the specified Pool.
Parameters:
Returns:
listNodeExtensions
public PagedIterable<BatchNodeVMExtension> listNodeExtensions(String poolId, String nodeId, BatchNodeExtensionsListOptions options)
Lists the Compute Nodes Extensions in the specified Pool.
Parameters:
Returns:
listNodeExtensions
public PagedIterable<BinaryData> listNodeExtensions(String poolId, String nodeId, RequestOptions requestOptions)
Lists the Compute Nodes Extensions in the specified Pool.
Query Parameters
| ---------- | ------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| maxresults | Integer | No | The maximum number of items to return in the response. A maximum of 1000 applications can be returned. |
| $select | List<String> | No | An OData $select clause. In the form of "," separated string. |
You can add these to a request with RequestOptions#addQueryParam
Response Body Schema
{
provisioningState: String (Optional)
vmExtension (Optional): {
name: String (Required)
publisher: String (Required)
type: String (Required)
typeHandlerVersion: String (Optional)
autoUpgradeMinorVersion: Boolean (Optional)
enableAutomaticUpgrade: Boolean (Optional)
settings (Optional): {
String: String (Required)
}
protectedSettings (Optional): {
String: String (Required)
}
provisionAfterExtensions (Optional): [
String (Optional)
]
}
instanceView (Optional): {
name: String (Optional)
statuses (Optional): [
(Optional){
code: String (Optional)
displayStatus: String (Optional)
level: String(Error/Info/Warning) (Optional)
message: String (Optional)
time: OffsetDateTime (Optional)
}
]
subStatuses (Optional): [
(recursive schema, see above)
]
}
}
Parameters:
Returns:
listNodeFiles
public PagedIterable<BatchNodeFile> listNodeFiles(String poolId, String nodeId)
Lists all of the files in Task directories on the specified Compute Node.
Parameters:
Returns:
listNodeFiles
public PagedIterable<BatchNodeFile> listNodeFiles(String poolId, String nodeId, BatchNodeFilesListOptions options)
Lists all of the files in Task directories on the specified Compute Node.
Parameters:
Returns:
listNodeFiles
public PagedIterable<BinaryData> listNodeFiles(String poolId, String nodeId, RequestOptions requestOptions)
Lists all of the files in Task directories on the specified Compute Node.
Query Parameters
| ---------- | -------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| maxresults | Integer | No | The maximum number of items to return in the response. A maximum of 1000 applications can be returned. |
| $filter | String | No | An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch\#list-compute-node-files. |
| recursive | Boolean | No | Whether to list children of a directory. |
You can add these to a request with RequestOptions#addQueryParam
Response Body Schema
{
name: String (Optional)
url: String (Optional)
isDirectory: Boolean (Optional)
properties (Optional): {
creationTime: OffsetDateTime (Optional)
lastModified: OffsetDateTime (Required)
contentLength: long (Required)
contentType: String (Optional)
fileMode: String (Optional)
}
}
Parameters:
Returns:
listNodes
public PagedIterable<BatchNode> listNodes(String poolId)
Lists the Compute Nodes in the specified Pool.
Parameters:
Returns:
listNodes
public PagedIterable<BatchNode> listNodes(String poolId, BatchNodesListOptions options)
Lists the Compute Nodes in the specified Pool.
Parameters:
Returns:
listNodes
public PagedIterable<BinaryData> listNodes(String poolId, RequestOptions requestOptions)
Lists the Compute Nodes in the specified Pool.
Query Parameters
| ---------- | ------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| maxresults | Integer | No | The maximum number of items to return in the response. A maximum of 1000 applications can be returned. |
| $filter | String | No | An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch\#list-nodes-in-a-pool. |
| $select | List<String> | No | An OData $select clause. In the form of "," separated string. |
You can add these to a request with RequestOptions#addQueryParam
Response Body Schema
{
id: String (Optional)
url: String (Optional)
state: String(idle/rebooting/reimaging/running/unusable/creating/starting/waitingforstarttask/starttaskfailed/unknown/leavingpool/offline/preempted/upgradingos/deallocated/deallocating) (Optional)
schedulingState: String(enabled/disabled) (Optional)
stateTransitionTime: OffsetDateTime (Optional)
lastBootTime: OffsetDateTime (Optional)
allocationTime: OffsetDateTime (Optional)
ipAddress: String (Optional)
affinityId: String (Optional)
vmSize: String (Optional)
totalTasksRun: Integer (Optional)
runningTasksCount: Integer (Optional)
runningTaskSlotsCount: Integer (Optional)
totalTasksSucceeded: Integer (Optional)
recentTasks (Optional): [
(Optional){
taskUrl: String (Optional)
jobId: String (Optional)
taskId: String (Optional)
subtaskId: Integer (Optional)
taskState: String(active/preparing/running/completed) (Required)
executionInfo (Optional): {
startTime: OffsetDateTime (Optional)
endTime: OffsetDateTime (Optional)
exitCode: Integer (Optional)
containerInfo (Optional): {
containerId: String (Optional)
state: String (Optional)
error: String (Optional)
}
failureInfo (Optional): {
category: String(usererror/servererror) (Required)
code: String (Optional)
message: String (Optional)
details (Optional): [
(Optional){
name: String (Optional)
value: String (Optional)
}
]
}
retryCount: int (Required)
lastRetryTime: OffsetDateTime (Optional)
requeueCount: int (Required)
lastRequeueTime: OffsetDateTime (Optional)
result: String(success/failure) (Optional)
}
}
]
startTask (Optional): {
commandLine: String (Required)
containerSettings (Optional): {
containerRunOptions: String (Optional)
imageName: String (Required)
registry (Optional): {
username: String (Optional)
password: String (Optional)
registryServer: String (Optional)
identityReference (Optional): {
resourceId: String (Optional)
}
}
workingDirectory: String(taskWorkingDirectory/containerImageDefault) (Optional)
containerHostBatchBindMounts (Optional): [
(Optional){
source: String(Shared/Startup/VfsMounts/Task/JobPrep/Applications) (Optional)
isReadOnly: Boolean (Optional)
}
]
}
resourceFiles (Optional): [
(Optional){
autoStorageContainerName: String (Optional)
storageContainerUrl: String (Optional)
httpUrl: String (Optional)
blobPrefix: String (Optional)
filePath: String (Optional)
fileMode: String (Optional)
identityReference (Optional): (recursive schema, see identityReference above)
}
]
environmentSettings (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
userIdentity (Optional): {
username: String (Optional)
autoUser (Optional): {
scope: String(task/pool) (Optional)
elevationLevel: String(nonadmin/admin) (Optional)
}
}
maxTaskRetryCount: Integer (Optional)
waitForSuccess: Boolean (Optional)
}
startTaskInfo (Optional): {
state: String(running/completed) (Required)
startTime: OffsetDateTime (Required)
endTime: OffsetDateTime (Optional)
exitCode: Integer (Optional)
containerInfo (Optional): (recursive schema, see containerInfo above)
failureInfo (Optional): (recursive schema, see failureInfo above)
retryCount: int (Required)
lastRetryTime: OffsetDateTime (Optional)
result: String(success/failure) (Optional)
}
certificateReferences (Optional): [
(Optional){
thumbprint: String (Required)
thumbprintAlgorithm: String (Required)
storeLocation: String(currentuser/localmachine) (Optional)
storeName: String (Optional)
visibility (Optional): [
String(starttask/task/remoteuser) (Optional)
]
}
]
errors (Optional): [
(Optional){
code: String (Optional)
message: String (Optional)
errorDetails (Optional): [
(recursive schema, see above)
]
}
]
isDedicated: Boolean (Optional)
endpointConfiguration (Optional): {
inboundEndpoints (Required): [
(Required){
name: String (Required)
protocol: String(tcp/udp) (Required)
publicIPAddress: String (Required)
publicFQDN: String (Required)
frontendPort: int (Required)
backendPort: int (Required)
}
]
}
nodeAgentInfo (Optional): {
version: String (Required)
lastUpdateTime: OffsetDateTime (Required)
}
virtualMachineInfo (Optional): {
imageReference (Optional): {
publisher: String (Optional)
offer: String (Optional)
sku: String (Optional)
version: String (Optional)
virtualMachineImageId: String (Optional)
exactVersion: String (Optional)
sharedGalleryImageId: String (Optional)
communityGalleryImageId: String (Optional)
}
scaleSetVmResourceId: String (Optional)
}
}
Parameters:
Returns:
listPoolNodeCounts
public PagedIterable<BatchPoolNodeCounts> listPoolNodeCounts()
Gets the number of Compute Nodes in each state, grouped by Pool. Note that the numbers returned may not always be up to date. If you need exact node counts, use a list query.
Returns:
listPoolNodeCounts
public PagedIterable<BatchPoolNodeCounts> listPoolNodeCounts(BatchPoolNodeCountsListOptions options)
Gets the number of Compute Nodes in each state, grouped by Pool. Note that the numbers returned may not always be up to date. If you need exact node counts, use a list query.
Parameters:
Returns:
listPoolNodeCounts
public PagedIterable<BinaryData> listPoolNodeCounts(RequestOptions requestOptions)
Gets the number of Compute Nodes in each state, grouped by Pool. Note that the numbers returned may not always be up to date. If you need exact node counts, use a list query.
Query Parameters
| ---------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| maxresults | Integer | No | The maximum number of items to return in the response. A maximum of 1000 applications can be returned. |
| $filter | String | No | An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch\#list-support-images. |
You can add these to a request with RequestOptions#addQueryParam
Response Body Schema
{
poolId: String (Required)
dedicated (Optional): {
creating: int (Required)
idle: int (Required)
offline: int (Required)
preempted: int (Required)
rebooting: int (Required)
reimaging: int (Required)
running: int (Required)
starting: int (Required)
startTaskFailed: int (Required)
leavingPool: int (Required)
unknown: int (Required)
unusable: int (Required)
waitingForStartTask: int (Required)
deallocated: int (Required)
deallocating: int (Required)
total: int (Required)
upgradingOS: int (Required)
}
lowPriority (Optional): (recursive schema, see lowPriority above)
}
Parameters:
Returns:
listPools
public PagedIterable<BatchPool> listPools()
Lists all of the Pools which be mounted.
Returns:
listPools
public PagedIterable<BatchPool> listPools(BatchPoolsListOptions options)
Lists all of the Pools which be mounted.
Parameters:
Returns:
listPools
public PagedIterable<BinaryData> listPools(RequestOptions requestOptions)
Lists all of the Pools which be mounted.
Query Parameters
| ---------- | ------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| maxresults | Integer | No | The maximum number of items to return in the response. A maximum of 1000 applications can be returned. |
| $filter | String | No | An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch\#list-pools. |
| $select | List<String> | No | An OData $select clause. In the form of "," separated string. |
| $expand | List<String> | No | An OData $expand clause. In the form of "," separated string. |
You can add these to a request with RequestOptions#addQueryParam
Response Body Schema
{
id: String (Optional)
displayName: String (Optional)
url: String (Optional)
eTag: String (Optional)
lastModified: OffsetDateTime (Optional)
creationTime: OffsetDateTime (Optional)
state: String(active/deleting) (Optional)
stateTransitionTime: OffsetDateTime (Optional)
allocationState: String(steady/resizing/stopping) (Optional)
allocationStateTransitionTime: OffsetDateTime (Optional)
vmSize: String (Optional)
virtualMachineConfiguration (Optional): {
imageReference (Required): {
publisher: String (Optional)
offer: String (Optional)
sku: String (Optional)
version: String (Optional)
virtualMachineImageId: String (Optional)
exactVersion: String (Optional)
sharedGalleryImageId: String (Optional)
communityGalleryImageId: String (Optional)
}
nodeAgentSKUId: String (Required)
windowsConfiguration (Optional): {
enableAutomaticUpdates: Boolean (Optional)
}
dataDisks (Optional): [
(Optional){
lun: int (Required)
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: int (Required)
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
}
]
licenseType: String (Optional)
containerConfiguration (Optional): {
type: String(dockerCompatible/criCompatible) (Required)
containerImageNames (Optional): [
String (Optional)
]
containerRegistries (Optional): [
(Optional){
username: String (Optional)
password: String (Optional)
registryServer: String (Optional)
identityReference (Optional): {
resourceId: String (Optional)
}
}
]
}
diskEncryptionConfiguration (Optional): {
targets (Optional): [
String(osdisk/temporarydisk) (Optional)
]
}
nodePlacementConfiguration (Optional): {
policy: String(regional/zonal) (Optional)
}
extensions (Optional): [
(Optional){
name: String (Required)
publisher: String (Required)
type: String (Required)
typeHandlerVersion: String (Optional)
autoUpgradeMinorVersion: Boolean (Optional)
enableAutomaticUpgrade: Boolean (Optional)
settings (Optional): {
String: String (Required)
}
protectedSettings (Optional): {
String: String (Required)
}
provisionAfterExtensions (Optional): [
String (Optional)
]
}
]
osDisk (Optional): {
ephemeralOSDiskSettings (Optional): {
placement: String(cachedisk) (Optional)
}
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: Integer (Optional)
managedDisk (Optional): {
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
securityProfile (Optional): {
securityEncryptionType: String(NonPersistedTPM/VMGuestStateOnly) (Optional)
}
}
writeAcceleratorEnabled: Boolean (Optional)
}
securityProfile (Optional): {
encryptionAtHost: Boolean (Optional)
securityType: String(trustedLaunch/confidentialVM) (Optional)
uefiSettings (Optional): {
secureBootEnabled: Boolean (Optional)
vTpmEnabled: Boolean (Optional)
}
}
serviceArtifactReference (Optional): {
id: String (Required)
}
}
resizeTimeout: Duration (Optional)
resizeErrors (Optional): [
(Optional){
code: String (Optional)
message: String (Optional)
values (Optional): [
(Optional){
name: String (Optional)
value: String (Optional)
}
]
}
]
resourceTags (Optional): {
String: String (Required)
}
currentDedicatedNodes: Integer (Optional)
currentLowPriorityNodes: Integer (Optional)
targetDedicatedNodes: Integer (Optional)
targetLowPriorityNodes: Integer (Optional)
enableAutoScale: Boolean (Optional)
autoScaleFormula: String (Optional)
autoScaleEvaluationInterval: Duration (Optional)
autoScaleRun (Optional): {
timestamp: OffsetDateTime (Required)
results: String (Optional)
error (Optional): {
code: String (Optional)
message: String (Optional)
values (Optional): [
(recursive schema, see above)
]
}
}
enableInterNodeCommunication: Boolean (Optional)
networkConfiguration (Optional): {
subnetId: String (Optional)
dynamicVNetAssignmentScope: String(none/job) (Optional)
endpointConfiguration (Optional): {
inboundNATPools (Required): [
(Required){
name: String (Required)
protocol: String(tcp/udp) (Required)
backendPort: int (Required)
frontendPortRangeStart: int (Required)
frontendPortRangeEnd: int (Required)
networkSecurityGroupRules (Optional): [
(Optional){
priority: int (Required)
access: String(allow/deny) (Required)
sourceAddressPrefix: String (Required)
sourcePortRanges (Optional): [
String (Optional)
]
}
]
}
]
}
publicIPAddressConfiguration (Optional): {
provision: String(batchmanaged/usermanaged/nopublicipaddresses) (Optional)
ipAddressIds (Optional): [
String (Optional)
]
}
enableAcceleratedNetworking: Boolean (Optional)
}
startTask (Optional): {
commandLine: String (Required)
containerSettings (Optional): {
containerRunOptions: String (Optional)
imageName: String (Required)
registry (Optional): (recursive schema, see registry above)
workingDirectory: String(taskWorkingDirectory/containerImageDefault) (Optional)
containerHostBatchBindMounts (Optional): [
(Optional){
source: String(Shared/Startup/VfsMounts/Task/JobPrep/Applications) (Optional)
isReadOnly: Boolean (Optional)
}
]
}
resourceFiles (Optional): [
(Optional){
autoStorageContainerName: String (Optional)
storageContainerUrl: String (Optional)
httpUrl: String (Optional)
blobPrefix: String (Optional)
filePath: String (Optional)
fileMode: String (Optional)
identityReference (Optional): (recursive schema, see identityReference above)
}
]
environmentSettings (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
userIdentity (Optional): {
username: String (Optional)
autoUser (Optional): {
scope: String(task/pool) (Optional)
elevationLevel: String(nonadmin/admin) (Optional)
}
}
maxTaskRetryCount: Integer (Optional)
waitForSuccess: Boolean (Optional)
}
certificateReferences (Optional): [
(Optional){
thumbprint: String (Required)
thumbprintAlgorithm: String (Required)
storeLocation: String(currentuser/localmachine) (Optional)
storeName: String (Optional)
visibility (Optional): [
String(starttask/task/remoteuser) (Optional)
]
}
]
applicationPackageReferences (Optional): [
(Optional){
applicationId: String (Required)
version: String (Optional)
}
]
taskSlotsPerNode: Integer (Optional)
taskSchedulingPolicy (Optional): {
nodeFillType: String(spread/pack) (Required)
}
userAccounts (Optional): [
(Optional){
name: String (Required)
password: String (Required)
elevationLevel: String(nonadmin/admin) (Optional)
linuxUserConfiguration (Optional): {
uid: Integer (Optional)
gid: Integer (Optional)
sshPrivateKey: String (Optional)
}
windowsUserConfiguration (Optional): {
loginMode: String(batch/interactive) (Optional)
}
}
]
metadata (Optional): [
(Optional){
name: String (Required)
value: String (Required)
}
]
stats (Optional): {
url: String (Required)
startTime: OffsetDateTime (Required)
lastUpdateTime: OffsetDateTime (Required)
usageStats (Optional): {
startTime: OffsetDateTime (Required)
lastUpdateTime: OffsetDateTime (Required)
dedicatedCoreTime: Duration (Required)
}
resourceStats (Optional): {
startTime: OffsetDateTime (Required)
lastUpdateTime: OffsetDateTime (Required)
avgCPUPercentage: double (Required)
avgMemoryGiB: double (Required)
peakMemoryGiB: double (Required)
avgDiskGiB: double (Required)
peakDiskGiB: double (Required)
diskReadIOps: long (Required)
diskWriteIOps: long (Required)
diskReadGiB: double (Required)
diskWriteGiB: double (Required)
networkReadGiB: double (Required)
networkWriteGiB: double (Required)
}
}
mountConfiguration (Optional): [
(Optional){
azureBlobFileSystemConfiguration (Optional): {
accountName: String (Required)
containerName: String (Required)
accountKey: String (Optional)
sasKey: String (Optional)
blobfuseOptions: String (Optional)
relativeMountPath: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
}
nfsMountConfiguration (Optional): {
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
cifsMountConfiguration (Optional): {
username: String (Required)
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
password: String (Required)
}
azureFileShareConfiguration (Optional): {
accountName: String (Required)
accountKey: String (Required)
azureFileUrl: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
}
]
identity (Optional): {
type: String(UserAssigned/None) (Required)
userAssignedIdentities (Optional): [
(Optional){
resourceId: String (Required)
clientId: String (Optional)
principalId: String (Optional)
}
]
}
targetNodeCommunicationMode: String(default/classic/simplified) (Optional)
currentNodeCommunicationMode: String(default/classic/simplified) (Optional)
upgradePolicy (Optional): {
mode: String(automatic/manual/rolling) (Required)
automaticOSUpgradePolicy (Optional): {
disableAutomaticRollback: Boolean (Optional)
enableAutomaticOSUpgrade: Boolean (Optional)
useRollingUpgradePolicy: Boolean (Optional)
osRollingUpgradeDeferral: Boolean (Optional)
}
rollingUpgradePolicy (Optional): {
enableCrossZoneUpgrade: Boolean (Optional)
maxBatchInstancePercent: Integer (Optional)
maxUnhealthyInstancePercent: Integer (Optional)
maxUnhealthyUpgradedInstancePercent: Integer (Optional)
pauseTimeBetweenBatches: Duration (Optional)
prioritizeUnhealthyInstances: Boolean (Optional)
rollbackFailedInstancesOnPolicyBreach: Boolean (Optional)
}
}
}
Parameters:
Returns:
listPoolUsageMetrics
public PagedIterable<BatchPoolUsageMetrics> listPoolUsageMetrics()
Lists the usage metrics, aggregated by Pool across individual time intervals, for the specified Account. 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.
Returns:
listPoolUsageMetrics
public PagedIterable<BatchPoolUsageMetrics> listPoolUsageMetrics(BatchPoolUsageMetricsListOptions options)
Lists the usage metrics, aggregated by Pool across individual time intervals, for the specified Account. 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.
Parameters:
Returns:
listPoolUsageMetrics
public PagedIterable<BinaryData> listPoolUsageMetrics(RequestOptions requestOptions)
Lists the usage metrics, aggregated by Pool across individual time intervals, for the specified Account. 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.
Query Parameters
| ---------- | -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| maxresults | Integer | No | The maximum number of items to return in the response. A maximum of 1000 applications can be returned. |
| startTime | OffsetDateTime | No | The earliest time from which to include metrics. This must be at least two and a half hours before the current time. If not specified this defaults to the start time of the last aggregation interval currently available. |
| endtime | OffsetDateTime | No | The latest time from which to include metrics. This must be at least two hours before the current time. If not specified this defaults to the end time of the last aggregation interval currently available. |
| $filter | String | No | An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch\#list-account-usage-metrics. |
You can add these to a request with RequestOptions#addQueryParam
Response Body Schema
{
poolId: String (Required)
startTime: OffsetDateTime (Required)
endTime: OffsetDateTime (Required)
vmSize: String (Required)
totalCoreHours: double (Required)
}
Parameters:
Returns:
listSubTasks
public PagedIterable<BatchSubtask> listSubTasks(String jobId, String taskId)
Lists all of the subtasks that are associated with the specified multi-instance Task. If the Task is not a multi-instance Task then this returns an empty collection.
Parameters:
Returns:
listSubTasks
public PagedIterable<BatchSubtask> listSubTasks(String jobId, String taskId, BatchSubTasksListOptions options)
Lists all of the subtasks that are associated with the specified multi-instance Task. If the Task is not a multi-instance Task then this returns an empty collection.
Parameters:
Returns:
listSubTasks
public PagedIterable<BinaryData> listSubTasks(String jobId, String taskId, RequestOptions requestOptions)
Lists all of the subtasks that are associated with the specified multi-instance Task. If the Task is not a multi-instance Task then this returns an empty collection.
Query Parameters
| ------- | ------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| $select | List<String> | No | An OData $select clause. In the form of "," separated string. |
You can add these to a request with RequestOptions#addQueryParam
Response Body Schema
{
id: Integer (Optional)
nodeInfo (Optional): {
affinityId: String (Optional)
nodeUrl: String (Optional)
poolId: String (Optional)
nodeId: String (Optional)
taskRootDirectory: String (Optional)
taskRootDirectoryUrl: String (Optional)
}
startTime: OffsetDateTime (Optional)
endTime: OffsetDateTime (Optional)
exitCode: Integer (Optional)
containerInfo (Optional): {
containerId: String (Optional)
state: String (Optional)
error: String (Optional)
}
failureInfo (Optional): {
category: String(usererror/servererror) (Required)
code: String (Optional)
message: String (Optional)
details (Optional): [
(Optional){
name: String (Optional)
value: String (Optional)
}
]
}
state: String(preparing/running/completed) (Optional)
stateTransitionTime: OffsetDateTime (Optional)
previousState: String(preparing/running/completed) (Optional)
previousStateTransitionTime: OffsetDateTime (Optional)
result: String(success/failure) (Optional)
}
Parameters:
Returns:
listSupportedImages
public PagedIterable<BatchSupportedImage> listSupportedImages()
Lists all Virtual Machine Images supported by the Azure Batch service.
Returns:
listSupportedImages
public PagedIterable<BinaryData> listSupportedImages(RequestOptions requestOptions)
Lists all Virtual Machine Images supported by the Azure Batch service.
Query Parameters
| ---------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| maxresults | Integer | No | The maximum number of items to return in the response. A maximum of 1000 applications can be returned. |
| $filter | String | No | An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch\#list-support-images. |
You can add these to a request with RequestOptions#addQueryParam
Response Body Schema
{
nodeAgentSKUId: String (Required)
imageReference (Required): {
publisher: String (Optional)
offer: String (Optional)
sku: String (Optional)
version: String (Optional)
virtualMachineImageId: String (Optional)
exactVersion: String (Optional)
sharedGalleryImageId: String (Optional)
communityGalleryImageId: String (Optional)
}
osType: String(linux/windows) (Required)
capabilities (Optional): [
String (Optional)
]
batchSupportEndOfLife: OffsetDateTime (Optional)
verificationType: String(verified/unverified) (Required)
}
Parameters:
Returns:
listSupportedImages
public PagedIterable<BatchSupportedImage> listSupportedImages(SupportedBatchImagesListOptions options)
Lists all Virtual Machine Images supported by the Azure Batch service.
Parameters:
Returns:
listTaskFiles
public PagedIterable<BatchNodeFile> listTaskFiles(String jobId, String taskId)
Lists the files in a Task's directory on its Compute Node.
Parameters:
Returns:
listTaskFiles
public PagedIterable<BatchNodeFile> listTaskFiles(String jobId, String taskId, BatchTaskFilesListOptions options)
Lists the files in a Task's directory on its Compute Node.
Parameters:
Returns:
listTaskFiles
public PagedIterable<BinaryData> listTaskFiles(String jobId, String taskId, RequestOptions requestOptions)
Lists the files in a Task's directory on its Compute Node.
Query Parameters
| ---------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| maxresults | Integer | No | The maximum number of items to return in the response. A maximum of 1000 applications can be returned. |
| $filter | String | No | An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch\#list-task-files. |
| recursive | Boolean | No | Whether to list children of the Task directory. This parameter can be used in combination with the filter parameter to list specific type of files. |
You can add these to a request with RequestOptions#addQueryParam
Response Body Schema
{
name: String (Optional)
url: String (Optional)
isDirectory: Boolean (Optional)
properties (Optional): {
creationTime: OffsetDateTime (Optional)
lastModified: OffsetDateTime (Required)
contentLength: long (Required)
contentType: String (Optional)
fileMode: String (Optional)
}
}
Parameters:
Returns:
listTasks
public PagedIterable<BatchTask> listTasks(String jobId)
Lists all of the Tasks that are associated with the specified Job. 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.
Parameters:
Returns:
listTasks
public PagedIterable<BatchTask> listTasks(String jobId, BatchTasksListOptions options)
Lists all of the Tasks that are associated with the specified Job. 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.
Parameters:
Returns:
listTasks
public PagedIterable<BinaryData> listTasks(String jobId, RequestOptions requestOptions)
Lists all of the Tasks that are associated with the specified Job. 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.
Query Parameters
| ---------- | ------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
| maxresults | Integer | No | The maximum number of items to return in the response. A maximum of 1000 applications can be returned. |
| $filter | String | No | An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch\#list-tasks. |
| $select | List<String> | No | An OData $select clause. In the form of "," separated string. |
| $expand | List<String> | No | An OData $expand clause. In the form of "," separated string. |
You can add these to a request with RequestOptions#addQueryParam
Response Body Schema
{
id: String (Optional)
displayName: String (Optional)
url: String (Optional)
eTag: String (Optional)
lastModified: OffsetDateTime (Optional)
creationTime: OffsetDateTime (Optional)
exitConditions (Optional): {
exitCodes (Optional): [
(Optional){
code: int (Required)
exitOptions (Required): {
jobAction: String(none/disable/terminate) (Optional)
dependencyAction: String(satisfy/block) (Optional)
}
}
]
exitCodeRanges (Optional): [
(Optional){
start: int (Required)
end: int (Required)
exitOptions (Required): (recursive schema, see exitOptions above)
}
]
preProcessingError (Optional): (recursive schema, see preProcessingError above)
fileUploadError (Optional): (recursive schema, see fileUploadError above)
default (Optional): (recursive schema, see default above)
}
state: String(active/preparing/running/completed) (Optional)
stateTransitionTime: OffsetDateTime (Optional)
previousState: String(active/preparing/running/completed) (Optional)
previousStateTransitionTime: OffsetDateTime (Optional)
commandLine: String (Optional)
containerSettings (Optional): {
containerRunOptions: String (Optional)
imageName: String (Required)
registry (Optional): {
username: String (Optional)
password: String (Optional)
registryServer: String (Optional)
identityReference (Optional): {
resourceId: String (Optional)
}
}
workingDirectory: String(taskWorkingDirectory/containerImageDefault) (Optional)
containerHostBatchBindMounts (Optional): [
(Optional){
source: String(Shared/Startup/VfsMounts/Task/JobPrep/Applications) (Optional)
isReadOnly: Boolean (Optional)
}
]
}
resourceFiles (Optional): [
(Optional){
autoStorageContainerName: String (Optional)
storageContainerUrl: String (Optional)
httpUrl: String (Optional)
blobPrefix: String (Optional)
filePath: String (Optional)
fileMode: String (Optional)
identityReference (Optional): (recursive schema, see identityReference above)
}
]
outputFiles (Optional): [
(Optional){
filePattern: String (Required)
destination (Required): {
container (Optional): {
path: String (Optional)
containerUrl: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
uploadHeaders (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
}
}
uploadOptions (Required): {
uploadCondition: String(tasksuccess/taskfailure/taskcompletion) (Required)
}
}
]
environmentSettings (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
affinityInfo (Optional): {
affinityId: String (Required)
}
constraints (Optional): {
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
requiredSlots: Integer (Optional)
userIdentity (Optional): {
username: String (Optional)
autoUser (Optional): {
scope: String(task/pool) (Optional)
elevationLevel: String(nonadmin/admin) (Optional)
}
}
executionInfo (Optional): {
startTime: OffsetDateTime (Optional)
endTime: OffsetDateTime (Optional)
exitCode: Integer (Optional)
containerInfo (Optional): {
containerId: String (Optional)
state: String (Optional)
error: String (Optional)
}
failureInfo (Optional): {
category: String(usererror/servererror) (Required)
code: String (Optional)
message: String (Optional)
details (Optional): [
(Optional){
name: String (Optional)
value: String (Optional)
}
]
}
retryCount: int (Required)
lastRetryTime: OffsetDateTime (Optional)
requeueCount: int (Required)
lastRequeueTime: OffsetDateTime (Optional)
result: String(success/failure) (Optional)
}
nodeInfo (Optional): {
affinityId: String (Optional)
nodeUrl: String (Optional)
poolId: String (Optional)
nodeId: String (Optional)
taskRootDirectory: String (Optional)
taskRootDirectoryUrl: String (Optional)
}
multiInstanceSettings (Optional): {
numberOfInstances: Integer (Optional)
coordinationCommandLine: String (Required)
commonResourceFiles (Optional): [
(recursive schema, see above)
]
}
stats (Optional): {
url: String (Required)
startTime: OffsetDateTime (Required)
lastUpdateTime: OffsetDateTime (Required)
userCPUTime: Duration (Required)
kernelCPUTime: Duration (Required)
wallClockTime: Duration (Required)
readIOps: long (Required)
writeIOps: long (Required)
readIOGiB: double (Required)
writeIOGiB: double (Required)
waitTime: Duration (Required)
}
dependsOn (Optional): {
taskIds (Optional): [
String (Optional)
]
taskIdRanges (Optional): [
(Optional){
start: int (Required)
end: int (Required)
}
]
}
applicationPackageReferences (Optional): [
(Optional){
applicationId: String (Required)
version: String (Optional)
}
]
authenticationTokenSettings (Optional): {
access (Optional): [
String(job) (Optional)
]
}
}
Parameters:
Returns:
poolExists
public boolean poolExists(String poolId)
Gets basic properties of a Pool.
Parameters:
Returns:
poolExists
public boolean poolExists(String poolId, BatchPoolExistsOptions options, RequestConditions requestConditions)
Gets basic properties of a Pool.
Parameters:
Returns:
poolExistsWithResponse
public Response<Boolean> poolExistsWithResponse(String poolId, RequestOptions requestOptions)
Gets basic properties of a Pool.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Header Parameters
| ------------------- | -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| If-Modified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. |
| If-Unmodified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. |
| If-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. |
| If-None-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. |
You can add these to a request with RequestOptions#addHeader
Response Body Schema
boolean
Parameters:
Returns:
reactivateTask
public void reactivateTask(String jobId, String taskId)
Reactivates a Task, allowing it to run again even if its retry count has been exhausted. Reactivation makes a Task eligible to be retried again up to its maximum retry count. The Task's state is changed to active. As the Task is no longer in the completed state, any previous exit code or failure information is no longer available after reactivation. Each time a Task is reactivated, its retry count is reset to 0. Reactivation will fail for Tasks that are not completed or that previously completed successfully (with an exit code of 0). Additionally, it will fail if the Job has completed (or is terminating or deleting).
Parameters:
reactivateTask
public void reactivateTask(String jobId, String taskId, BatchTaskReactivateOptions options, RequestConditions requestConditions)
Reactivates a Task, allowing it to run again even if its retry count has been exhausted. Reactivation makes a Task eligible to be retried again up to its maximum retry count. The Task's state is changed to active. As the Task is no longer in the completed state, any previous exit code or failure information is no longer available after reactivation. Each time a Task is reactivated, its retry count is reset to 0. Reactivation will fail for Tasks that are not completed or that previously completed successfully (with an exit code of 0). Additionally, it will fail if the Job has completed (or is terminating or deleting).
Parameters:
reactivateTaskWithResponse
public Response<Void> reactivateTaskWithResponse(String jobId, String taskId, RequestOptions requestOptions)
Reactivates a Task, allowing it to run again even if its retry count has been exhausted. Reactivation makes a Task eligible to be retried again up to its maximum retry count. The Task's state is changed to active. As the Task is no longer in the completed state, any previous exit code or failure information is no longer available after reactivation. Each time a Task is reactivated, its retry count is reset to 0. Reactivation will fail for Tasks that are not completed or that previously completed successfully (with an exit code of 0). Additionally, it will fail if the Job has completed (or is terminating or deleting).
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Header Parameters
| ------------------- | -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| If-Modified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. |
| If-Unmodified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. |
| If-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. |
| If-None-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. |
You can add these to a request with RequestOptions#addHeader
Parameters:
Returns:
replaceJob
public void replaceJob(String jobId, BatchJob job)
Updates the properties of the specified Job. This fully replaces all the updatable properties of the Job. For example, if the Job has constraints associated with it and if constraints is not specified with this request, then the Batch service will remove the existing constraints.
Parameters:
replaceJob
public void replaceJob(String jobId, BatchJob job, BatchJobReplaceOptions options, RequestConditions requestConditions)
Updates the properties of the specified Job. This fully replaces all the updatable properties of the Job. For example, if the Job has constraints associated with it and if constraints is not specified with this request, then the Batch service will remove the existing constraints.
Parameters:
replaceJobSchedule
public void replaceJobSchedule(String jobScheduleId, BatchJobSchedule jobSchedule)
Updates the properties of the specified Job Schedule. 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.
Parameters:
replaceJobSchedule
public void replaceJobSchedule(String jobScheduleId, BatchJobSchedule jobSchedule, BatchJobScheduleReplaceOptions options, RequestConditions requestConditions)
Updates the properties of the specified Job Schedule. 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.
Parameters:
replaceJobScheduleWithResponse
public Response<Void> replaceJobScheduleWithResponse(String jobScheduleId, BinaryData jobSchedule, RequestOptions requestOptions)
Updates the properties of the specified Job Schedule. 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.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Header Parameters
| ------------------- | -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| If-Modified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. |
| If-Unmodified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. |
| If-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. |
| If-None-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. |
You can add these to a request with RequestOptions#addHeader
Request Body Schema
{
id: String (Optional)
displayName: String (Optional)
url: String (Optional)
eTag: String (Optional)
lastModified: OffsetDateTime (Optional)
creationTime: OffsetDateTime (Optional)
state: String(active/completed/disabled/terminating/deleting) (Optional)
stateTransitionTime: OffsetDateTime (Optional)
previousState: String(active/completed/disabled/terminating/deleting) (Optional)
previousStateTransitionTime: OffsetDateTime (Optional)
schedule (Optional): {
doNotRunUntil: OffsetDateTime (Optional)
doNotRunAfter: OffsetDateTime (Optional)
startWindow: Duration (Optional)
recurrenceInterval: Duration (Optional)
}
jobSpecification (Required): {
priority: Integer (Optional)
allowTaskPreemption: Boolean (Optional)
maxParallelTasks: Integer (Optional)
displayName: String (Optional)
usesTaskDependencies: Boolean (Optional)
onAllTasksComplete: String(noaction/terminatejob) (Optional)
onTaskFailure: String(noaction/performexitoptionsjobaction) (Optional)
networkConfiguration (Optional): {
subnetId: String (Required)
skipWithdrawFromVNet: Boolean (Optional)
}
constraints (Optional): {
maxWallClockTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
jobManagerTask (Optional): {
id: String (Required)
displayName: String (Optional)
commandLine: String (Required)
containerSettings (Optional): {
containerRunOptions: String (Optional)
imageName: String (Required)
registry (Optional): {
username: String (Optional)
password: String (Optional)
registryServer: String (Optional)
identityReference (Optional): {
resourceId: String (Optional)
}
}
workingDirectory: String(taskWorkingDirectory/containerImageDefault) (Optional)
containerHostBatchBindMounts (Optional): [
(Optional){
source: String(Shared/Startup/VfsMounts/Task/JobPrep/Applications) (Optional)
isReadOnly: Boolean (Optional)
}
]
}
resourceFiles (Optional): [
(Optional){
autoStorageContainerName: String (Optional)
storageContainerUrl: String (Optional)
httpUrl: String (Optional)
blobPrefix: String (Optional)
filePath: String (Optional)
fileMode: String (Optional)
identityReference (Optional): (recursive schema, see identityReference above)
}
]
outputFiles (Optional): [
(Optional){
filePattern: String (Required)
destination (Required): {
container (Optional): {
path: String (Optional)
containerUrl: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
uploadHeaders (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
}
}
uploadOptions (Required): {
uploadCondition: String(tasksuccess/taskfailure/taskcompletion) (Required)
}
}
]
environmentSettings (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
constraints (Optional): {
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
requiredSlots: Integer (Optional)
killJobOnCompletion: Boolean (Optional)
userIdentity (Optional): {
username: String (Optional)
autoUser (Optional): {
scope: String(task/pool) (Optional)
elevationLevel: String(nonadmin/admin) (Optional)
}
}
runExclusive: Boolean (Optional)
applicationPackageReferences (Optional): [
(Optional){
applicationId: String (Required)
version: String (Optional)
}
]
authenticationTokenSettings (Optional): {
access (Optional): [
String(job) (Optional)
]
}
allowLowPriorityNode: Boolean (Optional)
}
jobPreparationTask (Optional): {
id: String (Optional)
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
constraints (Optional): (recursive schema, see constraints above)
waitForSuccess: Boolean (Optional)
userIdentity (Optional): (recursive schema, see userIdentity above)
rerunOnNodeRebootAfterSuccess: Boolean (Optional)
}
jobReleaseTask (Optional): {
id: String (Optional)
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
userIdentity (Optional): (recursive schema, see userIdentity above)
}
commonEnvironmentSettings (Optional): [
(recursive schema, see above)
]
poolInfo (Required): {
poolId: String (Optional)
autoPoolSpecification (Optional): {
autoPoolIdPrefix: String (Optional)
poolLifetimeOption: String(jobschedule/job) (Required)
keepAlive: Boolean (Optional)
pool (Optional): {
displayName: String (Optional)
vmSize: String (Required)
virtualMachineConfiguration (Optional): {
imageReference (Required): {
publisher: String (Optional)
offer: String (Optional)
sku: String (Optional)
version: String (Optional)
virtualMachineImageId: String (Optional)
exactVersion: String (Optional)
sharedGalleryImageId: String (Optional)
communityGalleryImageId: String (Optional)
}
nodeAgentSKUId: String (Required)
windowsConfiguration (Optional): {
enableAutomaticUpdates: Boolean (Optional)
}
dataDisks (Optional): [
(Optional){
lun: int (Required)
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: int (Required)
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
}
]
licenseType: String (Optional)
containerConfiguration (Optional): {
type: String(dockerCompatible/criCompatible) (Required)
containerImageNames (Optional): [
String (Optional)
]
containerRegistries (Optional): [
(recursive schema, see above)
]
}
diskEncryptionConfiguration (Optional): {
targets (Optional): [
String(osdisk/temporarydisk) (Optional)
]
}
nodePlacementConfiguration (Optional): {
policy: String(regional/zonal) (Optional)
}
extensions (Optional): [
(Optional){
name: String (Required)
publisher: String (Required)
type: String (Required)
typeHandlerVersion: String (Optional)
autoUpgradeMinorVersion: Boolean (Optional)
enableAutomaticUpgrade: Boolean (Optional)
settings (Optional): {
String: String (Required)
}
protectedSettings (Optional): {
String: String (Required)
}
provisionAfterExtensions (Optional): [
String (Optional)
]
}
]
osDisk (Optional): {
ephemeralOSDiskSettings (Optional): {
placement: String(cachedisk) (Optional)
}
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: Integer (Optional)
managedDisk (Optional): {
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
securityProfile (Optional): {
securityEncryptionType: String(NonPersistedTPM/VMGuestStateOnly) (Optional)
}
}
writeAcceleratorEnabled: Boolean (Optional)
}
securityProfile (Optional): {
encryptionAtHost: Boolean (Optional)
securityType: String(trustedLaunch/confidentialVM) (Optional)
uefiSettings (Optional): {
secureBootEnabled: Boolean (Optional)
vTpmEnabled: Boolean (Optional)
}
}
serviceArtifactReference (Optional): {
id: String (Required)
}
}
taskSlotsPerNode: Integer (Optional)
taskSchedulingPolicy (Optional): {
nodeFillType: String(spread/pack) (Required)
}
resizeTimeout: Duration (Optional)
resourceTags: String (Optional)
targetDedicatedNodes: Integer (Optional)
targetLowPriorityNodes: Integer (Optional)
enableAutoScale: Boolean (Optional)
autoScaleFormula: String (Optional)
autoScaleEvaluationInterval: Duration (Optional)
enableInterNodeCommunication: Boolean (Optional)
networkConfiguration (Optional): {
subnetId: String (Optional)
dynamicVNetAssignmentScope: String(none/job) (Optional)
endpointConfiguration (Optional): {
inboundNATPools (Required): [
(Required){
name: String (Required)
protocol: String(tcp/udp) (Required)
backendPort: int (Required)
frontendPortRangeStart: int (Required)
frontendPortRangeEnd: int (Required)
networkSecurityGroupRules (Optional): [
(Optional){
priority: int (Required)
access: String(allow/deny) (Required)
sourceAddressPrefix: String (Required)
sourcePortRanges (Optional): [
String (Optional)
]
}
]
}
]
}
publicIPAddressConfiguration (Optional): {
provision: String(batchmanaged/usermanaged/nopublicipaddresses) (Optional)
ipAddressIds (Optional): [
String (Optional)
]
}
enableAcceleratedNetworking: Boolean (Optional)
}
startTask (Optional): {
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
userIdentity (Optional): (recursive schema, see userIdentity above)
maxTaskRetryCount: Integer (Optional)
waitForSuccess: Boolean (Optional)
}
certificateReferences (Optional): [
(Optional){
thumbprint: String (Required)
thumbprintAlgorithm: String (Required)
storeLocation: String(currentuser/localmachine) (Optional)
storeName: String (Optional)
visibility (Optional): [
String(starttask/task/remoteuser) (Optional)
]
}
]
applicationPackageReferences (Optional): [
(recursive schema, see above)
]
userAccounts (Optional): [
(Optional){
name: String (Required)
password: String (Required)
elevationLevel: String(nonadmin/admin) (Optional)
linuxUserConfiguration (Optional): {
uid: Integer (Optional)
gid: Integer (Optional)
sshPrivateKey: String (Optional)
}
windowsUserConfiguration (Optional): {
loginMode: String(batch/interactive) (Optional)
}
}
]
metadata (Optional): [
(Optional){
name: String (Required)
value: String (Required)
}
]
mountConfiguration (Optional): [
(Optional){
azureBlobFileSystemConfiguration (Optional): {
accountName: String (Required)
containerName: String (Required)
accountKey: String (Optional)
sasKey: String (Optional)
blobfuseOptions: String (Optional)
relativeMountPath: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
}
nfsMountConfiguration (Optional): {
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
cifsMountConfiguration (Optional): {
username: String (Required)
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
password: String (Required)
}
azureFileShareConfiguration (Optional): {
accountName: String (Required)
accountKey: String (Required)
azureFileUrl: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
}
]
targetNodeCommunicationMode: String(default/classic/simplified) (Optional)
upgradePolicy (Optional): {
mode: String(automatic/manual/rolling) (Required)
automaticOSUpgradePolicy (Optional): {
disableAutomaticRollback: Boolean (Optional)
enableAutomaticOSUpgrade: Boolean (Optional)
useRollingUpgradePolicy: Boolean (Optional)
osRollingUpgradeDeferral: Boolean (Optional)
}
rollingUpgradePolicy (Optional): {
enableCrossZoneUpgrade: Boolean (Optional)
maxBatchInstancePercent: Integer (Optional)
maxUnhealthyInstancePercent: Integer (Optional)
maxUnhealthyUpgradedInstancePercent: Integer (Optional)
pauseTimeBetweenBatches: Duration (Optional)
prioritizeUnhealthyInstances: Boolean (Optional)
rollbackFailedInstancesOnPolicyBreach: Boolean (Optional)
}
}
}
}
}
metadata (Optional): [
(recursive schema, see above)
]
}
executionInfo (Optional): {
nextRunTime: OffsetDateTime (Optional)
recentJob (Optional): {
id: String (Optional)
url: String (Optional)
}
endTime: OffsetDateTime (Optional)
}
metadata (Optional): [
(recursive schema, see above)
]
stats (Optional): {
url: String (Required)
startTime: OffsetDateTime (Required)
lastUpdateTime: OffsetDateTime (Required)
userCPUTime: Duration (Required)
kernelCPUTime: Duration (Required)
wallClockTime: Duration (Required)
readIOps: long (Required)
writeIOps: long (Required)
readIOGiB: double (Required)
writeIOGiB: double (Required)
numSucceededTasks: long (Required)
numFailedTasks: long (Required)
numTaskRetries: long (Required)
waitTime: Duration (Required)
}
}
Parameters:
Returns:
replaceJobWithResponse
public Response<Void> replaceJobWithResponse(String jobId, BinaryData job, RequestOptions requestOptions)
Updates the properties of the specified Job. This fully replaces all the updatable properties of the Job. For example, if the Job has constraints associated with it and if constraints is not specified with this request, then the Batch service will remove the existing constraints.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Header Parameters
| ------------------- | -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| If-Modified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. |
| If-Unmodified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. |
| If-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. |
| If-None-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. |
You can add these to a request with RequestOptions#addHeader
Request Body Schema
{
id: String (Optional)
displayName: String (Optional)
usesTaskDependencies: Boolean (Optional)
url: String (Optional)
eTag: String (Optional)
lastModified: OffsetDateTime (Optional)
creationTime: OffsetDateTime (Optional)
state: String(active/disabling/disabled/enabling/terminating/completed/deleting) (Optional)
stateTransitionTime: OffsetDateTime (Optional)
previousState: String(active/disabling/disabled/enabling/terminating/completed/deleting) (Optional)
previousStateTransitionTime: OffsetDateTime (Optional)
priority: Integer (Optional)
allowTaskPreemption: Boolean (Optional)
maxParallelTasks: Integer (Optional)
constraints (Optional): {
maxWallClockTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
jobManagerTask (Optional): {
id: String (Required)
displayName: String (Optional)
commandLine: String (Required)
containerSettings (Optional): {
containerRunOptions: String (Optional)
imageName: String (Required)
registry (Optional): {
username: String (Optional)
password: String (Optional)
registryServer: String (Optional)
identityReference (Optional): {
resourceId: String (Optional)
}
}
workingDirectory: String(taskWorkingDirectory/containerImageDefault) (Optional)
containerHostBatchBindMounts (Optional): [
(Optional){
source: String(Shared/Startup/VfsMounts/Task/JobPrep/Applications) (Optional)
isReadOnly: Boolean (Optional)
}
]
}
resourceFiles (Optional): [
(Optional){
autoStorageContainerName: String (Optional)
storageContainerUrl: String (Optional)
httpUrl: String (Optional)
blobPrefix: String (Optional)
filePath: String (Optional)
fileMode: String (Optional)
identityReference (Optional): (recursive schema, see identityReference above)
}
]
outputFiles (Optional): [
(Optional){
filePattern: String (Required)
destination (Required): {
container (Optional): {
path: String (Optional)
containerUrl: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
uploadHeaders (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
}
}
uploadOptions (Required): {
uploadCondition: String(tasksuccess/taskfailure/taskcompletion) (Required)
}
}
]
environmentSettings (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
constraints (Optional): {
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
requiredSlots: Integer (Optional)
killJobOnCompletion: Boolean (Optional)
userIdentity (Optional): {
username: String (Optional)
autoUser (Optional): {
scope: String(task/pool) (Optional)
elevationLevel: String(nonadmin/admin) (Optional)
}
}
runExclusive: Boolean (Optional)
applicationPackageReferences (Optional): [
(Optional){
applicationId: String (Required)
version: String (Optional)
}
]
authenticationTokenSettings (Optional): {
access (Optional): [
String(job) (Optional)
]
}
allowLowPriorityNode: Boolean (Optional)
}
jobPreparationTask (Optional): {
id: String (Optional)
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
constraints (Optional): (recursive schema, see constraints above)
waitForSuccess: Boolean (Optional)
userIdentity (Optional): (recursive schema, see userIdentity above)
rerunOnNodeRebootAfterSuccess: Boolean (Optional)
}
jobReleaseTask (Optional): {
id: String (Optional)
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
userIdentity (Optional): (recursive schema, see userIdentity above)
}
commonEnvironmentSettings (Optional): [
(recursive schema, see above)
]
poolInfo (Required): {
poolId: String (Optional)
autoPoolSpecification (Optional): {
autoPoolIdPrefix: String (Optional)
poolLifetimeOption: String(jobschedule/job) (Required)
keepAlive: Boolean (Optional)
pool (Optional): {
displayName: String (Optional)
vmSize: String (Required)
virtualMachineConfiguration (Optional): {
imageReference (Required): {
publisher: String (Optional)
offer: String (Optional)
sku: String (Optional)
version: String (Optional)
virtualMachineImageId: String (Optional)
exactVersion: String (Optional)
sharedGalleryImageId: String (Optional)
communityGalleryImageId: String (Optional)
}
nodeAgentSKUId: String (Required)
windowsConfiguration (Optional): {
enableAutomaticUpdates: Boolean (Optional)
}
dataDisks (Optional): [
(Optional){
lun: int (Required)
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: int (Required)
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
}
]
licenseType: String (Optional)
containerConfiguration (Optional): {
type: String(dockerCompatible/criCompatible) (Required)
containerImageNames (Optional): [
String (Optional)
]
containerRegistries (Optional): [
(recursive schema, see above)
]
}
diskEncryptionConfiguration (Optional): {
targets (Optional): [
String(osdisk/temporarydisk) (Optional)
]
}
nodePlacementConfiguration (Optional): {
policy: String(regional/zonal) (Optional)
}
extensions (Optional): [
(Optional){
name: String (Required)
publisher: String (Required)
type: String (Required)
typeHandlerVersion: String (Optional)
autoUpgradeMinorVersion: Boolean (Optional)
enableAutomaticUpgrade: Boolean (Optional)
settings (Optional): {
String: String (Required)
}
protectedSettings (Optional): {
String: String (Required)
}
provisionAfterExtensions (Optional): [
String (Optional)
]
}
]
osDisk (Optional): {
ephemeralOSDiskSettings (Optional): {
placement: String(cachedisk) (Optional)
}
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: Integer (Optional)
managedDisk (Optional): {
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
securityProfile (Optional): {
securityEncryptionType: String(NonPersistedTPM/VMGuestStateOnly) (Optional)
}
}
writeAcceleratorEnabled: Boolean (Optional)
}
securityProfile (Optional): {
encryptionAtHost: Boolean (Optional)
securityType: String(trustedLaunch/confidentialVM) (Optional)
uefiSettings (Optional): {
secureBootEnabled: Boolean (Optional)
vTpmEnabled: Boolean (Optional)
}
}
serviceArtifactReference (Optional): {
id: String (Required)
}
}
taskSlotsPerNode: Integer (Optional)
taskSchedulingPolicy (Optional): {
nodeFillType: String(spread/pack) (Required)
}
resizeTimeout: Duration (Optional)
resourceTags: String (Optional)
targetDedicatedNodes: Integer (Optional)
targetLowPriorityNodes: Integer (Optional)
enableAutoScale: Boolean (Optional)
autoScaleFormula: String (Optional)
autoScaleEvaluationInterval: Duration (Optional)
enableInterNodeCommunication: Boolean (Optional)
networkConfiguration (Optional): {
subnetId: String (Optional)
dynamicVNetAssignmentScope: String(none/job) (Optional)
endpointConfiguration (Optional): {
inboundNATPools (Required): [
(Required){
name: String (Required)
protocol: String(tcp/udp) (Required)
backendPort: int (Required)
frontendPortRangeStart: int (Required)
frontendPortRangeEnd: int (Required)
networkSecurityGroupRules (Optional): [
(Optional){
priority: int (Required)
access: String(allow/deny) (Required)
sourceAddressPrefix: String (Required)
sourcePortRanges (Optional): [
String (Optional)
]
}
]
}
]
}
publicIPAddressConfiguration (Optional): {
provision: String(batchmanaged/usermanaged/nopublicipaddresses) (Optional)
ipAddressIds (Optional): [
String (Optional)
]
}
enableAcceleratedNetworking: Boolean (Optional)
}
startTask (Optional): {
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
userIdentity (Optional): (recursive schema, see userIdentity above)
maxTaskRetryCount: Integer (Optional)
waitForSuccess: Boolean (Optional)
}
certificateReferences (Optional): [
(Optional){
thumbprint: String (Required)
thumbprintAlgorithm: String (Required)
storeLocation: String(currentuser/localmachine) (Optional)
storeName: String (Optional)
visibility (Optional): [
String(starttask/task/remoteuser) (Optional)
]
}
]
applicationPackageReferences (Optional): [
(recursive schema, see above)
]
userAccounts (Optional): [
(Optional){
name: String (Required)
password: String (Required)
elevationLevel: String(nonadmin/admin) (Optional)
linuxUserConfiguration (Optional): {
uid: Integer (Optional)
gid: Integer (Optional)
sshPrivateKey: String (Optional)
}
windowsUserConfiguration (Optional): {
loginMode: String(batch/interactive) (Optional)
}
}
]
metadata (Optional): [
(Optional){
name: String (Required)
value: String (Required)
}
]
mountConfiguration (Optional): [
(Optional){
azureBlobFileSystemConfiguration (Optional): {
accountName: String (Required)
containerName: String (Required)
accountKey: String (Optional)
sasKey: String (Optional)
blobfuseOptions: String (Optional)
relativeMountPath: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
}
nfsMountConfiguration (Optional): {
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
cifsMountConfiguration (Optional): {
username: String (Required)
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
password: String (Required)
}
azureFileShareConfiguration (Optional): {
accountName: String (Required)
accountKey: String (Required)
azureFileUrl: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
}
]
targetNodeCommunicationMode: String(default/classic/simplified) (Optional)
upgradePolicy (Optional): {
mode: String(automatic/manual/rolling) (Required)
automaticOSUpgradePolicy (Optional): {
disableAutomaticRollback: Boolean (Optional)
enableAutomaticOSUpgrade: Boolean (Optional)
useRollingUpgradePolicy: Boolean (Optional)
osRollingUpgradeDeferral: Boolean (Optional)
}
rollingUpgradePolicy (Optional): {
enableCrossZoneUpgrade: Boolean (Optional)
maxBatchInstancePercent: Integer (Optional)
maxUnhealthyInstancePercent: Integer (Optional)
maxUnhealthyUpgradedInstancePercent: Integer (Optional)
pauseTimeBetweenBatches: Duration (Optional)
prioritizeUnhealthyInstances: Boolean (Optional)
rollbackFailedInstancesOnPolicyBreach: Boolean (Optional)
}
}
}
}
}
onAllTasksComplete: String(noaction/terminatejob) (Optional)
onTaskFailure: String(noaction/performexitoptionsjobaction) (Optional)
networkConfiguration (Optional): {
subnetId: String (Required)
skipWithdrawFromVNet: Boolean (Optional)
}
metadata (Optional): [
(recursive schema, see above)
]
executionInfo (Optional): {
startTime: OffsetDateTime (Required)
endTime: OffsetDateTime (Optional)
poolId: String (Optional)
schedulingError (Optional): {
category: String(usererror/servererror) (Required)
code: String (Optional)
message: String (Optional)
details (Optional): [
(Optional){
name: String (Optional)
value: String (Optional)
}
]
}
terminateReason: String (Optional)
}
stats (Optional): {
url: String (Required)
startTime: OffsetDateTime (Required)
lastUpdateTime: OffsetDateTime (Required)
userCPUTime: Duration (Required)
kernelCPUTime: Duration (Required)
wallClockTime: Duration (Required)
readIOps: long (Required)
writeIOps: long (Required)
readIOGiB: double (Required)
writeIOGiB: double (Required)
numSucceededTasks: long (Required)
numFailedTasks: long (Required)
numTaskRetries: long (Required)
waitTime: Duration (Required)
}
}
Parameters:
Returns:
replaceNodeUser
public void replaceNodeUser(String poolId, String nodeId, String userName, BatchNodeUserUpdateParameters parameters)
Updates the password and expiration time of a user Account on the specified Compute Node. This operation replaces of all the updatable properties of the Account. For example, if the expiryTime element is not specified, the current value is replaced with the default value, not left unmodified. You can update a user Account on a Compute Node only when it is in the idle or running state.
Parameters:
replaceNodeUser
public void replaceNodeUser(String poolId, String nodeId, String userName, BatchNodeUserUpdateParameters parameters, BatchNodeUserReplaceOptions options)
Updates the password and expiration time of a user Account on the specified Compute Node. This operation replaces of all the updatable properties of the Account. For example, if the expiryTime element is not specified, the current value is replaced with the default value, not left unmodified. You can update a user Account on a Compute Node only when it is in the idle or running state.
Parameters:
replaceNodeUserWithResponse
public Response<Void> replaceNodeUserWithResponse(String poolId, String nodeId, String userName, BinaryData parameters, RequestOptions requestOptions)
Updates the password and expiration time of a user Account on the specified Compute Node. This operation replaces of all the updatable properties of the Account. For example, if the expiryTime element is not specified, the current value is replaced with the default value, not left unmodified. You can update a user Account on a Compute Node only when it is in the idle or running state.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Request Body Schema
{
password: String (Optional)
expiryTime: OffsetDateTime (Optional)
sshPublicKey: String (Optional)
}
Parameters:
Returns:
replacePoolProperties
public void replacePoolProperties(String poolId, BatchPoolReplaceParameters pool)
Updates the properties of the specified Pool. This fully replaces all the updatable properties of the Pool. For example, if the Pool has a StartTask associated with it and if StartTask is not specified with this request, then the Batch service will remove the existing StartTask.
Parameters:
replacePoolProperties
public void replacePoolProperties(String poolId, BatchPoolReplaceParameters pool, BatchPoolPropertiesReplaceOptions options)
Updates the properties of the specified Pool. This fully replaces all the updatable properties of the Pool. For example, if the Pool has a StartTask associated with it and if StartTask is not specified with this request, then the Batch service will remove the existing StartTask.
Parameters:
replacePoolPropertiesWithResponse
public Response<Void> replacePoolPropertiesWithResponse(String poolId, BinaryData pool, RequestOptions requestOptions)
Updates the properties of the specified Pool. This fully replaces all the updatable properties of the Pool. For example, if the Pool has a StartTask associated with it and if StartTask is not specified with this request, then the Batch service will remove the existing StartTask.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Request Body Schema
{
startTask (Optional): {
commandLine: String (Required)
containerSettings (Optional): {
containerRunOptions: String (Optional)
imageName: String (Required)
registry (Optional): {
username: String (Optional)
password: String (Optional)
registryServer: String (Optional)
identityReference (Optional): {
resourceId: String (Optional)
}
}
workingDirectory: String(taskWorkingDirectory/containerImageDefault) (Optional)
containerHostBatchBindMounts (Optional): [
(Optional){
source: String(Shared/Startup/VfsMounts/Task/JobPrep/Applications) (Optional)
isReadOnly: Boolean (Optional)
}
]
}
resourceFiles (Optional): [
(Optional){
autoStorageContainerName: String (Optional)
storageContainerUrl: String (Optional)
httpUrl: String (Optional)
blobPrefix: String (Optional)
filePath: String (Optional)
fileMode: String (Optional)
identityReference (Optional): (recursive schema, see identityReference above)
}
]
environmentSettings (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
userIdentity (Optional): {
username: String (Optional)
autoUser (Optional): {
scope: String(task/pool) (Optional)
elevationLevel: String(nonadmin/admin) (Optional)
}
}
maxTaskRetryCount: Integer (Optional)
waitForSuccess: Boolean (Optional)
}
certificateReferences (Required): [
(Required){
thumbprint: String (Required)
thumbprintAlgorithm: String (Required)
storeLocation: String(currentuser/localmachine) (Optional)
storeName: String (Optional)
visibility (Optional): [
String(starttask/task/remoteuser) (Optional)
]
}
]
applicationPackageReferences (Required): [
(Required){
applicationId: String (Required)
version: String (Optional)
}
]
metadata (Required): [
(Required){
name: String (Required)
value: String (Required)
}
]
targetNodeCommunicationMode: String(default/classic/simplified) (Optional)
}
Parameters:
Returns:
replaceTask
public void replaceTask(String jobId, String taskId, BatchTask task)
Updates the properties of the specified Task.
Parameters:
replaceTask
public void replaceTask(String jobId, String taskId, BatchTask task, BatchTaskReplaceOptions options, RequestConditions requestConditions)
Updates the properties of the specified Task.
Parameters:
replaceTaskWithResponse
public Response<Void> replaceTaskWithResponse(String jobId, String taskId, BinaryData task, RequestOptions requestOptions)
Updates the properties of the specified Task.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Header Parameters
| ------------------- | -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| If-Modified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. |
| If-Unmodified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. |
| If-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. |
| If-None-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. |
You can add these to a request with RequestOptions#addHeader
Request Body Schema
{
id: String (Optional)
displayName: String (Optional)
url: String (Optional)
eTag: String (Optional)
lastModified: OffsetDateTime (Optional)
creationTime: OffsetDateTime (Optional)
exitConditions (Optional): {
exitCodes (Optional): [
(Optional){
code: int (Required)
exitOptions (Required): {
jobAction: String(none/disable/terminate) (Optional)
dependencyAction: String(satisfy/block) (Optional)
}
}
]
exitCodeRanges (Optional): [
(Optional){
start: int (Required)
end: int (Required)
exitOptions (Required): (recursive schema, see exitOptions above)
}
]
preProcessingError (Optional): (recursive schema, see preProcessingError above)
fileUploadError (Optional): (recursive schema, see fileUploadError above)
default (Optional): (recursive schema, see default above)
}
state: String(active/preparing/running/completed) (Optional)
stateTransitionTime: OffsetDateTime (Optional)
previousState: String(active/preparing/running/completed) (Optional)
previousStateTransitionTime: OffsetDateTime (Optional)
commandLine: String (Optional)
containerSettings (Optional): {
containerRunOptions: String (Optional)
imageName: String (Required)
registry (Optional): {
username: String (Optional)
password: String (Optional)
registryServer: String (Optional)
identityReference (Optional): {
resourceId: String (Optional)
}
}
workingDirectory: String(taskWorkingDirectory/containerImageDefault) (Optional)
containerHostBatchBindMounts (Optional): [
(Optional){
source: String(Shared/Startup/VfsMounts/Task/JobPrep/Applications) (Optional)
isReadOnly: Boolean (Optional)
}
]
}
resourceFiles (Optional): [
(Optional){
autoStorageContainerName: String (Optional)
storageContainerUrl: String (Optional)
httpUrl: String (Optional)
blobPrefix: String (Optional)
filePath: String (Optional)
fileMode: String (Optional)
identityReference (Optional): (recursive schema, see identityReference above)
}
]
outputFiles (Optional): [
(Optional){
filePattern: String (Required)
destination (Required): {
container (Optional): {
path: String (Optional)
containerUrl: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
uploadHeaders (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
}
}
uploadOptions (Required): {
uploadCondition: String(tasksuccess/taskfailure/taskcompletion) (Required)
}
}
]
environmentSettings (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
affinityInfo (Optional): {
affinityId: String (Required)
}
constraints (Optional): {
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
requiredSlots: Integer (Optional)
userIdentity (Optional): {
username: String (Optional)
autoUser (Optional): {
scope: String(task/pool) (Optional)
elevationLevel: String(nonadmin/admin) (Optional)
}
}
executionInfo (Optional): {
startTime: OffsetDateTime (Optional)
endTime: OffsetDateTime (Optional)
exitCode: Integer (Optional)
containerInfo (Optional): {
containerId: String (Optional)
state: String (Optional)
error: String (Optional)
}
failureInfo (Optional): {
category: String(usererror/servererror) (Required)
code: String (Optional)
message: String (Optional)
details (Optional): [
(Optional){
name: String (Optional)
value: String (Optional)
}
]
}
retryCount: int (Required)
lastRetryTime: OffsetDateTime (Optional)
requeueCount: int (Required)
lastRequeueTime: OffsetDateTime (Optional)
result: String(success/failure) (Optional)
}
nodeInfo (Optional): {
affinityId: String (Optional)
nodeUrl: String (Optional)
poolId: String (Optional)
nodeId: String (Optional)
taskRootDirectory: String (Optional)
taskRootDirectoryUrl: String (Optional)
}
multiInstanceSettings (Optional): {
numberOfInstances: Integer (Optional)
coordinationCommandLine: String (Required)
commonResourceFiles (Optional): [
(recursive schema, see above)
]
}
stats (Optional): {
url: String (Required)
startTime: OffsetDateTime (Required)
lastUpdateTime: OffsetDateTime (Required)
userCPUTime: Duration (Required)
kernelCPUTime: Duration (Required)
wallClockTime: Duration (Required)
readIOps: long (Required)
writeIOps: long (Required)
readIOGiB: double (Required)
writeIOGiB: double (Required)
waitTime: Duration (Required)
}
dependsOn (Optional): {
taskIds (Optional): [
String (Optional)
]
taskIdRanges (Optional): [
(Optional){
start: int (Required)
end: int (Required)
}
]
}
applicationPackageReferences (Optional): [
(Optional){
applicationId: String (Required)
version: String (Optional)
}
]
authenticationTokenSettings (Optional): {
access (Optional): [
String(job) (Optional)
]
}
}
Parameters:
Returns:
terminateTask
public void terminateTask(String jobId, String taskId)
Terminates the specified Task. When the Task has been terminated, it moves to the completed state. For multi-instance Tasks, the terminate Task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.
Parameters:
terminateTask
public void terminateTask(String jobId, String taskId, BatchTaskTerminateOptions options, RequestConditions requestConditions)
Terminates the specified Task. When the Task has been terminated, it moves to the completed state. For multi-instance Tasks, the terminate Task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.
Parameters:
terminateTaskWithResponse
public Response<Void> terminateTaskWithResponse(String jobId, String taskId, RequestOptions requestOptions)
Terminates the specified Task. When the Task has been terminated, it moves to the completed state. For multi-instance Tasks, the terminate Task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Header Parameters
| ------------------- | -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| If-Modified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. |
| If-Unmodified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. |
| If-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. |
| If-None-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. |
You can add these to a request with RequestOptions#addHeader
Parameters:
Returns:
updateJob
public void updateJob(String jobId, BatchJobUpdateParameters job)
Updates the properties of the specified Job. This replaces only the Job properties specified in the request. For example, if the Job has constraints, and a request does not specify the constraints element, then the Job keeps the existing constraints.
Parameters:
updateJob
public void updateJob(String jobId, BatchJobUpdateParameters job, BatchJobUpdateOptions options, RequestConditions requestConditions)
Updates the properties of the specified Job. This replaces only the Job properties specified in the request. For example, if the Job has constraints, and a request does not specify the constraints element, then the Job keeps the existing constraints.
Parameters:
updateJobSchedule
public void updateJobSchedule(String jobScheduleId, BatchJobScheduleUpdateParameters jobSchedule)
Updates the properties of the specified Job Schedule. 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.
Parameters:
updateJobSchedule
public void updateJobSchedule(String jobScheduleId, BatchJobScheduleUpdateParameters jobSchedule, BatchJobScheduleUpdateOptions options, RequestConditions requestConditions)
Updates the properties of the specified Job Schedule. 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.
Parameters:
updateJobScheduleWithResponse
public Response<Void> updateJobScheduleWithResponse(String jobScheduleId, BinaryData jobSchedule, RequestOptions requestOptions)
Updates the properties of the specified Job Schedule. 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.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Header Parameters
| ------------------- | -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| If-Modified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. |
| If-Unmodified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. |
| If-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. |
| If-None-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. |
You can add these to a request with RequestOptions#addHeader
Request Body Schema
{
schedule (Optional): {
doNotRunUntil: OffsetDateTime (Optional)
doNotRunAfter: OffsetDateTime (Optional)
startWindow: Duration (Optional)
recurrenceInterval: Duration (Optional)
}
jobSpecification (Optional): {
priority: Integer (Optional)
allowTaskPreemption: Boolean (Optional)
maxParallelTasks: Integer (Optional)
displayName: String (Optional)
usesTaskDependencies: Boolean (Optional)
onAllTasksComplete: String(noaction/terminatejob) (Optional)
onTaskFailure: String(noaction/performexitoptionsjobaction) (Optional)
networkConfiguration (Optional): {
subnetId: String (Required)
skipWithdrawFromVNet: Boolean (Optional)
}
constraints (Optional): {
maxWallClockTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
jobManagerTask (Optional): {
id: String (Required)
displayName: String (Optional)
commandLine: String (Required)
containerSettings (Optional): {
containerRunOptions: String (Optional)
imageName: String (Required)
registry (Optional): {
username: String (Optional)
password: String (Optional)
registryServer: String (Optional)
identityReference (Optional): {
resourceId: String (Optional)
}
}
workingDirectory: String(taskWorkingDirectory/containerImageDefault) (Optional)
containerHostBatchBindMounts (Optional): [
(Optional){
source: String(Shared/Startup/VfsMounts/Task/JobPrep/Applications) (Optional)
isReadOnly: Boolean (Optional)
}
]
}
resourceFiles (Optional): [
(Optional){
autoStorageContainerName: String (Optional)
storageContainerUrl: String (Optional)
httpUrl: String (Optional)
blobPrefix: String (Optional)
filePath: String (Optional)
fileMode: String (Optional)
identityReference (Optional): (recursive schema, see identityReference above)
}
]
outputFiles (Optional): [
(Optional){
filePattern: String (Required)
destination (Required): {
container (Optional): {
path: String (Optional)
containerUrl: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
uploadHeaders (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
}
}
uploadOptions (Required): {
uploadCondition: String(tasksuccess/taskfailure/taskcompletion) (Required)
}
}
]
environmentSettings (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
constraints (Optional): {
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
requiredSlots: Integer (Optional)
killJobOnCompletion: Boolean (Optional)
userIdentity (Optional): {
username: String (Optional)
autoUser (Optional): {
scope: String(task/pool) (Optional)
elevationLevel: String(nonadmin/admin) (Optional)
}
}
runExclusive: Boolean (Optional)
applicationPackageReferences (Optional): [
(Optional){
applicationId: String (Required)
version: String (Optional)
}
]
authenticationTokenSettings (Optional): {
access (Optional): [
String(job) (Optional)
]
}
allowLowPriorityNode: Boolean (Optional)
}
jobPreparationTask (Optional): {
id: String (Optional)
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
constraints (Optional): (recursive schema, see constraints above)
waitForSuccess: Boolean (Optional)
userIdentity (Optional): (recursive schema, see userIdentity above)
rerunOnNodeRebootAfterSuccess: Boolean (Optional)
}
jobReleaseTask (Optional): {
id: String (Optional)
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
maxWallClockTime: Duration (Optional)
retentionTime: Duration (Optional)
userIdentity (Optional): (recursive schema, see userIdentity above)
}
commonEnvironmentSettings (Optional): [
(recursive schema, see above)
]
poolInfo (Required): {
poolId: String (Optional)
autoPoolSpecification (Optional): {
autoPoolIdPrefix: String (Optional)
poolLifetimeOption: String(jobschedule/job) (Required)
keepAlive: Boolean (Optional)
pool (Optional): {
displayName: String (Optional)
vmSize: String (Required)
virtualMachineConfiguration (Optional): {
imageReference (Required): {
publisher: String (Optional)
offer: String (Optional)
sku: String (Optional)
version: String (Optional)
virtualMachineImageId: String (Optional)
exactVersion: String (Optional)
sharedGalleryImageId: String (Optional)
communityGalleryImageId: String (Optional)
}
nodeAgentSKUId: String (Required)
windowsConfiguration (Optional): {
enableAutomaticUpdates: Boolean (Optional)
}
dataDisks (Optional): [
(Optional){
lun: int (Required)
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: int (Required)
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
}
]
licenseType: String (Optional)
containerConfiguration (Optional): {
type: String(dockerCompatible/criCompatible) (Required)
containerImageNames (Optional): [
String (Optional)
]
containerRegistries (Optional): [
(recursive schema, see above)
]
}
diskEncryptionConfiguration (Optional): {
targets (Optional): [
String(osdisk/temporarydisk) (Optional)
]
}
nodePlacementConfiguration (Optional): {
policy: String(regional/zonal) (Optional)
}
extensions (Optional): [
(Optional){
name: String (Required)
publisher: String (Required)
type: String (Required)
typeHandlerVersion: String (Optional)
autoUpgradeMinorVersion: Boolean (Optional)
enableAutomaticUpgrade: Boolean (Optional)
settings (Optional): {
String: String (Required)
}
protectedSettings (Optional): {
String: String (Required)
}
provisionAfterExtensions (Optional): [
String (Optional)
]
}
]
osDisk (Optional): {
ephemeralOSDiskSettings (Optional): {
placement: String(cachedisk) (Optional)
}
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: Integer (Optional)
managedDisk (Optional): {
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
securityProfile (Optional): {
securityEncryptionType: String(NonPersistedTPM/VMGuestStateOnly) (Optional)
}
}
writeAcceleratorEnabled: Boolean (Optional)
}
securityProfile (Optional): {
encryptionAtHost: Boolean (Optional)
securityType: String(trustedLaunch/confidentialVM) (Optional)
uefiSettings (Optional): {
secureBootEnabled: Boolean (Optional)
vTpmEnabled: Boolean (Optional)
}
}
serviceArtifactReference (Optional): {
id: String (Required)
}
}
taskSlotsPerNode: Integer (Optional)
taskSchedulingPolicy (Optional): {
nodeFillType: String(spread/pack) (Required)
}
resizeTimeout: Duration (Optional)
resourceTags: String (Optional)
targetDedicatedNodes: Integer (Optional)
targetLowPriorityNodes: Integer (Optional)
enableAutoScale: Boolean (Optional)
autoScaleFormula: String (Optional)
autoScaleEvaluationInterval: Duration (Optional)
enableInterNodeCommunication: Boolean (Optional)
networkConfiguration (Optional): {
subnetId: String (Optional)
dynamicVNetAssignmentScope: String(none/job) (Optional)
endpointConfiguration (Optional): {
inboundNATPools (Required): [
(Required){
name: String (Required)
protocol: String(tcp/udp) (Required)
backendPort: int (Required)
frontendPortRangeStart: int (Required)
frontendPortRangeEnd: int (Required)
networkSecurityGroupRules (Optional): [
(Optional){
priority: int (Required)
access: String(allow/deny) (Required)
sourceAddressPrefix: String (Required)
sourcePortRanges (Optional): [
String (Optional)
]
}
]
}
]
}
publicIPAddressConfiguration (Optional): {
provision: String(batchmanaged/usermanaged/nopublicipaddresses) (Optional)
ipAddressIds (Optional): [
String (Optional)
]
}
enableAcceleratedNetworking: Boolean (Optional)
}
startTask (Optional): {
commandLine: String (Required)
containerSettings (Optional): (recursive schema, see containerSettings above)
resourceFiles (Optional): [
(recursive schema, see above)
]
environmentSettings (Optional): [
(recursive schema, see above)
]
userIdentity (Optional): (recursive schema, see userIdentity above)
maxTaskRetryCount: Integer (Optional)
waitForSuccess: Boolean (Optional)
}
certificateReferences (Optional): [
(Optional){
thumbprint: String (Required)
thumbprintAlgorithm: String (Required)
storeLocation: String(currentuser/localmachine) (Optional)
storeName: String (Optional)
visibility (Optional): [
String(starttask/task/remoteuser) (Optional)
]
}
]
applicationPackageReferences (Optional): [
(recursive schema, see above)
]
userAccounts (Optional): [
(Optional){
name: String (Required)
password: String (Required)
elevationLevel: String(nonadmin/admin) (Optional)
linuxUserConfiguration (Optional): {
uid: Integer (Optional)
gid: Integer (Optional)
sshPrivateKey: String (Optional)
}
windowsUserConfiguration (Optional): {
loginMode: String(batch/interactive) (Optional)
}
}
]
metadata (Optional): [
(Optional){
name: String (Required)
value: String (Required)
}
]
mountConfiguration (Optional): [
(Optional){
azureBlobFileSystemConfiguration (Optional): {
accountName: String (Required)
containerName: String (Required)
accountKey: String (Optional)
sasKey: String (Optional)
blobfuseOptions: String (Optional)
relativeMountPath: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
}
nfsMountConfiguration (Optional): {
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
cifsMountConfiguration (Optional): {
username: String (Required)
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
password: String (Required)
}
azureFileShareConfiguration (Optional): {
accountName: String (Required)
accountKey: String (Required)
azureFileUrl: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
}
]
targetNodeCommunicationMode: String(default/classic/simplified) (Optional)
upgradePolicy (Optional): {
mode: String(automatic/manual/rolling) (Required)
automaticOSUpgradePolicy (Optional): {
disableAutomaticRollback: Boolean (Optional)
enableAutomaticOSUpgrade: Boolean (Optional)
useRollingUpgradePolicy: Boolean (Optional)
osRollingUpgradeDeferral: Boolean (Optional)
}
rollingUpgradePolicy (Optional): {
enableCrossZoneUpgrade: Boolean (Optional)
maxBatchInstancePercent: Integer (Optional)
maxUnhealthyInstancePercent: Integer (Optional)
maxUnhealthyUpgradedInstancePercent: Integer (Optional)
pauseTimeBetweenBatches: Duration (Optional)
prioritizeUnhealthyInstances: Boolean (Optional)
rollbackFailedInstancesOnPolicyBreach: Boolean (Optional)
}
}
}
}
}
metadata (Optional): [
(recursive schema, see above)
]
}
metadata (Optional): [
(recursive schema, see above)
]
}
Parameters:
Returns:
updateJobWithResponse
public Response<Void> updateJobWithResponse(String jobId, BinaryData job, RequestOptions requestOptions)
Updates the properties of the specified Job. This replaces only the Job properties specified in the request. For example, if the Job has constraints, and a request does not specify the constraints element, then the Job keeps the existing constraints.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Header Parameters
| ------------------- | -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| If-Modified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. |
| If-Unmodified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. |
| If-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. |
| If-None-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. |
You can add these to a request with RequestOptions#addHeader
Request Body Schema
{
priority: Integer (Optional)
allowTaskPreemption: Boolean (Optional)
maxParallelTasks: Integer (Optional)
constraints (Optional): {
maxWallClockTime: Duration (Optional)
maxTaskRetryCount: Integer (Optional)
}
poolInfo (Optional): {
poolId: String (Optional)
autoPoolSpecification (Optional): {
autoPoolIdPrefix: String (Optional)
poolLifetimeOption: String(jobschedule/job) (Required)
keepAlive: Boolean (Optional)
pool (Optional): {
displayName: String (Optional)
vmSize: String (Required)
virtualMachineConfiguration (Optional): {
imageReference (Required): {
publisher: String (Optional)
offer: String (Optional)
sku: String (Optional)
version: String (Optional)
virtualMachineImageId: String (Optional)
exactVersion: String (Optional)
sharedGalleryImageId: String (Optional)
communityGalleryImageId: String (Optional)
}
nodeAgentSKUId: String (Required)
windowsConfiguration (Optional): {
enableAutomaticUpdates: Boolean (Optional)
}
dataDisks (Optional): [
(Optional){
lun: int (Required)
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: int (Required)
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
}
]
licenseType: String (Optional)
containerConfiguration (Optional): {
type: String(dockerCompatible/criCompatible) (Required)
containerImageNames (Optional): [
String (Optional)
]
containerRegistries (Optional): [
(Optional){
username: String (Optional)
password: String (Optional)
registryServer: String (Optional)
identityReference (Optional): {
resourceId: String (Optional)
}
}
]
}
diskEncryptionConfiguration (Optional): {
targets (Optional): [
String(osdisk/temporarydisk) (Optional)
]
}
nodePlacementConfiguration (Optional): {
policy: String(regional/zonal) (Optional)
}
extensions (Optional): [
(Optional){
name: String (Required)
publisher: String (Required)
type: String (Required)
typeHandlerVersion: String (Optional)
autoUpgradeMinorVersion: Boolean (Optional)
enableAutomaticUpgrade: Boolean (Optional)
settings (Optional): {
String: String (Required)
}
protectedSettings (Optional): {
String: String (Required)
}
provisionAfterExtensions (Optional): [
String (Optional)
]
}
]
osDisk (Optional): {
ephemeralOSDiskSettings (Optional): {
placement: String(cachedisk) (Optional)
}
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: Integer (Optional)
managedDisk (Optional): {
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
securityProfile (Optional): {
securityEncryptionType: String(NonPersistedTPM/VMGuestStateOnly) (Optional)
}
}
writeAcceleratorEnabled: Boolean (Optional)
}
securityProfile (Optional): {
encryptionAtHost: Boolean (Optional)
securityType: String(trustedLaunch/confidentialVM) (Optional)
uefiSettings (Optional): {
secureBootEnabled: Boolean (Optional)
vTpmEnabled: Boolean (Optional)
}
}
serviceArtifactReference (Optional): {
id: String (Required)
}
}
taskSlotsPerNode: Integer (Optional)
taskSchedulingPolicy (Optional): {
nodeFillType: String(spread/pack) (Required)
}
resizeTimeout: Duration (Optional)
resourceTags: String (Optional)
targetDedicatedNodes: Integer (Optional)
targetLowPriorityNodes: Integer (Optional)
enableAutoScale: Boolean (Optional)
autoScaleFormula: String (Optional)
autoScaleEvaluationInterval: Duration (Optional)
enableInterNodeCommunication: Boolean (Optional)
networkConfiguration (Optional): {
subnetId: String (Optional)
dynamicVNetAssignmentScope: String(none/job) (Optional)
endpointConfiguration (Optional): {
inboundNATPools (Required): [
(Required){
name: String (Required)
protocol: String(tcp/udp) (Required)
backendPort: int (Required)
frontendPortRangeStart: int (Required)
frontendPortRangeEnd: int (Required)
networkSecurityGroupRules (Optional): [
(Optional){
priority: int (Required)
access: String(allow/deny) (Required)
sourceAddressPrefix: String (Required)
sourcePortRanges (Optional): [
String (Optional)
]
}
]
}
]
}
publicIPAddressConfiguration (Optional): {
provision: String(batchmanaged/usermanaged/nopublicipaddresses) (Optional)
ipAddressIds (Optional): [
String (Optional)
]
}
enableAcceleratedNetworking: Boolean (Optional)
}
startTask (Optional): {
commandLine: String (Required)
containerSettings (Optional): {
containerRunOptions: String (Optional)
imageName: String (Required)
registry (Optional): (recursive schema, see registry above)
workingDirectory: String(taskWorkingDirectory/containerImageDefault) (Optional)
containerHostBatchBindMounts (Optional): [
(Optional){
source: String(Shared/Startup/VfsMounts/Task/JobPrep/Applications) (Optional)
isReadOnly: Boolean (Optional)
}
]
}
resourceFiles (Optional): [
(Optional){
autoStorageContainerName: String (Optional)
storageContainerUrl: String (Optional)
httpUrl: String (Optional)
blobPrefix: String (Optional)
filePath: String (Optional)
fileMode: String (Optional)
identityReference (Optional): (recursive schema, see identityReference above)
}
]
environmentSettings (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
userIdentity (Optional): {
username: String (Optional)
autoUser (Optional): {
scope: String(task/pool) (Optional)
elevationLevel: String(nonadmin/admin) (Optional)
}
}
maxTaskRetryCount: Integer (Optional)
waitForSuccess: Boolean (Optional)
}
certificateReferences (Optional): [
(Optional){
thumbprint: String (Required)
thumbprintAlgorithm: String (Required)
storeLocation: String(currentuser/localmachine) (Optional)
storeName: String (Optional)
visibility (Optional): [
String(starttask/task/remoteuser) (Optional)
]
}
]
applicationPackageReferences (Optional): [
(Optional){
applicationId: String (Required)
version: String (Optional)
}
]
userAccounts (Optional): [
(Optional){
name: String (Required)
password: String (Required)
elevationLevel: String(nonadmin/admin) (Optional)
linuxUserConfiguration (Optional): {
uid: Integer (Optional)
gid: Integer (Optional)
sshPrivateKey: String (Optional)
}
windowsUserConfiguration (Optional): {
loginMode: String(batch/interactive) (Optional)
}
}
]
metadata (Optional): [
(Optional){
name: String (Required)
value: String (Required)
}
]
mountConfiguration (Optional): [
(Optional){
azureBlobFileSystemConfiguration (Optional): {
accountName: String (Required)
containerName: String (Required)
accountKey: String (Optional)
sasKey: String (Optional)
blobfuseOptions: String (Optional)
relativeMountPath: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
}
nfsMountConfiguration (Optional): {
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
cifsMountConfiguration (Optional): {
username: String (Required)
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
password: String (Required)
}
azureFileShareConfiguration (Optional): {
accountName: String (Required)
accountKey: String (Required)
azureFileUrl: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
}
]
targetNodeCommunicationMode: String(default/classic/simplified) (Optional)
upgradePolicy (Optional): {
mode: String(automatic/manual/rolling) (Required)
automaticOSUpgradePolicy (Optional): {
disableAutomaticRollback: Boolean (Optional)
enableAutomaticOSUpgrade: Boolean (Optional)
useRollingUpgradePolicy: Boolean (Optional)
osRollingUpgradeDeferral: Boolean (Optional)
}
rollingUpgradePolicy (Optional): {
enableCrossZoneUpgrade: Boolean (Optional)
maxBatchInstancePercent: Integer (Optional)
maxUnhealthyInstancePercent: Integer (Optional)
maxUnhealthyUpgradedInstancePercent: Integer (Optional)
pauseTimeBetweenBatches: Duration (Optional)
prioritizeUnhealthyInstances: Boolean (Optional)
rollbackFailedInstancesOnPolicyBreach: Boolean (Optional)
}
}
}
}
}
onAllTasksComplete: String(noaction/terminatejob) (Optional)
metadata (Optional): [
(recursive schema, see above)
]
networkConfiguration (Optional): {
subnetId: String (Required)
skipWithdrawFromVNet: Boolean (Optional)
}
}
Parameters:
Returns:
updatePool
public void updatePool(String poolId, BatchPoolUpdateParameters pool)
Updates the properties of the specified Pool. This only replaces the Pool properties specified in the request. For example, if the Pool has a StartTask associated with it, and a request does not specify a StartTask element, then the Pool keeps the existing StartTask.
Parameters:
updatePool
public void updatePool(String poolId, BatchPoolUpdateParameters pool, BatchPoolUpdateOptions options, RequestConditions requestConditions)
Updates the properties of the specified Pool. This only replaces the Pool properties specified in the request. For example, if the Pool has a StartTask associated with it, and a request does not specify a StartTask element, then the Pool keeps the existing StartTask.
Parameters:
updatePoolWithResponse
public Response<Void> updatePoolWithResponse(String poolId, BinaryData pool, RequestOptions requestOptions)
Updates the properties of the specified Pool. This only replaces the Pool properties specified in the request. For example, if the Pool has a StartTask associated with it, and a request does not specify a StartTask element, then the Pool keeps the existing StartTask.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Header Parameters
| ------------------- | -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| If-Modified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. |
| If-Unmodified-Since | OffsetDateTime | No | A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. |
| If-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. |
| If-None-Match | String | No | An ETag value associated with the version of the resource known to the client. The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. |
You can add these to a request with RequestOptions#addHeader
Request Body Schema
{
displayName: String (Optional)
vmSize: String (Optional)
enableInterNodeCommunication: Boolean (Optional)
startTask (Optional): {
commandLine: String (Required)
containerSettings (Optional): {
containerRunOptions: String (Optional)
imageName: String (Required)
registry (Optional): {
username: String (Optional)
password: String (Optional)
registryServer: String (Optional)
identityReference (Optional): {
resourceId: String (Optional)
}
}
workingDirectory: String(taskWorkingDirectory/containerImageDefault) (Optional)
containerHostBatchBindMounts (Optional): [
(Optional){
source: String(Shared/Startup/VfsMounts/Task/JobPrep/Applications) (Optional)
isReadOnly: Boolean (Optional)
}
]
}
resourceFiles (Optional): [
(Optional){
autoStorageContainerName: String (Optional)
storageContainerUrl: String (Optional)
httpUrl: String (Optional)
blobPrefix: String (Optional)
filePath: String (Optional)
fileMode: String (Optional)
identityReference (Optional): (recursive schema, see identityReference above)
}
]
environmentSettings (Optional): [
(Optional){
name: String (Required)
value: String (Optional)
}
]
userIdentity (Optional): {
username: String (Optional)
autoUser (Optional): {
scope: String(task/pool) (Optional)
elevationLevel: String(nonadmin/admin) (Optional)
}
}
maxTaskRetryCount: Integer (Optional)
waitForSuccess: Boolean (Optional)
}
certificateReferences (Optional): [
(Optional){
thumbprint: String (Required)
thumbprintAlgorithm: String (Required)
storeLocation: String(currentuser/localmachine) (Optional)
storeName: String (Optional)
visibility (Optional): [
String(starttask/task/remoteuser) (Optional)
]
}
]
applicationPackageReferences (Optional): [
(Optional){
applicationId: String (Required)
version: String (Optional)
}
]
metadata (Optional): [
(Optional){
name: String (Required)
value: String (Required)
}
]
virtualMachineConfiguration (Optional): {
imageReference (Required): {
publisher: String (Optional)
offer: String (Optional)
sku: String (Optional)
version: String (Optional)
virtualMachineImageId: String (Optional)
exactVersion: String (Optional)
sharedGalleryImageId: String (Optional)
communityGalleryImageId: String (Optional)
}
nodeAgentSKUId: String (Required)
windowsConfiguration (Optional): {
enableAutomaticUpdates: Boolean (Optional)
}
dataDisks (Optional): [
(Optional){
lun: int (Required)
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: int (Required)
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
}
]
licenseType: String (Optional)
containerConfiguration (Optional): {
type: String(dockerCompatible/criCompatible) (Required)
containerImageNames (Optional): [
String (Optional)
]
containerRegistries (Optional): [
(recursive schema, see above)
]
}
diskEncryptionConfiguration (Optional): {
targets (Optional): [
String(osdisk/temporarydisk) (Optional)
]
}
nodePlacementConfiguration (Optional): {
policy: String(regional/zonal) (Optional)
}
extensions (Optional): [
(Optional){
name: String (Required)
publisher: String (Required)
type: String (Required)
typeHandlerVersion: String (Optional)
autoUpgradeMinorVersion: Boolean (Optional)
enableAutomaticUpgrade: Boolean (Optional)
settings (Optional): {
String: String (Required)
}
protectedSettings (Optional): {
String: String (Required)
}
provisionAfterExtensions (Optional): [
String (Optional)
]
}
]
osDisk (Optional): {
ephemeralOSDiskSettings (Optional): {
placement: String(cachedisk) (Optional)
}
caching: String(none/readonly/readwrite) (Optional)
diskSizeGB: Integer (Optional)
managedDisk (Optional): {
storageAccountType: String(standard_lrs/premium_lrs/standardssd_lrs) (Optional)
securityProfile (Optional): {
securityEncryptionType: String(NonPersistedTPM/VMGuestStateOnly) (Optional)
}
}
writeAcceleratorEnabled: Boolean (Optional)
}
securityProfile (Optional): {
encryptionAtHost: Boolean (Optional)
securityType: String(trustedLaunch/confidentialVM) (Optional)
uefiSettings (Optional): {
secureBootEnabled: Boolean (Optional)
vTpmEnabled: Boolean (Optional)
}
}
serviceArtifactReference (Optional): {
id: String (Required)
}
}
targetNodeCommunicationMode: String(default/classic/simplified) (Optional)
taskSlotsPerNode: Integer (Optional)
taskSchedulingPolicy (Optional): {
nodeFillType: String(spread/pack) (Required)
}
networkConfiguration (Optional): {
subnetId: String (Optional)
dynamicVNetAssignmentScope: String(none/job) (Optional)
endpointConfiguration (Optional): {
inboundNATPools (Required): [
(Required){
name: String (Required)
protocol: String(tcp/udp) (Required)
backendPort: int (Required)
frontendPortRangeStart: int (Required)
frontendPortRangeEnd: int (Required)
networkSecurityGroupRules (Optional): [
(Optional){
priority: int (Required)
access: String(allow/deny) (Required)
sourceAddressPrefix: String (Required)
sourcePortRanges (Optional): [
String (Optional)
]
}
]
}
]
}
publicIPAddressConfiguration (Optional): {
provision: String(batchmanaged/usermanaged/nopublicipaddresses) (Optional)
ipAddressIds (Optional): [
String (Optional)
]
}
enableAcceleratedNetworking: Boolean (Optional)
}
resourceTags (Optional): {
String: String (Required)
}
userAccounts (Optional): [
(Optional){
name: String (Required)
password: String (Required)
elevationLevel: String(nonadmin/admin) (Optional)
linuxUserConfiguration (Optional): {
uid: Integer (Optional)
gid: Integer (Optional)
sshPrivateKey: String (Optional)
}
windowsUserConfiguration (Optional): {
loginMode: String(batch/interactive) (Optional)
}
}
]
mountConfiguration (Optional): [
(Optional){
azureBlobFileSystemConfiguration (Optional): {
accountName: String (Required)
containerName: String (Required)
accountKey: String (Optional)
sasKey: String (Optional)
blobfuseOptions: String (Optional)
relativeMountPath: String (Required)
identityReference (Optional): (recursive schema, see identityReference above)
}
nfsMountConfiguration (Optional): {
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
cifsMountConfiguration (Optional): {
username: String (Required)
source: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
password: String (Required)
}
azureFileShareConfiguration (Optional): {
accountName: String (Required)
accountKey: String (Required)
azureFileUrl: String (Required)
relativeMountPath: String (Required)
mountOptions: String (Optional)
}
}
]
upgradePolicy (Optional): {
mode: String(automatic/manual/rolling) (Required)
automaticOSUpgradePolicy (Optional): {
disableAutomaticRollback: Boolean (Optional)
enableAutomaticOSUpgrade: Boolean (Optional)
useRollingUpgradePolicy: Boolean (Optional)
osRollingUpgradeDeferral: Boolean (Optional)
}
rollingUpgradePolicy (Optional): {
enableCrossZoneUpgrade: Boolean (Optional)
maxBatchInstancePercent: Integer (Optional)
maxUnhealthyInstancePercent: Integer (Optional)
maxUnhealthyUpgradedInstancePercent: Integer (Optional)
pauseTimeBetweenBatches: Duration (Optional)
prioritizeUnhealthyInstances: Boolean (Optional)
rollbackFailedInstancesOnPolicyBreach: Boolean (Optional)
}
}
}
Parameters:
Returns:
uploadNodeLogs
public UploadBatchServiceLogsResult uploadNodeLogs(String poolId, String nodeId, UploadBatchServiceLogsParameters parameters)
Upload Azure Batch service log files from the specified Compute Node to Azure Blob Storage. This is for gathering Azure Batch service log files in an automated fashion from Compute Nodes if you are experiencing an error and wish to escalate to Azure support. The Azure Batch service log files should be shared with Azure support to aid in debugging issues with the Batch service.
Parameters:
Returns:
uploadNodeLogs
public UploadBatchServiceLogsResult uploadNodeLogs(String poolId, String nodeId, UploadBatchServiceLogsParameters parameters, BatchNodeLogsUploadOptions options)
Upload Azure Batch service log files from the specified Compute Node to Azure Blob Storage. This is for gathering Azure Batch service log files in an automated fashion from Compute Nodes if you are experiencing an error and wish to escalate to Azure support. The Azure Batch service log files should be shared with Azure support to aid in debugging issues with the Batch service.
Parameters:
Returns:
uploadNodeLogsWithResponse
public Response<BinaryData> uploadNodeLogsWithResponse(String poolId, String nodeId, BinaryData parameters, RequestOptions requestOptions)
Upload Azure Batch service log files from the specified Compute Node to Azure Blob Storage. This is for gathering Azure Batch service log files in an automated fashion from Compute Nodes if you are experiencing an error and wish to escalate to Azure support. The Azure Batch service log files should be shared with Azure support to aid in debugging issues with the Batch service.
Query Parameters
| ------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| timeOut | Duration | No | The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". |
You can add these to a request with RequestOptions#addQueryParam
Request Body Schema
{
containerUrl: String (Required)
startTime: OffsetDateTime (Required)
endTime: OffsetDateTime (Optional)
identityReference (Optional): {
resourceId: String (Optional)
}
}
Response Body Schema
{
virtualDirectoryName: String (Required)
numberOfFilesUploaded: int (Required)
}
Parameters:
Returns: