Share via


PoolProperties Class

  • java.lang.Object
    • com.azure.resourcemanager.batch.fluent.models.PoolProperties

Implements

public final class PoolProperties
implements JsonSerializable<PoolProperties>

Pool properties.

Constructor Summary

Constructor Description
PoolProperties()

Creates an instance of PoolProperties class.

Method Summary

Modifier and Type Method and Description
AllocationState allocationState()

Get the allocationState property: Whether the pool is resizing.

OffsetDateTime allocationStateTransitionTime()

Get the allocationStateTransitionTime property: The time at which the pool entered its current allocation state.

List<String> applicationLicenses()

Get the applicationLicenses property: The list of application licenses must be a subset of available Batch service application licenses.

List<ApplicationPackageReference> applicationPackages()

Get the applicationPackages property: Changes to application package references affect all new compute nodes joining the pool, but do not affect compute nodes that are already in the pool until they are rebooted or reimaged.

AutoScaleRun autoScaleRun()

Get the autoScaleRun property: This property is set only if the pool automatically scales, i.e.

List<CertificateReference> certificates()

Get the certificates property: For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location.

OffsetDateTime creationTime()

Get the creationTime property: The creation time of the pool.

Integer currentDedicatedNodes()

Get the currentDedicatedNodes property: The number of dedicated compute nodes currently in the pool.

Integer currentLowPriorityNodes()

Get the currentLowPriorityNodes property: The number of Spot/low-priority compute nodes currently in the pool.

NodeCommunicationMode currentNodeCommunicationMode()

Get the currentNodeCommunicationMode property: Determines how a pool communicates with the Batch service.

DeploymentConfiguration deploymentConfiguration()

Get the deploymentConfiguration property: Deployment configuration properties.

String displayName()

Get the displayName property: The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.

static PoolProperties fromJson(JsonReader jsonReader)

Reads an instance of PoolProperties from the JsonReader.

InterNodeCommunicationState interNodeCommunication()

Get the interNodeCommunication property: This imposes restrictions on which nodes can be assigned to the pool.

OffsetDateTime lastModified()

Get the lastModified property: This is the last time at which the pool level data, such as the targetDedicatedNodes or autoScaleSettings, changed.

List<MetadataItem> metadata()

Get the metadata property: The Batch service does not assign any meaning to metadata; it is solely for the use of user code.

List<MountConfiguration> mountConfiguration()

Get the mountConfiguration property: This supports Azure Files, NFS, CIFS/SMB, and Blobfuse.

NetworkConfiguration networkConfiguration()

Get the networkConfiguration property: The network configuration for a pool.

PoolProvisioningState provisioningState()

Get the provisioningState property: The current state of the pool.

OffsetDateTime provisioningStateTransitionTime()

Get the provisioningStateTransitionTime property: The time at which the pool entered its current state.

ResizeOperationStatus resizeOperationStatus()

Get the resizeOperationStatus property: Describes either the current operation (if the pool AllocationState is Resizing) or the previously completed operation (if the AllocationState is Steady).

Map<String,String> resourceTags()

Get the resourceTags property: The user-defined tags to be associated with the Azure Batch Pool.

ScaleSettings scaleSettings()

Get the scaleSettings property: Defines the desired size of the pool.

StartTask startTask()

Get the startTask property: In an PATCH (update) operation, this property can be set to an empty object to remove the start task from the pool.

NodeCommunicationMode targetNodeCommunicationMode()

Get the targetNodeCommunicationMode property: If omitted, the default value is Default.

TaskSchedulingPolicy taskSchedulingPolicy()

Get the taskSchedulingPolicy property: If not specified, the default is spread.

Integer taskSlotsPerNode()

Get the taskSlotsPerNode property: The default value is 1.

JsonWriter toJson(JsonWriter jsonWriter)
UpgradePolicy upgradePolicy()

Get the upgradePolicy property: Describes an upgrade policy - automatic, manual, or rolling.

List<UserAccount> userAccounts()

Get the userAccounts property: The list of user accounts to be created on each node in the pool.

void validate()

Validates the instance.

String vmSize()

Get the vmSize property: For information about available VM sizes, see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/).

PoolProperties withApplicationLicenses(List<String> applicationLicenses)

Set the applicationLicenses property: The list of application licenses must be a subset of available Batch service application licenses.

PoolProperties withApplicationPackages(List<ApplicationPackageReference> applicationPackages)

Set the applicationPackages property: Changes to application package references affect all new compute nodes joining the pool, but do not affect compute nodes that are already in the pool until they are rebooted or reimaged.

