jobs
Creates, updates, deletes, gets or lists a jobs resource.
Overview
| Name | jobs |
| Type | Resource |
| Id | azure.batch_dataplane.jobs |
Fields
The following fields are returned by SELECT queries:
- get_job
- list_jobs
| Name | Datatype | Description |
|---|---|---|
id | string | A string that uniquely identifies the Job within the Account. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case). Required. |
allowTaskPreemption | boolean | Whether Tasks in this job can be preempted by other high priority jobs. (This property is not available by default. Please contact support for more information) If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API. |
commonEnvironmentSettings | array | The list of common environment variable settings. These environment variables are set for all Tasks in the Job (including the Job Manager, Job Preparation and Job Release Tasks). Individual Tasks can override an environment setting specified here by specifying the same setting name with a different value. |
constraints | object | The execution constraints for the Job. |
creationTime | string (date-time) | The creation time of the Job. Required. |
displayName | string | The display name for the Job. |
eTag | string | The ETag of the Job. This is an opaque string. You can use it to detect whether the Job has changed between requests. In particular, you can be pass the ETag when updating a Job to specify that your changes should take effect only if nobody else has modified the Job in the meantime. Required. |
executionInfo | object | The execution information for the Job. |
jobManagerTask | object | Details of a Job Manager Task to be launched when the Job is started. |
jobPreparationTask | object | The Job Preparation Task. The Job Preparation Task is a special Task run on each Compute Node before any other Task of the Job. |
jobReleaseTask | object | The Job Release Task. The Job Release Task is a special Task run at the end of the Job on each Compute Node that has run any other Task of the Job. |
lastModified | string (date-time) | The last modified time of the Job. This is the last time at which the Job level data, such as the Job state or priority, changed. It does not factor in task-level changes such as adding new Tasks or Tasks changing state. Required. |
maxParallelTasks | integer | The maximum number of tasks that can be executed in parallel for the job. (This property is not available by default. Please contact support for more information) The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API. |
metadata | array | A list of name-value pairs associated with the Job as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. |
networkConfiguration | object | (This property is not available by default. Please contact support for more information) The network configuration for the Job. |
onAllTasksComplete | string | The action the Batch service should take when all Tasks in the Job are in the completed state. The default is noaction. Known values are: "noaction" and "terminatejob". (noaction, terminatejob) |
onTaskFailure | string | The action the Batch service should take when any Task in the Job fails. A Task is considered to have failed if has a failureInfo. A failureInfo is set if the Task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the Task, for example due to a resource file download error. The default is noaction. Known values are: "noaction" and "performexitoptionsjobaction". (noaction, performexitoptionsjobaction) |
poolInfo | object | The Pool settings associated with the Job. Required. |
previousState | string | The previous state of the Job. This property is not set if the Job is in its initial Active state. Known values are: "active", "disabling", "disabled", "enabling", "terminating", "completed", and "deleting". (active, disabling, disabled, enabling, terminating, completed, deleting) |
previousStateTransitionTime | string (date-time) | The time at which the Job entered its previous state. This property is not set if the Job is in its initial Active state. |
priority | integer | The priority of the Job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0. |
state | string | The current state of the Job. Required. Known values are: "active", "disabling", "disabled", "enabling", "terminating", "completed", and "deleting". (active, disabling, disabled, enabling, terminating, completed, deleting) |
stateTransitionTime | string (date-time) | The time at which the Job entered its current state. Required. |
stats | object | Resource usage statistics for the entire lifetime of the Job. This property is populated only if the BatchJob was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. |
url | string | The URL of the Job. Required. |
usesTaskDependencies | boolean | Whether Tasks in the Job can define dependencies on each other. The default is false. |
| Name | Datatype | Description |
|---|---|---|
id | string | A string that uniquely identifies the Job within the Account. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case). Required. |
allowTaskPreemption | boolean | Whether Tasks in this job can be preempted by other high priority jobs. (This property is not available by default. Please contact support for more information) If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API. |
commonEnvironmentSettings | array | The list of common environment variable settings. These environment variables are set for all Tasks in the Job (including the Job Manager, Job Preparation and Job Release Tasks). Individual Tasks can override an environment setting specified here by specifying the same setting name with a different value. |
constraints | object | The execution constraints for the Job. |
creationTime | string (date-time) | The creation time of the Job. Required. |
displayName | string | The display name for the Job. |
eTag | string | The ETag of the Job. This is an opaque string. You can use it to detect whether the Job has changed between requests. In particular, you can be pass the ETag when updating a Job to specify that your changes should take effect only if nobody else has modified the Job in the meantime. Required. |
executionInfo | object | The execution information for the Job. |
jobManagerTask | object | Details of a Job Manager Task to be launched when the Job is started. |
jobPreparationTask | object | The Job Preparation Task. The Job Preparation Task is a special Task run on each Compute Node before any other Task of the Job. |
jobReleaseTask | object | The Job Release Task. The Job Release Task is a special Task run at the end of the Job on each Compute Node that has run any other Task of the Job. |
lastModified | string (date-time) | The last modified time of the Job. This is the last time at which the Job level data, such as the Job state or priority, changed. It does not factor in task-level changes such as adding new Tasks or Tasks changing state. Required. |
maxParallelTasks | integer | The maximum number of tasks that can be executed in parallel for the job. (This property is not available by default. Please contact support for more information) The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API. |
metadata | array | A list of name-value pairs associated with the Job as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. |
networkConfiguration | object | (This property is not available by default. Please contact support for more information) The network configuration for the Job. |
onAllTasksComplete | string | The action the Batch service should take when all Tasks in the Job are in the completed state. The default is noaction. Known values are: "noaction" and "terminatejob". (noaction, terminatejob) |
onTaskFailure | string | The action the Batch service should take when any Task in the Job fails. A Task is considered to have failed if has a failureInfo. A failureInfo is set if the Task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the Task, for example due to a resource file download error. The default is noaction. Known values are: "noaction" and "performexitoptionsjobaction". (noaction, performexitoptionsjobaction) |
poolInfo | object | The Pool settings associated with the Job. Required. |
previousState | string | The previous state of the Job. This property is not set if the Job is in its initial Active state. Known values are: "active", "disabling", "disabled", "enabling", "terminating", "completed", and "deleting". (active, disabling, disabled, enabling, terminating, completed, deleting) |
previousStateTransitionTime | string (date-time) | The time at which the Job entered its previous state. This property is not set if the Job is in its initial Active state. |
priority | integer | The priority of the Job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0. |
state | string | The current state of the Job. Required. Known values are: "active", "disabling", "disabled", "enabling", "terminating", "completed", and "deleting". (active, disabling, disabled, enabling, terminating, completed, deleting) |
stateTransitionTime | string (date-time) | The time at which the Job entered its current state. Required. |
stats | object | Resource usage statistics for the entire lifetime of the Job. This property is populated only if the BatchJob was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. |
url | string | The URL of the Job. Required. |
usesTaskDependencies | boolean | Whether Tasks in the Job can define dependencies on each other. The default is false. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_job | select | job_id, endpoint | timeOut, ocp-date, If-Modified-Since, If-Unmodified-Since, $select, $expand | Gets information about the specified Job. Gets information about the specified Job. |
list_jobs | select | endpoint | timeOut, ocp-date, maxresults, $filter, $select, $expand | Lists all of the Jobs in the specified Account. Lists all of the Jobs in the specified Account. |
create_job | insert | endpoint, id, poolInfo | timeOut, ocp-date | 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. |
update_job | update | job_id, endpoint | timeOut, ocp-date, If-Modified-Since, If-Unmodified-Since | 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
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
endpoint | string | The service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: ) |
job_id | string | The ID of the Job whose properties you want to update. Required. |
$expand | array | An OData $expand clause. Default value is None. |
$filter | string | 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 _. Default value is None. |
$select | array | An OData $select clause. Default value is None. |
If-Modified-Since | string | 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. Default value is None. |
If-Unmodified-Since | string | 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. Default value is None. |
maxresults | integer | The maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None. |
ocp-date | string | The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. |
timeOut | integer | 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.". Default value is None. |
SELECT examples
- get_job
- list_jobs
Gets information about the specified Job. Gets information about the specified Job.
SELECT
id,
allowTaskPreemption,
commonEnvironmentSettings,
constraints,
creationTime,
displayName,
eTag,
executionInfo,
jobManagerTask,
jobPreparationTask,
jobReleaseTask,
lastModified,
maxParallelTasks,
metadata,
networkConfiguration,
onAllTasksComplete,
onTaskFailure,
poolInfo,
previousState,
previousStateTransitionTime,
priority,
state,
stateTransitionTime,
stats,
url,
usesTaskDependencies
FROM azure.batch_dataplane.jobs
WHERE job_id = '{{ job_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND timeOut = '{{ timeOut }}'
AND ocp-date = '{{ ocp-date }}'
AND If-Modified-Since = '{{ If-Modified-Since }}'
AND If-Unmodified-Since = '{{ If-Unmodified-Since }}'
AND $select = '{{ $select }}'
AND $expand = '{{ $expand }}'
;
Lists all of the Jobs in the specified Account. Lists all of the Jobs in the specified Account.
SELECT
id,
allowTaskPreemption,
commonEnvironmentSettings,
constraints,
creationTime,
displayName,
eTag,
executionInfo,
jobManagerTask,
jobPreparationTask,
jobReleaseTask,
lastModified,
maxParallelTasks,
metadata,
networkConfiguration,
onAllTasksComplete,
onTaskFailure,
poolInfo,
previousState,
previousStateTransitionTime,
priority,
state,
stateTransitionTime,
stats,
url,
usesTaskDependencies
FROM azure.batch_dataplane.jobs
WHERE endpoint = '{{ endpoint }}' -- required
AND timeOut = '{{ timeOut }}'
AND ocp-date = '{{ ocp-date }}'
AND maxresults = '{{ maxresults }}'
AND $filter = '{{ $filter }}'
AND $select = '{{ $select }}'
AND $expand = '{{ $expand }}'
;
INSERT examples
- create_job
- Manifest
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.
INSERT INTO azure.batch_dataplane.jobs (
id,
displayName,
usesTaskDependencies,
priority,
allowTaskPreemption,
maxParallelTasks,
constraints,
jobManagerTask,
jobPreparationTask,
jobReleaseTask,
commonEnvironmentSettings,
poolInfo,
onAllTasksComplete,
onTaskFailure,
networkConfiguration,
metadata,
endpoint,
timeOut,
ocp-date
)
SELECT
'{{ id }}' /* required */,
'{{ displayName }}',
{{ usesTaskDependencies }},
{{ priority }},
{{ allowTaskPreemption }},
{{ maxParallelTasks }},
'{{ constraints }}',
'{{ jobManagerTask }}',
'{{ jobPreparationTask }}',
'{{ jobReleaseTask }}',
'{{ commonEnvironmentSettings }}',
'{{ poolInfo }}' /* required */,
'{{ onAllTasksComplete }}',
'{{ onTaskFailure }}',
'{{ networkConfiguration }}',
'{{ metadata }}',
'{{ endpoint }}',
'{{ timeOut }}',
'{{ ocp-date }}'
;
# Description fields are for documentation purposes
- name: jobs
props:
- name: endpoint
value: "{{ endpoint }}"
description: Required parameter for the jobs resource.
- name: id
value: "{{ id }}"
description: |
A string that uniquely identifies the Job within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case). Required.
- name: displayName
value: "{{ displayName }}"
description: |
The display name for the Job. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
- name: usesTaskDependencies
value: {{ usesTaskDependencies }}
description: |
Whether Tasks in the Job can define dependencies on each other. The default is false.
- name: priority
value: {{ priority }}
description: |
The priority of the Job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0.
- name: allowTaskPreemption
value: {{ allowTaskPreemption }}
description: |
Whether Tasks in this job can be preempted by other high priority jobs. (This property is not available by default. Please contact support for more information) If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API.
- name: maxParallelTasks
value: {{ maxParallelTasks }}
description: |
The maximum number of tasks that can be executed in parallel for the job. (This property is not available by default. Please contact support for more information) The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API.
- name: constraints
description: |
The execution constraints for the Job.
value:
maxWallClockTime: "{{ maxWallClockTime }}"
maxTaskRetryCount: {{ maxTaskRetryCount }}
- name: jobManagerTask
description: |
Details of a Job Manager Task to be launched when the Job is started. If the Job does not specify a Job Manager Task, the user must explicitly add Tasks to the Job. If the Job does specify a Job Manager Task, the Batch service creates the Job Manager Task when the Job is created, and will try to schedule the Job Manager Task before scheduling other Tasks in the Job. The Job Manager Task's typical purpose is to control and/or monitor Job execution, for example by deciding what additional Tasks to run, determining when the work is complete, etc. (However, a Job Manager Task is not restricted to these activities - it is a fully-fledged Task in the system and perform whatever actions are required for the Job.) For example, a Job Manager Task might download a file specified as a parameter, analyze the contents of that file and submit additional Tasks based on those contents.
value:
id: "{{ id }}"
displayName: "{{ displayName }}"
commandLine: "{{ commandLine }}"
containerSettings:
containerRunOptions: "{{ containerRunOptions }}"
imageName: "{{ imageName }}"
registry:
username: "{{ username }}"
password: "{{ password }}"
registryServer: "{{ registryServer }}"
identityReference:
resourceId: "{{ resourceId }}"
workingDirectory: "{{ workingDirectory }}"
containerHostBatchBindMounts:
- source: "{{ source }}"
isReadOnly: {{ isReadOnly }}
resourceFiles:
- autoStorageContainerName: "{{ autoStorageContainerName }}"
storageContainerUrl: "{{ storageContainerUrl }}"
httpUrl: "{{ httpUrl }}"
blobPrefix: "{{ blobPrefix }}"
filePath: "{{ filePath }}"
fileMode: "{{ fileMode }}"
identityReference:
resourceId: "{{ resourceId }}"
outputFiles:
- filePattern: "{{ filePattern }}"
destination:
container:
path: "{{ path }}"
containerUrl: "{{ containerUrl }}"
identityReference:
resourceId: "{{ resourceId }}"
uploadHeaders:
- name: "{{ name }}"
value: "{{ value }}"
uploadOptions:
uploadCondition: "{{ uploadCondition }}"
environmentSettings:
- name: "{{ name }}"
value: "{{ value }}"
constraints:
maxWallClockTime: "{{ maxWallClockTime }}"
retentionTime: "{{ retentionTime }}"
maxTaskRetryCount: {{ maxTaskRetryCount }}
requiredSlots: {{ requiredSlots }}
killJobOnCompletion: {{ killJobOnCompletion }}
userIdentity:
username: "{{ username }}"
autoUser:
scope: "{{ scope }}"
elevationLevel: "{{ elevationLevel }}"
runExclusive: {{ runExclusive }}
applicationPackageReferences:
- applicationId: "{{ applicationId }}"
version: "{{ version }}"
allowLowPriorityNode: {{ allowLowPriorityNode }}
- name: jobPreparationTask
description: |
The Job Preparation Task. If a Job has a Job Preparation Task, the Batch service will run the Job Preparation Task on a Node before starting any Tasks of that Job on that Compute Node.
value:
id: "{{ id }}"
commandLine: "{{ commandLine }}"
containerSettings:
containerRunOptions: "{{ containerRunOptions }}"
imageName: "{{ imageName }}"
registry:
username: "{{ username }}"
password: "{{ password }}"
registryServer: "{{ registryServer }}"
identityReference:
resourceId: "{{ resourceId }}"
workingDirectory: "{{ workingDirectory }}"
containerHostBatchBindMounts:
- source: "{{ source }}"
isReadOnly: {{ isReadOnly }}
resourceFiles:
- autoStorageContainerName: "{{ autoStorageContainerName }}"
storageContainerUrl: "{{ storageContainerUrl }}"
httpUrl: "{{ httpUrl }}"
blobPrefix: "{{ blobPrefix }}"
filePath: "{{ filePath }}"
fileMode: "{{ fileMode }}"
identityReference:
resourceId: "{{ resourceId }}"
environmentSettings:
- name: "{{ name }}"
value: "{{ value }}"
constraints:
maxWallClockTime: "{{ maxWallClockTime }}"
retentionTime: "{{ retentionTime }}"
maxTaskRetryCount: {{ maxTaskRetryCount }}
waitForSuccess: {{ waitForSuccess }}
userIdentity:
username: "{{ username }}"
autoUser:
scope: "{{ scope }}"
elevationLevel: "{{ elevationLevel }}"
rerunOnNodeRebootAfterSuccess: {{ rerunOnNodeRebootAfterSuccess }}
- name: jobReleaseTask
description: |
The Job Release Task. A Job Release Task cannot be specified without also specifying a Job Preparation Task for the Job. The Batch service runs the Job Release Task on the Nodes that have run the Job Preparation Task. The primary purpose of the Job Release Task is to undo changes to Compute Nodes made by the Job Preparation Task. Example activities include deleting local files, or shutting down services that were started as part of Job preparation.
value:
id: "{{ id }}"
commandLine: "{{ commandLine }}"
containerSettings:
containerRunOptions: "{{ containerRunOptions }}"
imageName: "{{ imageName }}"
registry:
username: "{{ username }}"
password: "{{ password }}"
registryServer: "{{ registryServer }}"
identityReference:
resourceId: "{{ resourceId }}"
workingDirectory: "{{ workingDirectory }}"
containerHostBatchBindMounts:
- source: "{{ source }}"
isReadOnly: {{ isReadOnly }}
resourceFiles:
- autoStorageContainerName: "{{ autoStorageContainerName }}"
storageContainerUrl: "{{ storageContainerUrl }}"
httpUrl: "{{ httpUrl }}"
blobPrefix: "{{ blobPrefix }}"
filePath: "{{ filePath }}"
fileMode: "{{ fileMode }}"
identityReference:
resourceId: "{{ resourceId }}"
environmentSettings:
- name: "{{ name }}"
value: "{{ value }}"
maxWallClockTime: "{{ maxWallClockTime }}"
retentionTime: "{{ retentionTime }}"
userIdentity:
username: "{{ username }}"
autoUser:
scope: "{{ scope }}"
elevationLevel: "{{ elevationLevel }}"
- name: commonEnvironmentSettings
description: |
The list of common environment variable settings. These environment variables are set for all Tasks in the Job (including the Job Manager, Job Preparation and Job Release Tasks). Individual Tasks can override an environment setting specified here by specifying the same setting name with a different value.
value:
- name: "{{ name }}"
value: "{{ value }}"
- name: poolInfo
description: |
The Pool on which the Batch service runs the Job's Tasks. Required.
value:
poolId: "{{ poolId }}"
autoPoolSpecification:
autoPoolIdPrefix: "{{ autoPoolIdPrefix }}"
poolLifetimeOption: "{{ poolLifetimeOption }}"
keepAlive: {{ keepAlive }}
pool:
displayName: "{{ displayName }}"
vmSize: "{{ vmSize }}"
virtualMachineConfiguration:
imageReference:
publisher: "{{ publisher }}"
offer: "{{ offer }}"
sku: "{{ sku }}"
version: "{{ version }}"
virtualMachineImageId: "{{ virtualMachineImageId }}"
exactVersion: "{{ exactVersion }}"
sharedGalleryImageId: "{{ sharedGalleryImageId }}"
communityGalleryImageId: "{{ communityGalleryImageId }}"
nodeAgentSKUId: "{{ nodeAgentSKUId }}"
windowsConfiguration:
enableAutomaticUpdates: {{ enableAutomaticUpdates }}
dataDisks:
- lun: {{ lun }}
caching: "{{ caching }}"
diskSizeGB: {{ diskSizeGB }}
managedDisk:
diskEncryptionSet: "{{ diskEncryptionSet }}"
storageAccountType: "{{ storageAccountType }}"
securityProfile: "{{ securityProfile }}"
licenseType: "{{ licenseType }}"
containerConfiguration:
type: "{{ type }}"
containerImageNames: "{{ containerImageNames }}"
containerRegistries: "{{ containerRegistries }}"
diskEncryptionConfiguration:
customerManagedKey: "{{ customerManagedKey }}"
targets: "{{ targets }}"
nodePlacementConfiguration:
policy: "{{ policy }}"
extensions:
- name: "{{ name }}"
publisher: "{{ publisher }}"
type: "{{ type }}"
typeHandlerVersion: "{{ typeHandlerVersion }}"
autoUpgradeMinorVersion: {{ autoUpgradeMinorVersion }}
enableAutomaticUpgrade: {{ enableAutomaticUpgrade }}
settings: "{{ settings }}"
protectedSettings: "{{ protectedSettings }}"
provisionAfterExtensions: "{{ provisionAfterExtensions }}"
osDisk:
ephemeralOSDiskSettings: "{{ ephemeralOSDiskSettings }}"
caching: "{{ caching }}"
diskSizeGB: {{ diskSizeGB }}
managedDisk: "{{ managedDisk }}"
writeAcceleratorEnabled: {{ writeAcceleratorEnabled }}
securityProfile:
encryptionAtHost: {{ encryptionAtHost }}
proxyAgentSettings: "{{ proxyAgentSettings }}"
securityType: "{{ securityType }}"
uefiSettings: "{{ uefiSettings }}"
serviceArtifactReference:
id: "{{ id }}"
taskSlotsPerNode: {{ taskSlotsPerNode }}
taskSchedulingPolicy:
jobDefaultOrder: "{{ jobDefaultOrder }}"
nodeFillType: "{{ nodeFillType }}"
resizeTimeout: "{{ resizeTimeout }}"
targetDedicatedNodes: {{ targetDedicatedNodes }}
targetLowPriorityNodes: {{ targetLowPriorityNodes }}
enableAutoScale: {{ enableAutoScale }}
autoScaleFormula: "{{ autoScaleFormula }}"
autoScaleEvaluationInterval: "{{ autoScaleEvaluationInterval }}"
enableInterNodeCommunication: {{ enableInterNodeCommunication }}
networkConfiguration:
subnetId: "{{ subnetId }}"
dynamicVNetAssignmentScope: "{{ dynamicVNetAssignmentScope }}"
endpointConfiguration:
inboundNATPools: "{{ inboundNATPools }}"
publicIPAddressConfiguration:
provision: "{{ provision }}"
ipFamilies: "{{ ipFamilies }}"
ipAddressIds: "{{ ipAddressIds }}"
ipTags: "{{ ipTags }}"
enableAcceleratedNetworking: {{ enableAcceleratedNetworking }}
startTask:
commandLine: "{{ commandLine }}"
containerSettings:
containerRunOptions: "{{ containerRunOptions }}"
imageName: "{{ imageName }}"
registry: "{{ registry }}"
workingDirectory: "{{ workingDirectory }}"
containerHostBatchBindMounts: "{{ containerHostBatchBindMounts }}"
resourceFiles:
- autoStorageContainerName: "{{ autoStorageContainerName }}"
storageContainerUrl: "{{ storageContainerUrl }}"
httpUrl: "{{ httpUrl }}"
blobPrefix: "{{ blobPrefix }}"
filePath: "{{ filePath }}"
fileMode: "{{ fileMode }}"
identityReference:
resourceId: "{{ resourceId }}"
environmentSettings:
- name: "{{ name }}"
value: "{{ value }}"
userIdentity:
username: "{{ username }}"
autoUser: "{{ autoUser }}"
maxTaskRetryCount: {{ maxTaskRetryCount }}
waitForSuccess: {{ waitForSuccess }}
applicationPackageReferences:
- applicationId: "{{ applicationId }}"
version: "{{ version }}"
userAccounts:
- name: "{{ name }}"
password: "{{ password }}"
elevationLevel: "{{ elevationLevel }}"
linuxUserConfiguration:
uid: {{ uid }}
gid: {{ gid }}
sshPrivateKey: "{{ sshPrivateKey }}"
windowsUserConfiguration:
loginMode: "{{ loginMode }}"
metadata:
- name: "{{ name }}"
value: "{{ value }}"
mountConfiguration:
- azureBlobFileSystemConfiguration:
accountName: "{{ accountName }}"
containerName: "{{ containerName }}"
accountKey: "{{ accountKey }}"
sasKey: "{{ sasKey }}"
blobfuseOptions: "{{ blobfuseOptions }}"
relativeMountPath: "{{ relativeMountPath }}"
identityReference: "{{ identityReference }}"
nfsMountConfiguration:
source: "{{ source }}"
relativeMountPath: "{{ relativeMountPath }}"
mountOptions: "{{ mountOptions }}"
cifsMountConfiguration:
username: "{{ username }}"
source: "{{ source }}"
relativeMountPath: "{{ relativeMountPath }}"
mountOptions: "{{ mountOptions }}"
password: "{{ password }}"
azureFileShareConfiguration:
accountName: "{{ accountName }}"
accountKey: "{{ accountKey }}"
azureFileUrl: "{{ azureFileUrl }}"
relativeMountPath: "{{ relativeMountPath }}"
mountOptions: "{{ mountOptions }}"
upgradePolicy:
mode: "{{ mode }}"
automaticOSUpgradePolicy:
disableAutomaticRollback: {{ disableAutomaticRollback }}
enableAutomaticOSUpgrade: {{ enableAutomaticOSUpgrade }}
useRollingUpgradePolicy: {{ useRollingUpgradePolicy }}
osRollingUpgradeDeferral: {{ osRollingUpgradeDeferral }}
rollingUpgradePolicy:
enableCrossZoneUpgrade: {{ enableCrossZoneUpgrade }}
maxBatchInstancePercent: {{ maxBatchInstancePercent }}
maxUnhealthyInstancePercent: {{ maxUnhealthyInstancePercent }}
maxUnhealthyUpgradedInstancePercent: {{ maxUnhealthyUpgradedInstancePercent }}
pauseTimeBetweenBatches: "{{ pauseTimeBetweenBatches }}"
prioritizeUnhealthyInstances: {{ prioritizeUnhealthyInstances }}
rollbackFailedInstancesOnPolicyBreach: {{ rollbackFailedInstancesOnPolicyBreach }}
- name: onAllTasksComplete
value: "{{ onAllTasksComplete }}"
description: |
The action the Batch service should take when all Tasks in the Job are in the completed state. Note that if a Job contains no Tasks, then all Tasks are considered complete. This option is therefore most commonly used with a Job Manager task; if you want to use automatic Job termination without a Job Manager, you should initially set onAllTasksComplete to noaction and update the Job properties to set onAllTasksComplete to terminatejob once you have finished adding Tasks. The default is noaction. Known values are: "noaction" and "terminatejob".
valid_values: ['noaction', 'terminatejob']
- name: onTaskFailure
value: "{{ onTaskFailure }}"
description: |
The action the Batch service should take when any Task in the Job fails. A Task is considered to have failed if has a failureInfo. A failureInfo is set if the Task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the Task, for example due to a resource file download error. The default is noaction. Known values are: "noaction" and "performexitoptionsjobaction".
valid_values: ['noaction', 'performexitoptionsjobaction']
- name: networkConfiguration
description: |
(This property is not available by default. Please contact support for more information) The network configuration for the Job.
value:
subnetId: "{{ subnetId }}"
skipWithdrawFromVNet: {{ skipWithdrawFromVNet }}
- name: metadata
description: |
A list of name-value pairs associated with the Job as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
value:
- name: "{{ name }}"
value: "{{ value }}"
- name: timeOut
value: {{ timeOut }}
description: 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.". Default value is None.
description: 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.". Default value is None.
- name: ocp-date
value: "{{ ocp-date }}"
description: The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None.
description: The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None.
UPDATE examples
- update_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.
UPDATE azure.batch_dataplane.jobs
SET
priority = {{ priority }},
allowTaskPreemption = {{ allowTaskPreemption }},
maxParallelTasks = {{ maxParallelTasks }},
constraints = '{{ constraints }}',
poolInfo = '{{ poolInfo }}',
onAllTasksComplete = '{{ onAllTasksComplete }}',
metadata = '{{ metadata }}',
networkConfiguration = '{{ networkConfiguration }}'
WHERE
job_id = '{{ job_id }}' --required
AND endpoint = '{{ endpoint }}' --required
AND timeOut = '{{ timeOut}}'
AND ocp-date = '{{ ocp-date}}'
AND If-Modified-Since = '{{ If-Modified-Since}}'
AND If-Unmodified-Since = '{{ If-Unmodified-Since}}';