Class BatchPool

java.lang.Object
com.azure.compute.batch.models.BatchPool
All Implemented Interfaces:
com.azure.json.JsonSerializable<BatchPool>

public final class BatchPool extends Object implements com.azure.json.JsonSerializable<BatchPool>
A Pool in the Azure Batch service.
  • Method Details

    • getId

      public String getId()
      Get the id property: A string that uniquely identifies the Pool 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).
      Returns:
      the id value.
    • getDisplayName

      public String getDisplayName()
      Get the displayName property: The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
      Returns:
      the displayName value.
    • getUrl

      public String getUrl()
      Get the url property: The URL of the Pool.
      Returns:
      the url value.
    • getETag

      public String getETag()
      Get the eTag property: The ETag of the Pool. This is an opaque string. You can use it to detect whether the Pool has changed between requests. In particular, you can be pass the ETag when updating a Pool to specify that your changes should take effect only if nobody else has modified the Pool in the meantime.
      Returns:
      the eTag value.
    • getLastModified

      public OffsetDateTime getLastModified()
      Get the lastModified property: The last modified time of the Pool. This is the last time at which the Pool level data, such as the targetDedicatedNodes or enableAutoscale settings, changed. It does not factor in node-level changes such as a Compute Node changing state.
      Returns:
      the lastModified value.
    • getCreationTime

      public OffsetDateTime getCreationTime()
      Get the creationTime property: The creation time of the Pool.
      Returns:
      the creationTime value.
    • getState

      public BatchPoolState getState()
      Get the state property: The current state of the Pool.
      Returns:
      the state value.
    • getStateTransitionTime

      public OffsetDateTime getStateTransitionTime()
      Get the stateTransitionTime property: The time at which the Pool entered its current state.
      Returns:
      the stateTransitionTime value.
    • getAllocationState

      public AllocationState getAllocationState()
      Get the allocationState property: Whether the Pool is resizing.
      Returns:
      the allocationState value.
    • getAllocationStateTransitionTime

      public OffsetDateTime getAllocationStateTransitionTime()
      Get the allocationStateTransitionTime property: The time at which the Pool entered its current allocation state.
      Returns:
      the allocationStateTransitionTime value.
    • getVmSize

      public String getVmSize()
      Get the vmSize property: The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available VM sizes, see Sizes for Virtual Machines in Azure (https://learn.microsoft.com/azure/virtual-machines/sizes/overview). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series).
      Returns:
      the vmSize value.
    • getVirtualMachineConfiguration

      public VirtualMachineConfiguration getVirtualMachineConfiguration()
      Get the virtualMachineConfiguration property: The virtual machine configuration for the Pool. This property must be specified.
      Returns:
      the virtualMachineConfiguration value.
    • getResizeTimeout

      public Duration getResizeTimeout()
      Get the resizeTimeout property: The timeout for allocation of Compute Nodes to the Pool. This is the timeout for the most recent resize operation. (The initial sizing when the Pool is created counts as a resize.) The default value is 15 minutes.
      Returns:
      the resizeTimeout value.
    • getResizeErrors

      public List<ResizeError> getResizeErrors()
      Get the resizeErrors property: A list of errors encountered while performing the last resize on the Pool. This property is set only if one or more errors occurred during the last Pool resize, and only when the Pool allocationState is Steady.
      Returns:
      the resizeErrors value.
    • getResourceTags

      public Map<String,String> getResourceTags()
      Get the resourceTags property: The user-specified tags associated with the pool. The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing Azure resources associated with the pool. This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'.
      Returns:
      the resourceTags value.
    • getCurrentDedicatedNodes

      public Integer getCurrentDedicatedNodes()
      Get the currentDedicatedNodes property: The number of dedicated Compute Nodes currently in the Pool.
      Returns:
      the currentDedicatedNodes value.
    • getCurrentLowPriorityNodes

      public Integer getCurrentLowPriorityNodes()
      Get the currentLowPriorityNodes property: The number of Spot/Low-priority Compute Nodes currently in the Pool. Spot/Low-priority Compute Nodes which have been preempted are included in this count.
      Returns:
      the currentLowPriorityNodes value.
    • getTargetDedicatedNodes

      public Integer getTargetDedicatedNodes()
      Get the targetDedicatedNodes property: The desired number of dedicated Compute Nodes in the Pool.
      Returns:
      the targetDedicatedNodes value.
    • getTargetLowPriorityNodes

      public Integer getTargetLowPriorityNodes()
      Get the targetLowPriorityNodes property: The desired number of Spot/Low-priority Compute Nodes in the Pool.
      Returns:
      the targetLowPriorityNodes value.
    • isEnableAutoScale

      public Boolean isEnableAutoScale()
      Get the enableAutoScale property: Whether the Pool size should automatically adjust over time. If false, at least one of targetDedicatedNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula property is required and the Pool automatically resizes according to the formula. The default value is false.
      Returns:
      the enableAutoScale value.
    • getAutoScaleFormula

      public String getAutoScaleFormula()
      Get the autoScaleFormula property: A formula for the desired number of Compute Nodes in the Pool. This property is set only if the Pool automatically scales, i.e. enableAutoScale is true.
      Returns:
      the autoScaleFormula value.
    • getAutoScaleEvaluationInterval

      public Duration getAutoScaleEvaluationInterval()
      Get the autoScaleEvaluationInterval property: The time interval at which to automatically adjust the Pool size according to the autoscale formula. This property is set only if the Pool automatically scales, i.e. enableAutoScale is true.
      Returns:
      the autoScaleEvaluationInterval value.
    • getAutoScaleRun

      public AutoScaleRun getAutoScaleRun()
      Get the autoScaleRun property: The results and errors from the last execution of the autoscale formula. This property is set only if the Pool automatically scales, i.e. enableAutoScale is true.
      Returns:
      the autoScaleRun value.
    • isEnableInterNodeCommunication

      public Boolean isEnableInterNodeCommunication()
      Get the enableInterNodeCommunication property: Whether the Pool permits direct communication between Compute Nodes. This imposes restrictions on which Compute Nodes can be assigned to the Pool. Specifying this value can reduce the chance of the requested number of Compute Nodes to be allocated in the Pool.
      Returns:
      the enableInterNodeCommunication value.
    • getNetworkConfiguration

      public NetworkConfiguration getNetworkConfiguration()
      Get the networkConfiguration property: The network configuration for the Pool.
      Returns:
      the networkConfiguration value.
    • getStartTask

      public BatchStartTask getStartTask()
      Get the startTask property: A Task specified to run on each Compute Node as it joins the Pool.
      Returns:
      the startTask value.
    • getCertificateReferences

      public List<BatchCertificateReference> getCertificateReferences()
      Get the certificateReferences property: For Windows Nodes, the Batch service installs the Certificates to the specified Certificate store and location. For Linux Compute Nodes, the Certificates are stored in a directory inside the Task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this location. For Certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and Certificates are placed in that directory. Warning: This property is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.
      Returns:
      the certificateReferences value.
    • getApplicationPackageReferences

      public List<BatchApplicationPackageReference> getApplicationPackageReferences()
      Get the applicationPackageReferences property: The list of Packages to be installed on each Compute Node in the Pool. Changes to Package references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. There is a maximum of 10 Package references on any given Pool.
      Returns:
      the applicationPackageReferences value.
    • getTaskSlotsPerNode

      public Integer getTaskSlotsPerNode()
      Get the taskSlotsPerNode property: The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256.
      Returns:
      the taskSlotsPerNode value.
    • getTaskSchedulingPolicy

      public BatchTaskSchedulingPolicy getTaskSchedulingPolicy()
      Get the taskSchedulingPolicy property: How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread.
      Returns:
      the taskSchedulingPolicy value.
    • getUserAccounts

      public List<UserAccount> getUserAccounts()
      Get the userAccounts property: The list of user Accounts to be created on each Compute Node in the Pool.
      Returns:
      the userAccounts value.
    • getMetadata

      public List<MetadataItem> getMetadata()
      Get the metadata property: A list of name-value pairs associated with the Pool as metadata.
      Returns:
      the metadata value.
    • getStats

      public BatchPoolStatistics getStats()
      Get the stats property: Utilization and resource usage statistics for the entire lifetime of the Pool. This property is populated only if the BatchPool 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.
      Returns:
      the stats value.
    • getMountConfiguration

      public List<MountConfiguration> getMountConfiguration()
      Get the mountConfiguration property: A list of file systems to mount on each node in the pool. This supports Azure Files, NFS, CIFS/SMB, and Blobfuse.
      Returns:
      the mountConfiguration value.
    • getIdentity

      public BatchPoolIdentity getIdentity()
      Get the identity property: The identity of the Batch pool, if configured. The list of user identities associated with the Batch pool. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
      Returns:
      the identity value.
    • getTargetNodeCommunicationMode

      public BatchNodeCommunicationMode getTargetNodeCommunicationMode()
      Get the targetNodeCommunicationMode property: The desired node communication mode for the pool. If omitted, the default value is Default.
      Returns:
      the targetNodeCommunicationMode value.
    • getCurrentNodeCommunicationMode

      public BatchNodeCommunicationMode getCurrentNodeCommunicationMode()
      Get the currentNodeCommunicationMode property: The current state of the pool communication mode.
      Returns:
      the currentNodeCommunicationMode value.
    • getUpgradePolicy

      public UpgradePolicy getUpgradePolicy()
      Get the upgradePolicy property: The upgrade policy for the Pool. Describes an upgrade policy - automatic, manual, or rolling.
      Returns:
      the upgradePolicy value.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<BatchPool>
      Throws:
      IOException
    • fromJson

      public static BatchPool fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of BatchPool from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of BatchPool if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the BatchPool.