Class ComputeNodeOperations

    • Method Detail

      • addComputeNodeUser

        public void addComputeNodeUser​(String poolId,
                                       String nodeId,
                                       ComputeNodeUser user)
                                throws BatchErrorException,
                                       IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • addComputeNodeUser

        public void addComputeNodeUser​(String poolId,
                                       String nodeId,
                                       ComputeNodeUser user,
                                       Iterable<BatchClientBehavior> additionalBehaviors)
                                throws BatchErrorException,
                                       IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • deleteComputeNodeUser

        public void deleteComputeNodeUser​(String poolId,
                                          String nodeId,
                                          String userName)
                                   throws BatchErrorException,
                                          IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • deleteComputeNodeUser

        public void deleteComputeNodeUser​(String poolId,
                                          String nodeId,
                                          String userName,
                                          Iterable<BatchClientBehavior> additionalBehaviors)
                                   throws BatchErrorException,
                                          IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • updateComputeNodeUser

        public void updateComputeNodeUser​(String poolId,
                                          String nodeId,
                                          String userName,
                                          String password,
                                          org.joda.time.DateTime expiryTime)
                                   throws BatchErrorException,
                                          IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • updateComputeNodeUser

        public void updateComputeNodeUser​(String poolId,
                                          String nodeId,
                                          String userName,
                                          String password,
                                          org.joda.time.DateTime expiryTime,
                                          Iterable<BatchClientBehavior> additionalBehaviors)
                                   throws BatchErrorException,
                                          IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • updateComputeNodeUser

        public void updateComputeNodeUser​(String poolId,
                                          String nodeId,
                                          String userName,
                                          String sshPublicKey)
                                   throws BatchErrorException,
                                          IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • updateComputeNodeUser

        public void updateComputeNodeUser​(String poolId,
                                          String nodeId,
                                          String userName,
                                          String sshPublicKey,
                                          Iterable<BatchClientBehavior> additionalBehaviors)
                                   throws BatchErrorException,
                                          IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • getComputeNode

        public ComputeNode getComputeNode​(String poolId,
                                          String nodeId)
                                   throws BatchErrorException,
                                          IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • getComputeNode

        public ComputeNode getComputeNode​(String poolId,
                                          String nodeId,
                                          DetailLevel detailLevel)
                                   throws BatchErrorException,
                                          IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • getComputeNode

        public ComputeNode getComputeNode​(String poolId,
                                          String nodeId,
                                          DetailLevel detailLevel,
                                          Iterable<BatchClientBehavior> additionalBehaviors)
                                   throws BatchErrorException,
                                          IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • rebootComputeNode

        public void rebootComputeNode​(String poolId,
                                      String nodeId)
                               throws BatchErrorException,
                                      IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • rebootComputeNode

        public void rebootComputeNode​(String poolId,
                                      String nodeId,
                                      ComputeNodeRebootOption nodeRebootOption)
                               throws BatchErrorException,
                                      IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • rebootComputeNode

        public void rebootComputeNode​(String poolId,
                                      String nodeId,
                                      ComputeNodeRebootOption nodeRebootOption,
                                      Iterable<BatchClientBehavior> additionalBehaviors)
                               throws BatchErrorException,
                                      IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • reimageComputeNode

        public void reimageComputeNode​(String poolId,
                                       String nodeId)
                                throws BatchErrorException,
                                       IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • reimageComputeNode

        public void reimageComputeNode​(String poolId,
                                       String nodeId,
                                       ComputeNodeReimageOption nodeReimageOption)
                                throws BatchErrorException,
                                       IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • reimageComputeNode

        public void reimageComputeNode​(String poolId,
                                       String nodeId,
                                       ComputeNodeReimageOption nodeReimageOption,
                                       Iterable<BatchClientBehavior> additionalBehaviors)
                                throws BatchErrorException,
                                       IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • disableComputeNodeScheduling

        public void disableComputeNodeScheduling​(String poolId,
                                                 String nodeId)
                                          throws BatchErrorException,
                                                 IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • disableComputeNodeScheduling

        public void disableComputeNodeScheduling​(String poolId,
                                                 String nodeId,
                                                 DisableComputeNodeSchedulingOption nodeDisableSchedulingOption)
                                          throws BatchErrorException,
                                                 IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • disableComputeNodeScheduling

        public void disableComputeNodeScheduling​(String poolId,
                                                 String nodeId,
                                                 DisableComputeNodeSchedulingOption nodeDisableSchedulingOption,
                                                 Iterable<BatchClientBehavior> additionalBehaviors)
                                          throws BatchErrorException,
                                                 IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • enableComputeNodeScheduling

        public void enableComputeNodeScheduling​(String poolId,
                                                String nodeId)
                                         throws BatchErrorException,
                                                IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • enableComputeNodeScheduling

        public void enableComputeNodeScheduling​(String poolId,
                                                String nodeId,
                                                Iterable<BatchClientBehavior> additionalBehaviors)
                                         throws BatchErrorException,
                                                IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • getComputeNodeRemoteDesktop

        public String getComputeNodeRemoteDesktop​(String poolId,
                                                  String nodeId)
                                           throws BatchErrorException,
                                                  IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • getComputeNodeRemoteDesktop

        public String getComputeNodeRemoteDesktop​(String poolId,
                                                  String nodeId,
                                                  Iterable<BatchClientBehavior> additionalBehaviors)
                                           throws BatchErrorException,
                                                  IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • getComputeNodeRemoteLoginSettings

        public ComputeNodeGetRemoteLoginSettingsResult getComputeNodeRemoteLoginSettings​(String poolId,
                                                                                         String nodeId)
                                                                                  throws BatchErrorException,
                                                                                         IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • getComputeNodeRemoteLoginSettings

        public ComputeNodeGetRemoteLoginSettingsResult getComputeNodeRemoteLoginSettings​(String poolId,
                                                                                         String nodeId,
                                                                                         Iterable<BatchClientBehavior> additionalBehaviors)
                                                                                  throws BatchErrorException,
                                                                                         IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • listComputeNodes

        public com.microsoft.azure.PagedList<ComputeNode> listComputeNodes​(String poolId)
                                                                    throws BatchErrorException,
                                                                           IOException
        Lists the compute nodes 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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • listComputeNodes

        public com.microsoft.azure.PagedList<ComputeNode> listComputeNodes​(String poolId,
                                                                           DetailLevel detailLevel)
                                                                    throws BatchErrorException,
                                                                           IOException
        Lists the compute nodes 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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • uploadBatchServiceLogs

        public UploadBatchServiceLogsResult uploadBatchServiceLogs​(String poolId,
                                                                   String nodeId,
                                                                   String containerUrl,
                                                                   org.joda.time.DateTime startTime)
                                                            throws BatchErrorException,
                                                                   IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.
      • uploadBatchServiceLogs

        public UploadBatchServiceLogsResult uploadBatchServiceLogs​(String poolId,
                                                                   String nodeId,
                                                                   String containerUrl,
                                                                   org.joda.time.DateTime startTime,
                                                                   org.joda.time.DateTime endTime,
                                                                   Iterable<BatchClientBehavior> additionalBehaviors)
                                                            throws BatchErrorException,
                                                                   IOException
        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 there is an error in serialization/deserialization of data sent to/received from the Batch service.