PoolProperties withCertificates(List<CertificateReference> certificates)

Set the certificates property: For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location.

PoolProperties withDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration)

Set the deploymentConfiguration property: Deployment configuration properties.

PoolProperties withDisplayName(String displayName)

Set the displayName property: The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.

PoolProperties withInterNodeCommunication(InterNodeCommunicationState interNodeCommunication)

Set the interNodeCommunication property: This imposes restrictions on which nodes can be assigned to the pool.

PoolProperties withMetadata(List<MetadataItem> metadata)

Set the metadata property: The Batch service does not assign any meaning to metadata; it is solely for the use of user code.

PoolProperties withMountConfiguration(List<MountConfiguration> mountConfiguration)

Set the mountConfiguration property: This supports Azure Files, NFS, CIFS/SMB, and Blobfuse.

PoolProperties withNetworkConfiguration(NetworkConfiguration networkConfiguration)

Set the networkConfiguration property: The network configuration for a pool.

PoolProperties withResourceTags(Map<String,String> resourceTags)

Set the resourceTags property: The user-defined tags to be associated with the Azure Batch Pool.

PoolProperties withScaleSettings(ScaleSettings scaleSettings)

Set the scaleSettings property: Defines the desired size of the pool.

PoolProperties withStartTask(StartTask startTask)

Set the startTask property: In an PATCH (update) operation, this property can be set to an empty object to remove the start task from the pool.

PoolProperties withTargetNodeCommunicationMode(NodeCommunicationMode targetNodeCommunicationMode)

Set the targetNodeCommunicationMode property: If omitted, the default value is Default.

PoolProperties withTaskSchedulingPolicy(TaskSchedulingPolicy taskSchedulingPolicy)

Set the taskSchedulingPolicy property: If not specified, the default is spread.

PoolProperties withTaskSlotsPerNode(Integer taskSlotsPerNode)

Set the taskSlotsPerNode property: The default value is 1.

PoolProperties withUpgradePolicy(UpgradePolicy upgradePolicy)

Set the upgradePolicy property: Describes an upgrade policy - automatic, manual, or rolling.

PoolProperties withUserAccounts(List<UserAccount> userAccounts)

Set the userAccounts property: The list of user accounts to be created on each node in the pool.

PoolProperties withVmSize(String vmSize)

Set the vmSize property: For information about available VM sizes, see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/).

Methods inherited from java.lang.Object

Constructor Details

PoolProperties

public PoolProperties()

Creates an instance of PoolProperties class.

Method Details

allocationState

public AllocationState allocationState()

Get the allocationState property: Whether the pool is resizing.

Returns:

the allocationState value.

allocationStateTransitionTime

public OffsetDateTime allocationStateTransitionTime()

Get the allocationStateTransitionTime property: The time at which the pool entered its current allocation state.

Returns:

the allocationStateTransitionTime value.

applicationLicenses

public List<String> applicationLicenses()

Get the applicationLicenses property: The list of application licenses must be a subset of available Batch service application licenses. If a license is requested which is not supported, pool creation will fail.

Returns:

the applicationLicenses value.

applicationPackages

public List<ApplicationPackageReference> applicationPackages()

Get the applicationPackages property: Changes to application package references affect all new compute 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 application package references on any given pool.

Returns:

the applicationPackages value.

autoScaleRun

public AutoScaleRun autoScaleRun()

Get the autoScaleRun property: This property is set only if the pool automatically scales, i.e. autoScaleSettings are used.

Returns:

the autoScaleRun value.

certificates

public List<CertificateReference> certificates()

Get the certificates property: For Windows compute 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 certificates value.

creationTime

public OffsetDateTime creationTime()

Get the creationTime property: The creation time of the pool.

Returns:

the creationTime value.

currentDedicatedNodes

public Integer currentDedicatedNodes()

Get the currentDedicatedNodes property: The number of dedicated compute nodes currently in the pool.

Returns:

the currentDedicatedNodes value.

currentLowPriorityNodes

public Integer currentLowPriorityNodes()

Get the currentLowPriorityNodes property: The number of Spot/low-priority compute nodes currently in the pool.

Returns:

the currentLowPriorityNodes value.

currentNodeCommunicationMode

public NodeCommunicationMode currentNodeCommunicationMode()

Get the currentNodeCommunicationMode property: Determines how a pool communicates with the Batch service.

Returns:

the currentNodeCommunicationMode value.

deploymentConfiguration

public DeploymentConfiguration deploymentConfiguration()

