ComputeNodeOperations Class

  • java.lang.Object
    • com.microsoft.azure.batch.ComputeNodeOperations

Implements

public class ComputeNodeOperations
implements IInheritedBehaviors

Performs compute node-related operations on an Azure Batch account.

Method Summary

Modifier and Type Method and Description
void addComputeNodeUser(String poolId, String nodeId, ComputeNodeUser user)

Adds a user account to the specified compute node.

void addComputeNodeUser(String poolId, String nodeId, ComputeNodeUser user, Iterable<BatchClientBehavior> additionalBehaviors)

Adds a user account to the specified compute node.

Collection<BatchClientBehavior> customBehaviors()

Gets a collection of behaviors that modify or customize requests to the Batch service.

void deleteComputeNodeUser(String poolId, String nodeId, String userName)

Deletes the specified user account from the specified compute node.

void deleteComputeNodeUser(String poolId, String nodeId, String userName, Iterable<BatchClientBehavior> additionalBehaviors)

Deletes the specified user account from the specified compute node.

void disableComputeNodeScheduling(String poolId, String nodeId)

Disables task scheduling on the specified compute node.

void disableComputeNodeScheduling(String poolId, String nodeId, DisableComputeNodeSchedulingOption nodeDisableSchedulingOption)

Disables task scheduling on the specified compute node.

void disableComputeNodeScheduling(String poolId, String nodeId, DisableComputeNodeSchedulingOption nodeDisableSchedulingOption, Iterable<BatchClientBehavior> additionalBehaviors)

Disables task scheduling on the specified compute node.

void enableComputeNodeScheduling(String poolId, String nodeId)

Enables task scheduling on the specified compute node.

void enableComputeNodeScheduling(String poolId, String nodeId, Iterable<BatchClientBehavior> additionalBehaviors)

Enables task scheduling on the specified compute node.

ComputeNode getComputeNode(String poolId, String nodeId)

Gets the specified compute node.

ComputeNode getComputeNode(String poolId, String nodeId, DetailLevel detailLevel)

Gets the specified compute node.

ComputeNode getComputeNode(String poolId, String nodeId, DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors)

Gets the specified compute node.

String getComputeNodeRemoteDesktop(String poolId, String nodeId)

Gets a Remote Desktop Protocol (RDP) file for the specified node.

String getComputeNodeRemoteDesktop(String poolId, String nodeId, Iterable<BatchClientBehavior> additionalBehaviors)

Gets a Remote Desktop Protocol (RDP) file for the specified node.

ComputeNodeGetRemoteLoginSettingsResult getComputeNodeRemoteLoginSettings(String poolId, String nodeId)

Gets the settings required for remote login to a compute node.

ComputeNodeGetRemoteLoginSettingsResult getComputeNodeRemoteLoginSettings(String poolId, String nodeId, Iterable<BatchClientBehavior> additionalBehaviors)

Gets the settings required for remote login to a compute node.

com.microsoft.azure.PagedList<ComputeNode> listComputeNodes(String poolId)

Lists the ComputeNode of the specified pool.

com.microsoft.azure.PagedList<ComputeNode> listComputeNodes(String poolId, DetailLevel detailLevel)

Lists the ComputeNode of the specified pool.

com.microsoft.azure.PagedList<ComputeNode> listComputeNodes(String poolId, DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors)

Lists the ComputeNode of the specified pool.

void rebootComputeNode(String poolId, String nodeId)

Reboots the specified compute node.

void rebootComputeNode(String poolId, String nodeId, ComputeNodeRebootOption nodeRebootOption)

Reboots the specified compute node.

void rebootComputeNode(String poolId, String nodeId, ComputeNodeRebootOption nodeRebootOption, Iterable<BatchClientBehavior> additionalBehaviors)

Reboots the specified compute node.

void reimageComputeNode(String poolId, String nodeId)

Reinstalls the operating system on the specified compute node.

void reimageComputeNode(String poolId, String nodeId, ComputeNodeReimageOption nodeReimageOption)

Reinstalls the operating system on the specified compute node.

