Pool - Update Properties
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.
POST {batchUrl}/pools/{poolId}/updateproperties?api-version=2024-07-01.20.0
POST {batchUrl}/pools/{poolId}/updateproperties?timeout={timeout}&api-version=2024-07-01.20.0
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
batch
|
path | True |
string |
The base URL for all Azure Batch service requests. |
pool
|
path | True |
string |
The ID of the Pool to update. |
api-version
|
query | True |
string |
Client API Version. |
timeout
|
query |
integer int32 |
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. |
Request Header
Media Types: "application/json; odata=minimalmetadata"
Name | Required | Type | Description |
---|---|---|---|
client-request-id |
string uuid |
The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. |
|
return-client-request-id |
boolean |
Whether the server should return the client-request-id in the response. |
|
ocp-date |
string date-time-rfc1123 |
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. |
Request Body
Media Types: "application/json; odata=minimalmetadata"
Name | Required | Type | Description |
---|---|---|---|
applicationPackageReferences | True |
The list of Application Packages to be installed on each Compute Node in the Pool. |
|
certificateReferences | True |
A list of Certificates to be installed on each Compute Node in the Pool. Warning: This property is deprecated and will be removed after February, 2024. Please use the Azure KeyVault Extension instead. |
|
metadata | True |
A list of name-value pairs associated with the Pool as metadata. |
|
startTask |
A Task to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted. |
||
targetNodeCommunicationMode |
The desired node communication mode for the pool. |
Responses
Name | Type | Description |
---|---|---|
204 No Content |
The request to the Batch service was successful. Headers
|
|
Other Status Codes |
The error from the Batch service. |
Security
azure_auth
Microsoft Entra OAuth 2.0 auth code flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | Impersonate your user account |
Authorization
Type:
apiKey
In:
header
Examples
Pool update
Sample request
POST account.region.batch.azure.com/pools/poolId/updateproperties?api-version=2024-07-01.20.0
{
"startTask": {
"commandLine": "/bin/bash -c 'echo start task'"
},
"certificateReferences": [],
"applicationPackageReferences": [],
"metadata": []
}
Sample response
Definitions
Name | Description |
---|---|
Application |
A reference to an Package to be deployed to Compute Nodes. |
Auto |
The scope for the auto user |
Auto |
Specifies the parameters for the auto user that runs a Task on the Batch service. |
Batch |
An error response received from the Azure Batch service. |
Batch |
An item of additional information included in an Azure Batch error response. |
Certificate |
A reference to a Certificate to be installed on Compute Nodes in a Pool. |
Certificate |
The location of the Certificate store on the Compute Node into which to install the Certificate. |
Certificate |
Which user Accounts on the Compute Node should have access to the private data of the Certificate. |
Compute |
The reference to a user assigned identity associated with the Batch pool which a compute node will use. |
Container |
The entry of path and mount mode you want to mount into task container. |
Container |
The paths which will be mounted to container task's container. |
Container |
A private container registry. |
Container |
The location of the container Task working directory. |
Elevation |
The elevation level of the user. |
Environment |
An environment variable to be set on a Task process. |
Error |
An error message received in an Azure Batch error response. |
Metadata |
A name-value pair associated with a Batch service resource. |
Node |
Determines how a pool communicates with the Batch service. |
Pool |
The set of changes to be made to a Pool. |
Resource |
A single file or multiple files to be downloaded to a Compute Node. |
Start |
A Task which is run when a Node joins a Pool in the Azure Batch service, or when the Compute Node is rebooted or reimaged. |
Task |
The container settings for a Task. |
User |
The definition of the user identity under which the Task is run. |
ApplicationPackageReference
A reference to an Package to be deployed to Compute Nodes.
Name | Type | Description |
---|---|---|
applicationId |
string |
The ID of the application to deploy. |
version |
string |
The version of the application to deploy. If omitted, the default version is deployed. |
AutoUserScope
The scope for the auto user
Name | Type | Description |
---|---|---|
pool |
string |
Specifies that the Task runs as the common auto user Account which is created on every Compute Node in a Pool. |
task |
string |
Specifies that the service should create a new user for the Task. |
AutoUserSpecification
Specifies the parameters for the auto user that runs a Task on the Batch service.
Name | Type | Description |
---|---|---|
elevationLevel |
The elevation level of the auto user. |
|
scope |
The scope for the auto user |
BatchError
An error response received from the Azure Batch service.
Name | Type | Description |
---|---|---|
code |
string |
An identifier for the error. Codes are invariant and are intended to be consumed programmatically. |
message |
A message describing the error, intended to be suitable for display in a user interface. |
|
values |
A collection of key-value pairs containing additional details about the error. |
BatchErrorDetail
An item of additional information included in an Azure Batch error response.
Name | Type | Description |
---|---|---|
key |
string |
An identifier specifying the meaning of the Value property. |
value |
string |
The additional information included with the error response. |
CertificateReference
A reference to a Certificate to be installed on Compute Nodes in a Pool.
Name | Type | Description |
---|---|---|
storeLocation |
The location of the Certificate store on the Compute Node into which to install the Certificate. |
|
storeName |
string |
The name of the Certificate store on the Compute Node into which to install the Certificate. |
thumbprint |
string |
The thumbprint of the Certificate. |
thumbprintAlgorithm |
string |
The algorithm with which the thumbprint is associated. This must be sha1. |
visibility |
Which user Accounts on the Compute Node should have access to the private data of the Certificate. |
CertificateStoreLocation
The location of the Certificate store on the Compute Node into which to install the Certificate.
Name | Type | Description |
---|---|---|
currentuser |
string |
Certificates should be installed to the CurrentUser Certificate store. |
localmachine |
string |
Certificates should be installed to the LocalMachine Certificate store. |
CertificateVisibility
Which user Accounts on the Compute Node should have access to the private data of the Certificate.
Name | Type | Description |
---|---|---|
remoteuser |
string |
The Certificate should be visible to the user accounts under which users remotely access the Compute Node. |
starttask |
string |
The Certificate should be visible to the user account under which the StartTask is run. Note that if AutoUser Scope is Pool for both the StartTask and a Task, this certificate will be visible to the Task as well. |
task |
string |
The Certificate should be visible to the user accounts under which Job Tasks are run. |
ComputeNodeIdentityReference
The reference to a user assigned identity associated with the Batch pool which a compute node will use.
Name | Type | Description |
---|---|---|
resourceId |
string |
The ARM resource id of the user assigned identity. |
ContainerHostBatchBindMountEntry
The entry of path and mount mode you want to mount into task container.
Name | Type | Description |
---|---|---|
isReadOnly |
boolean |
Mount this source path as read-only mode or not. Default value is false (read/write mode). |
source |
The path which be mounted to container customer can select. |
ContainerHostDataPath
The paths which will be mounted to container task's container.
Name | Type | Description |
---|---|---|
Applications |
string |
The applications path. |
JobPrep |
string |
The job-prep task path. |
Shared |
string |
The path for multi-instances task to shared their files. |
Startup |
string |
The path for start task. |
Task |
string |
The task path. |
VfsMounts |
string |
The path contains all virtual file systems are mounted on this node. |
ContainerRegistry
A private container registry.
Name | Type | Description |
---|---|---|
identityReference |
The reference to the user assigned identity to use to access an Azure Container Registry instead of username and password. |
|
password |
string |
The password to log into the registry server. |
registryServer |
string |
The registry URL. |
username |
string |
The user name to log into the registry server. |
ContainerWorkingDirectory
The location of the container Task working directory.
Name | Type | Description |
---|---|---|
containerImageDefault |
string |
Use the working directory defined in the container Image. Beware that this directory will not contain the Resource Files downloaded by Batch. |
taskWorkingDirectory |
string |
Use the standard Batch service Task working directory, which will contain the Task Resource Files populated by Batch. |
ElevationLevel
The elevation level of the user.
Name | Type | Description |
---|---|---|
admin |
string |
The user is a user with elevated access and operates with full Administrator permissions. |
nonadmin |
string |
The user is a standard user without elevated access. |
EnvironmentSetting
An environment variable to be set on a Task process.
Name | Type | Description |
---|---|---|
name |
string |
The name of the environment variable. |
value |
string |
The value of the environment variable. |
ErrorMessage
An error message received in an Azure Batch error response.
Name | Type | Description |
---|---|---|
lang |
string |
The language code of the error message |
value |
string |
The text of the message. |
MetadataItem
A name-value pair associated with a Batch service resource.
Name | Type | Description |
---|---|---|
name |
string |
The name of the metadata item. |
value |
string |
The value of the metadata item. |
NodeCommunicationMode
Determines how a pool communicates with the Batch service.
Name | Type | Description |
---|---|---|
classic |
string |
Nodes using the classic communication mode require inbound TCP communication on ports 29876 and 29877 from the "BatchNodeManagement.{region}" service tag and outbound TCP communication on port 443 to the "Storage.region" and "BatchNodeManagement.{region}" service tags. |
default |
string |
The node communication mode is automatically set by the Batch service. |
simplified |
string |
Nodes using the simplified communication mode require outbound TCP communication on port 443 to the "BatchNodeManagement.{region}" service tag. No open inbound ports are required. |
PoolUpdatePropertiesParameter
The set of changes to be made to a Pool.
Name | Type | Description |
---|---|---|
applicationPackageReferences |
The list of Application Packages to be installed on each Compute Node in the Pool. |
|
certificateReferences |
A list of Certificates to be installed on each Compute Node in the Pool. Warning: This property is deprecated and will be removed after February, 2024. Please use the Azure KeyVault Extension instead. |
|
metadata |
A list of name-value pairs associated with the Pool as metadata. |
|
startTask |
A Task to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted. |
|
targetNodeCommunicationMode |
The desired node communication mode for the pool. |
ResourceFile
A single file or multiple files to be downloaded to a Compute Node.
Name | Type | Description |
---|---|---|
autoStorageContainerName |
string |
The storage container name in the auto storage Account. |
blobPrefix |
string |
The blob prefix to use when downloading blobs from an Azure Storage container. Only the blobs whose names begin with the specified prefix will be downloaded. |
fileMode |
string |
The file permission mode attribute in octal format. |
filePath |
string |
The location on the Compute Node to which to download the file(s), relative to the Task's working directory. |
httpUrl |
string |
The URL of the file to download. |
identityReference |
The reference to the user assigned identity to use to access Azure Blob Storage specified by storageContainerUrl or httpUrl |
|
storageContainerUrl |
string |
The URL of the blob container within Azure Blob Storage. |
StartTask
A Task which is run when a Node joins a Pool in the Azure Batch service, or when the Compute Node is rebooted or reimaged.
Name | Type | Description |
---|---|---|
commandLine |
string |
The command line of the StartTask. |
containerSettings |
The settings for the container under which the StartTask runs. |
|
environmentSettings |
A list of environment variable settings for the StartTask. |
|
maxTaskRetryCount |
integer |
The maximum number of times the Task may be retried. |
resourceFiles |
A list of files that the Batch service will download to the Compute Node before running the command line. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. |
|
userIdentity |
The user identity under which the StartTask runs. |
|
waitForSuccess |
boolean |
Whether the Batch service should wait for the StartTask to complete successfully (that is, to exit with exit code 0) before scheduling any Tasks on the Compute Node. |
TaskContainerSettings
The container settings for a Task.
Name | Type | Description |
---|---|---|
containerHostBatchBindMounts |
The paths you want to mounted to container task. |
|
containerRunOptions |
string |
Additional options to the container create command. |
imageName |
string |
The Image to use to create the container in which the Task will run. |
registry |
The private registry which contains the container Image. |
|
workingDirectory |
The location of the container Task working directory. |
UserIdentity
The definition of the user identity under which the Task is run.
Name | Type | Description |
---|---|---|
autoUser |
The auto user under which the Task is run. |
|
username |
string |
The name of the user identity under which the Task is run. |