Get the deploymentConfiguration property: Deployment configuration properties.

Returns:

the deploymentConfiguration value.

displayName

public String displayName()

Get the displayName property: The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.

Returns:

the displayName value.

fromJson

public static PoolProperties fromJson(JsonReader jsonReader)

Reads an instance of PoolProperties from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of PoolProperties 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 PoolProperties.

interNodeCommunication

public InterNodeCommunicationState interNodeCommunication()

Get the interNodeCommunication property: This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool. If not specified, this value defaults to 'Disabled'.

Returns:

the interNodeCommunication value.

lastModified

public OffsetDateTime lastModified()

Get the lastModified property: This is the last time at which the pool level data, such as the targetDedicatedNodes or autoScaleSettings, changed. It does not factor in node-level changes such as a compute node changing state.

Returns:

the lastModified value.

metadata

public List<MetadataItem> metadata()

Get the metadata property: The Batch service does not assign any meaning to metadata; it is solely for the use of user code.

Returns:

the metadata value.

mountConfiguration

public List<MountConfiguration> mountConfiguration()

Get the mountConfiguration property: This supports Azure Files, NFS, CIFS/SMB, and Blobfuse.

Returns:

the mountConfiguration value.

networkConfiguration

public NetworkConfiguration networkConfiguration()

Get the networkConfiguration property: The network configuration for a pool.

Returns:

the networkConfiguration value.

provisioningState

public PoolProvisioningState provisioningState()

Get the provisioningState property: The current state of the pool.

Returns:

the provisioningState value.

provisioningStateTransitionTime

public OffsetDateTime provisioningStateTransitionTime()

Get the provisioningStateTransitionTime property: The time at which the pool entered its current state.

Returns:

the provisioningStateTransitionTime value.

resizeOperationStatus

public ResizeOperationStatus resizeOperationStatus()

Get the resizeOperationStatus property: Describes either the current operation (if the pool AllocationState is Resizing) or the previously completed operation (if the AllocationState is Steady).

Returns:

the resizeOperationStatus value.

resourceTags

public Map<String,String> resourceTags()

Get the resourceTags property: 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.

scaleSettings

public ScaleSettings scaleSettings()

Get the scaleSettings property: Defines the desired size of the pool. This can either be 'fixedScale' where the requested targetDedicatedNodes is specified, or 'autoScale' which defines a formula which is periodically reevaluated. If this property is not specified, the pool will have a fixed scale with 0 targetDedicatedNodes.

Returns:

the scaleSettings value.

startTask

public StartTask startTask()

Get the startTask property: In an PATCH (update) operation, this property can be set to an empty object to remove the start task from the pool.

Returns:

the startTask value.

targetNodeCommunicationMode

public NodeCommunicationMode targetNodeCommunicationMode()

Get the targetNodeCommunicationMode property: If omitted, the default value is Default.

Returns:

the targetNodeCommunicationMode value.

taskSchedulingPolicy

public TaskSchedulingPolicy taskSchedulingPolicy()

Get the taskSchedulingPolicy property: If not specified, the default is spread.

Returns:

the taskSchedulingPolicy value.

taskSlotsPerNode

public Integer taskSlotsPerNode()

Get the taskSlotsPerNode property: 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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

upgradePolicy

public UpgradePolicy upgradePolicy()

Get the upgradePolicy property: Describes an upgrade policy - automatic, manual, or rolling.

Returns:

the upgradePolicy value.

userAccounts

public List<UserAccount> userAccounts()

Get the userAccounts property: The list of user accounts to be created on each node in the pool.

Returns:

the userAccounts value.

validate

public void validate()

Validates the instance.

vmSize

public String vmSize()

Get the vmSize property: For information about available VM sizes, see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). 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.

withApplicationLicenses

public PoolProperties withApplicationLicenses(List<String> applicationLicenses)

Set the applicationLicenses property: The list of application licenses must be a subset of available Batch service application licenses. If a license is requested which is not supported, pool creation will fail.

Parameters:

applicationLicenses - the applicationLicenses value to set.

Returns:

the PoolProperties object itself.

withApplicationPackages

public PoolProperties withApplicationPackages(List<ApplicationPackageReference> applicationPackages)

Set the applicationPackages property: Changes to application package references affect all new compute 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 application package references on any given pool.

Parameters:

applicationPackages - the applicationPackages value to set.

Returns:

the PoolProperties object itself.

withCertificates

public PoolProperties withCertificates(List<CertificateReference> certificates)

Set the certificates property: For Windows compute 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.

Parameters:

certificates - the certificates value to set.

Returns:

the PoolProperties object itself.

withDeploymentConfiguration

public PoolProperties withDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration)

Set the deploymentConfiguration property: Deployment configuration properties.

Parameters:

deploymentConfiguration - the deploymentConfiguration value to set.

Returns:

the PoolProperties object itself.

withDisplayName

public PoolProperties withDisplayName(String displayName)

Set the displayName property: The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.

Parameters:

displayName - the displayName value to set.

Returns:

the PoolProperties object itself.

withInterNodeCommunication

public PoolProperties withInterNodeCommunication(InterNodeCommunicationState interNodeCommunication)

Set the interNodeCommunication property: This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool. If not specified, this value defaults to 'Disabled'.

Parameters:

interNodeCommunication - the interNodeCommunication value to set.

Returns:

the PoolProperties object itself.

withMetadata

public PoolProperties withMetadata(List<MetadataItem> metadata)

Set the metadata property: The Batch service does not assign any meaning to metadata; it is solely for the use of user code.

Parameters:

metadata - the metadata value to set.

Returns:

the PoolProperties object itself.

withMountConfiguration

public PoolProperties withMountConfiguration(List<MountConfiguration> mountConfiguration)

Set the mountConfiguration property: This supports Azure Files, NFS, CIFS/SMB, and Blobfuse.

Parameters:

mountConfiguration - the mountConfiguration value to set.

Returns:

the PoolProperties object itself.

withNetworkConfiguration

public PoolProperties withNetworkConfiguration(NetworkConfiguration networkConfiguration)

Set the networkConfiguration property: The network configuration for a pool.

Parameters:

networkConfiguration - the networkConfiguration value to set.

Returns:

the PoolProperties object itself.

withResourceTags

public PoolProperties withResourceTags(Map<String,String> resourceTags)

Set the resourceTags property: 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'.

Parameters:

resourceTags - the resourceTags value to set.

Returns:

the PoolProperties object itself.

withScaleSettings

public PoolProperties withScaleSettings(ScaleSettings scaleSettings)

Set the scaleSettings property: Defines the desired size of the pool. This can either be 'fixedScale' where the requested targetDedicatedNodes is specified, or 'autoScale' which defines a formula which is periodically reevaluated. If this property is not specified, the pool will have a fixed scale with 0 targetDedicatedNodes.

Parameters:

scaleSettings - the scaleSettings value to set.

Returns:

the PoolProperties object itself.

withStartTask

public PoolProperties withStartTask(StartTask startTask)

Set the startTask property: In an PATCH (update) operation, this property can be set to an empty object to remove the start task from the pool.

Parameters:

startTask - the startTask value to set.

Returns:

the PoolProperties object itself.

withTargetNodeCommunicationMode

public PoolProperties withTargetNodeCommunicationMode(NodeCommunicationMode targetNodeCommunicationMode)

Set the targetNodeCommunicationMode property: If omitted, the default value is Default.

Parameters:

targetNodeCommunicationMode - the targetNodeCommunicationMode value to set.

Returns:

the PoolProperties object itself.

withTaskSchedulingPolicy

public PoolProperties withTaskSchedulingPolicy(TaskSchedulingPolicy taskSchedulingPolicy)

Set the taskSchedulingPolicy property: If not specified, the default is spread.

Parameters:

taskSchedulingPolicy - the taskSchedulingPolicy value to set.

Returns:

the PoolProperties object itself.

withTaskSlotsPerNode

public PoolProperties withTaskSlotsPerNode(Integer taskSlotsPerNode)

Set the taskSlotsPerNode property: 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.

Parameters:

taskSlotsPerNode - the taskSlotsPerNode value to set.

Returns:

the PoolProperties object itself.

withUpgradePolicy

public PoolProperties withUpgradePolicy(UpgradePolicy upgradePolicy)

Set the upgradePolicy property: Describes an upgrade policy - automatic, manual, or rolling.

Parameters:

upgradePolicy - the upgradePolicy value to set.

Returns:

the PoolProperties object itself.

withUserAccounts

public PoolProperties withUserAccounts(List<UserAccount> userAccounts)

Set the userAccounts property: The list of user accounts to be created on each node in the pool.

Parameters:

userAccounts - the userAccounts value to set.

Returns:

the PoolProperties object itself.

withVmSize

public PoolProperties withVmSize(String vmSize)

Set the vmSize property: For information about available VM sizes, see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series).

Parameters:

vmSize - the vmSize value to set.

Returns:

the PoolProperties object itself.

Applies to