void reimageComputeNode(String poolId, String nodeId, ComputeNodeReimageOption nodeReimageOption, Iterable<BatchClientBehavior> additionalBehaviors)

Reinstalls the operating system on the specified compute node.

void updateComputeNodeUser(String poolId, String nodeId, String userName, String sshPublicKey)

Updates the specified user account on the specified compute node.

void updateComputeNodeUser(String poolId, String nodeId, String userName, String sshPublicKey, Iterable<BatchClientBehavior> additionalBehaviors)

Updates the specified user account on the specified compute node.

void updateComputeNodeUser(String poolId, String nodeId, String userName, String password, DateTime expiryTime)

Updates the specified user account on the specified compute node.

void updateComputeNodeUser(String poolId, String nodeId, String userName, String password, DateTime expiryTime, Iterable<BatchClientBehavior> additionalBehaviors)

Updates the specified user account on the specified compute node.

UploadBatchServiceLogsResult uploadBatchServiceLogs(String poolId, String nodeId, String containerUrl, DateTime startTime)

Upload Azure Batch service log files from the specified compute node to Azure Blob Storage.

UploadBatchServiceLogsResult uploadBatchServiceLogs(String poolId, String nodeId, String containerUrl, DateTime startTime, DateTime endTime, Iterable<BatchClientBehavior> additionalBehaviors)

Upload Azure Batch service log files from the specified compute node to Azure Blob Storage.

IInheritedBehaviors withCustomBehaviors(Collection<BatchClientBehavior> behaviors)

Sets a collection of behaviors that modify or customize requests to the Batch service.

Methods inherited from java.lang.Object

Method Details

addComputeNodeUser

public void addComputeNodeUser(String poolId, String nodeId, ComputeNodeUser user)

Adds a user account to the specified compute node.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node where the user account will be created.
user - The user account to be created.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

addComputeNodeUser

public void addComputeNodeUser(String poolId, String nodeId, ComputeNodeUser user, Iterable additionalBehaviors)

Adds a user account to the specified compute node.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node where the user account will be created.
user - The user account to be created.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

customBehaviors

public Collection customBehaviors()

Gets a collection of behaviors that modify or customize requests to the Batch service.

Returns:

A collection of BatchClientBehavior instances.

deleteComputeNodeUser

public void deleteComputeNodeUser(String poolId, String nodeId, String userName)

Deletes the specified user account from the specified compute node.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node where the user account will be deleted.
userName - The name of the user account to be deleted.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

deleteComputeNodeUser

public void deleteComputeNodeUser(String poolId, String nodeId, String userName, Iterable additionalBehaviors)

Deletes the specified user account from the specified compute node.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node where the user account will be deleted.
userName - The name of the user account to be deleted.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

disableComputeNodeScheduling

public void disableComputeNodeScheduling(String poolId, String nodeId)

Disables task scheduling on the specified compute node.

Parameters:

poolId - The ID of the pool.
nodeId - the ID of the compute node.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

disableComputeNodeScheduling

public void disableComputeNodeScheduling(String poolId, String nodeId, DisableComputeNodeSchedulingOption nodeDisableSchedulingOption)

Disables task scheduling on the specified compute node.

Parameters:

poolId - The ID of the pool.
nodeId - The ID of the compute node.
nodeDisableSchedulingOption - Specifies what to do with currently running tasks.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

disableComputeNodeScheduling

public void disableComputeNodeScheduling(String poolId, String nodeId, DisableComputeNodeSchedulingOption nodeDisableSchedulingOption, Iterable additionalBehaviors)

Disables task scheduling on the specified compute node.

Parameters:

poolId - The ID of the pool.
nodeId - The ID of the compute node.
nodeDisableSchedulingOption - Specifies what to do with currently running tasks.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

enableComputeNodeScheduling

public void enableComputeNodeScheduling(String poolId, String nodeId)

Enables task scheduling on the specified compute node.

Parameters:

poolId - The ID of the pool.
nodeId - The ID of the compute node.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

enableComputeNodeScheduling

public void enableComputeNodeScheduling(String poolId, String nodeId, Iterable additionalBehaviors)

Enables task scheduling on the specified compute node.

Parameters:

poolId - The ID of the pool.
nodeId - The ID of the compute node.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

getComputeNode

public ComputeNode getComputeNode(String poolId, String nodeId)

Gets the specified compute node.

Parameters:

poolId - The ID of the pool.
nodeId - the ID of the compute node to get from the pool.

Returns:

A ComputeNode containing information about the specified compute node.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

getComputeNode

public ComputeNode getComputeNode(String poolId, String nodeId, DetailLevel detailLevel)

Gets the specified compute node.

Parameters:

poolId - The ID of the pool.
nodeId - The ID of the compute node to get from the pool.
detailLevel - A DetailLevel used for controlling which properties are retrieved from the service.

Returns:

A ComputeNode containing information about the specified compute node.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

getComputeNode

public ComputeNode getComputeNode(String poolId, String nodeId, DetailLevel detailLevel, Iterable additionalBehaviors)

Gets the specified compute node.

Parameters:

poolId - The ID of the pool.
nodeId - The ID of the compute node to get from the pool.
detailLevel - A DetailLevel used for controlling which properties are retrieved from the service.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Returns:

A ComputeNode containing information about the specified compute node.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

getComputeNodeRemoteDesktop

public String getComputeNodeRemoteDesktop(String poolId, String nodeId)

Gets a Remote Desktop Protocol (RDP) file for the specified node.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node for which to get a Remote Desktop file.

Returns:

The RDP file contents.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

getComputeNodeRemoteDesktop

public String getComputeNodeRemoteDesktop(String poolId, String nodeId, Iterable additionalBehaviors)

Gets a Remote Desktop Protocol (RDP) file for the specified node.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node for which to get a Remote Desktop file.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Returns:

The RDP file contents.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

getComputeNodeRemoteLoginSettings

public ComputeNodeGetRemoteLoginSettingsResult getComputeNodeRemoteLoginSettings(String poolId, String nodeId)

Gets the settings required for remote login to a compute node.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node for which to get a remote login settings.

Returns:

The remote settings for the specified compute node.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

getComputeNodeRemoteLoginSettings

public ComputeNodeGetRemoteLoginSettingsResult getComputeNodeRemoteLoginSettings(String poolId, String nodeId, Iterable additionalBehaviors)

Gets the settings required for remote login to a compute node.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node for which to get a remote login settings.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Returns:

The remote login settings for the specified compute node.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

listComputeNodes

public PagedList listComputeNodes(String poolId)

Lists the ComputeNode of the specified pool.

Parameters:

poolId - The ID of the pool.

Returns:

A list of ComputeNode objects.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

listComputeNodes

public PagedList listComputeNodes(String poolId, DetailLevel detailLevel)

Lists the ComputeNode of the specified pool.

Parameters:

poolId - The ID of the pool.
detailLevel - A DetailLevel used for filtering the list and for controlling which properties are retrieved from the service.

Returns:

A list of ComputeNode objects.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

listComputeNodes

public PagedList listComputeNodes(String poolId, DetailLevel detailLevel, Iterable additionalBehaviors)

Lists the ComputeNode of the specified pool.

Parameters:

poolId - The ID of the pool.
detailLevel - A DetailLevel used for filtering the list and for controlling which properties are retrieved from the service.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Returns:

A list of ComputeNode objects.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

rebootComputeNode

public void rebootComputeNode(String poolId, String nodeId)

Reboots the specified compute node.

You can reboot a compute node only when it is in the IDLE or RUNNING state.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node to reboot.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

rebootComputeNode

public void rebootComputeNode(String poolId, String nodeId, ComputeNodeRebootOption nodeRebootOption)

Reboots the specified compute node.

You can reboot a compute node only when it is in the IDLE or RUNNING state.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node to reboot.
nodeRebootOption - Specifies when to reboot the node and what to do with currently running tasks.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

rebootComputeNode

public void rebootComputeNode(String poolId, String nodeId, ComputeNodeRebootOption nodeRebootOption, Iterable additionalBehaviors)

Reboots the specified compute node.

You can reboot a compute node only when it is in the IDLE or RUNNING state.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node to reboot.
nodeRebootOption - Specifies when to reboot the node and what to do with currently running tasks.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

reimageComputeNode

public void reimageComputeNode(String poolId, String nodeId)

Reinstalls the operating system on the specified compute node.

You can reimage a compute node only when it is in the IDLE or RUNNING state.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node to reimage.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

reimageComputeNode

public void reimageComputeNode(String poolId, String nodeId, ComputeNodeReimageOption nodeReimageOption)

Reinstalls the operating system on the specified compute node.

You can reimage a compute node only when it is in the IDLE or RUNNING state.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node to reimage.
nodeReimageOption - Specifies when to reimage the node and what to do with currently running tasks.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

reimageComputeNode

public void reimageComputeNode(String poolId, String nodeId, ComputeNodeReimageOption nodeReimageOption, Iterable additionalBehaviors)

Reinstalls the operating system on the specified compute node.

You can reimage a compute node only when it is in the IDLE or RUNNING state.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node to reimage.
nodeReimageOption - Specifies when to reimage the node and what to do with currently running tasks.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

updateComputeNodeUser

public void updateComputeNodeUser(String poolId, String nodeId, String userName, String sshPublicKey)

Updates the specified user account on the specified compute node.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node where the user account will be updated.
userName - The name of the user account to update.
sshPublicKey - The SSH public key that can be used for remote login to the compute node. If null, the SSH public key is removed.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

updateComputeNodeUser

public void updateComputeNodeUser(String poolId, String nodeId, String userName, String sshPublicKey, Iterable additionalBehaviors)

Updates the specified user account on the specified compute node.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node where the user account will be updated.
userName - The name of the user account to update.
sshPublicKey - The SSH public key that can be used for remote login to the compute node. If null, the SSH public key is removed.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

updateComputeNodeUser

public void updateComputeNodeUser(String poolId, String nodeId, String userName, String password, DateTime expiryTime)

Updates the specified user account on the specified compute node.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node where the user account will be updated.
userName - The name of the user account to update.
password - The password of the account. If null, the password is removed.
expiryTime - The time at which the account should expire. If null, the expiry time is replaced with its default value.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

updateComputeNodeUser

public void updateComputeNodeUser(String poolId, String nodeId, String userName, String password, DateTime expiryTime, Iterable additionalBehaviors)

Updates the specified user account on the specified compute node.

Parameters:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node where the user account will be updated.
userName - The name of the user account to update.
password - The password of the account. If null, the password is removed.
expiryTime - The time at which the account should expire. If null, the expiry time is replaced with its default value.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

uploadBatchServiceLogs

public UploadBatchServiceLogsResult uploadBatchServiceLogs(String poolId, String nodeId, String containerUrl, DateTime startTime)

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 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:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node from which you want to upload the Azure Batch service log files.
containerUrl - The URL of the container within Azure Blob Storage to which to upload the Batch Service log file(s).
startTime - The start of the time range from which to upload Batch Service log file(s).

Returns:

The result of uploading Batch service log files from a specific compute node.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

uploadBatchServiceLogs

public UploadBatchServiceLogsResult uploadBatchServiceLogs(String poolId, String nodeId, String containerUrl, DateTime startTime, DateTime endTime, Iterable additionalBehaviors)

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 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:

poolId - The ID of the pool that contains the compute node.
nodeId - The ID of the compute node from which you want to upload the Azure Batch service log files.
containerUrl - The URL of the container within Azure Blob Storage to which to upload the Batch Service log file(s).
startTime - The start of the time range from which to upload Batch Service log file(s).
endTime - The end of the time range from which to upload Batch Service log file(s).
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Returns:

The result of uploading Batch service log files from a specific compute node.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

withCustomBehaviors

public IInheritedBehaviors withCustomBehaviors(Collection behaviors)

Sets a collection of behaviors that modify or customize requests to the Batch service.

Parameters:

behaviors - The collection of BatchClientBehavior instances.

Returns:

The current instance.

Applies to