Interface VirtualMachines

    • Method Detail

      • deallocate

        void deallocate​(String groupName,
                        String name)
        Shuts down the virtual machine and releases the compute resources.
        Parameters:
        groupName - the name of the resource group the virtual machine is in
        name - the virtual machine name
      • deallocateAsync

        Mono<Void> deallocateAsync​(String groupName,
                                   String name)
        Shuts down the virtual machine and releases the compute resources asynchronously.
        Parameters:
        groupName - the name of the resource group the virtual machine is in
        name - the virtual machine name
        Returns:
        a representation of the deferred computation of this call
      • deallocate

        void deallocate​(String groupName,
                        String name,
                        boolean hibernate)
        Shuts down the virtual machine and releases the compute resources.
        Parameters:
        groupName - the name of the resource group the virtual machine is in
        name - the virtual machine name
        hibernate - hibernate the virtual machine
      • deallocateAsync

        Mono<Void> deallocateAsync​(String groupName,
                                   String name,
                                   boolean hibernate)
        Shuts down the virtual machine and releases the compute resources asynchronously.
        Parameters:
        groupName - the name of the resource group the virtual machine is in
        name - the virtual machine name
        hibernate - hibernate the virtual machine
        Returns:
        a representation of the deferred computation of this call
      • generalize

        void generalize​(String groupName,
                        String name)
        Generalizes the virtual machine.
        Parameters:
        groupName - the name of the resource group the virtual machine is in
        name - the virtual machine name
      • generalizeAsync

        Mono<Void> generalizeAsync​(String groupName,
                                   String name)
        Generalizes the virtual machine asynchronously.
        Parameters:
        groupName - the name of the resource group the virtual machine is in
        name - the virtual machine name
        Returns:
        a representation of the deferred computation of this call
      • powerOff

        void powerOff​(String groupName,
                      String name)
        Powers off (stops) a virtual machine.
        Parameters:
        groupName - the name of the resource group the virtual machine is in
        name - the virtual machine name
      • powerOffAsync

        Mono<Void> powerOffAsync​(String groupName,
                                 String name)
        Powers off (stops) the virtual machine asynchronously.
        Parameters:
        groupName - the name of the resource group the virtual machine is in
        name - the virtual machine name
        Returns:
        a representation of the deferred computation of this call
      • restart

        void restart​(String groupName,
                     String name)
        Restarts a virtual machine.
        Parameters:
        groupName - the name of the resource group the virtual machine is in
        name - the virtual machine name
      • restartAsync

        Mono<Void> restartAsync​(String groupName,
                                String name)
        Restarts the virtual machine asynchronously.
        Parameters:
        groupName - the name of the resource group the virtual machine is in
        name - the virtual machine name
        Returns:
        a representation of the deferred computation of this call
      • start

        void start​(String groupName,
                   String name)
        Starts a virtual machine.
        Parameters:
        groupName - the name of the resource group the virtual machine is in
        name - the virtual machine name
      • startAsync

        Mono<Void> startAsync​(String groupName,
                              String name)
        Starts the virtual machine asynchronously.
        Parameters:
        groupName - the name of the resource group the virtual machine is in
        name - the virtual machine name
        Returns:
        a representation of the deferred computation of this call
      • redeploy

        void redeploy​(String groupName,
                      String name)
        Redeploys a virtual machine.
        Parameters:
        groupName - the name of the resource group the virtual machine is in
        name - the virtual machine name
      • redeployAsync

        Mono<Void> redeployAsync​(String groupName,
                                 String name)
        Redeploys the virtual machine asynchronously.
        Parameters:
        groupName - the name of the resource group the virtual machine is in
        name - the virtual machine name
        Returns:
        a representation of the deferred computation of this call
      • capture

        String capture​(String groupName,
                       String name,
                       String containerName,
                       String vhdPrefix,
                       boolean overwriteVhd)
        Captures the virtual machine by copying virtual hard disks of the VM and returns template as a JSON string that can be used to create similar VMs.
        Parameters:
        groupName - the resource group name
        name - the virtual machine name
        containerName - destination container name to store the captured VHD
        vhdPrefix - the prefix for the VHD holding captured image
        overwriteVhd - whether to overwrites destination VHD if it exists
        Returns:
        the template as JSON string
      • captureAsync

        Mono<String> captureAsync​(String groupName,
                                  String name,
                                  String containerName,
                                  String vhdPrefix,
                                  boolean overwriteVhd)
        Captures the virtual machine by copying virtual hard disks of the VM asynchronously.
        Parameters:
        groupName - the resource group name
        name - the virtual machine name
        containerName - destination container name to store the captured VHD
        vhdPrefix - the prefix for the VHD holding captured image
        overwriteVhd - whether to overwrites destination VHD if it exists
        Returns:
        a representation of the deferred computation of this call
      • migrateToManaged

        void migrateToManaged​(String groupName,
                              String name)
        Migrates the virtual machine with unmanaged disks to use managed disks.
        Parameters:
        groupName - the resource group name
        name - the virtual machine name
      • migrateToManagedAsync

        Mono<Void> migrateToManagedAsync​(String groupName,
                                         String name)
        Converts (migrates) the virtual machine with un-managed disks to use managed disk asynchronously.
        Parameters:
        groupName - the resource group name
        name - the virtual machine name
        Returns:
        a representation of the deferred computation of this call
      • runPowerShellScript

        RunCommandResult runPowerShellScript​(String groupName,
                                             String name,
                                             List<String> scriptLines,
                                             List<RunCommandInputParameter> scriptParameters)
        Run shell script in a virtual machine.
        Parameters:
        groupName - the resource group name
        name - the virtual machine name
        scriptLines - PowerShell script lines
        scriptParameters - script parameters
        Returns:
        result of PowerShell script execution
      • runPowerShellScriptAsync

        Mono<RunCommandResult> runPowerShellScriptAsync​(String groupName,
                                                        String name,
                                                        List<String> scriptLines,
                                                        List<RunCommandInputParameter> scriptParameters)
        Run shell script in a virtual machine asynchronously.
        Parameters:
        groupName - the resource group name
        name - the virtual machine name
        scriptLines - PowerShell script lines
        scriptParameters - script parameters
        Returns:
        handle to the asynchronous execution
      • runShellScript

        RunCommandResult runShellScript​(String groupName,
                                        String name,
                                        List<String> scriptLines,
                                        List<RunCommandInputParameter> scriptParameters)
        Run shell script in a virtual machine.
        Parameters:
        groupName - the resource group name
        name - the virtual machine name
        scriptLines - shell script lines
        scriptParameters - script parameters
        Returns:
        result of shell script execution
      • runShellScriptAsync

        Mono<RunCommandResult> runShellScriptAsync​(String groupName,
                                                   String name,
                                                   List<String> scriptLines,
                                                   List<RunCommandInputParameter> scriptParameters)
        Run shell script in a virtual machine asynchronously.
        Parameters:
        groupName - the resource group name
        name - the virtual machine name
        scriptLines - shell script lines
        scriptParameters - script parameters
        Returns:
        handle to the asynchronous execution
      • runCommand

        RunCommandResult runCommand​(String groupName,
                                    String name,
                                    RunCommandInput inputCommand)
        Run commands in a virtual machine.
        Parameters:
        groupName - the resource group name
        name - the virtual machine name
        inputCommand - command input
        Returns:
        result of execution
      • runCommandAsync

        Mono<RunCommandResult> runCommandAsync​(String groupName,
                                               String name,
                                               RunCommandInput inputCommand)
        Run commands in a virtual machine asynchronously.
        Parameters:
        groupName - the resource group name
        name - the virtual machine name
        inputCommand - command input
        Returns:
        handle to the asynchronous execution
      • beginDeleteById

        Accepted<Void> beginDeleteById​(String id)
        Begins deleting a virtual machine from Azure, identifying it by its resource ID.
        Parameters:
        id - the resource ID of the virtual machine to delete
        Returns:
        the accepted deleting operation
      • beginDeleteByResourceGroup

        Accepted<Void> beginDeleteByResourceGroup​(String resourceGroupName,
                                                  String name)
        Begins deleting a virtual machine from Azure, identifying it by its name and its resource group.
        Parameters:
        resourceGroupName - the resource group the resource is part of
        name - the virtual machine name
        Returns:
        the accepted deleting operation
      • deleteById

        void deleteById​(String id,
                        boolean forceDeletion)
        Force delete a resource from Azure, identifying it by its resource ID.
        Parameters:
        id - the resource ID of the resource to delete
        forceDeletion - force delete without graceful shutdown
      • deleteByIdAsync

        Mono<Void> deleteByIdAsync​(String id,
                                   boolean forceDeletion)
        Asynchronously force delete a resource from Azure, identifying it by its resource ID.
        Parameters:
        id - the resource ID of the resource to delete
        forceDeletion - force delete without graceful shutdown
        Returns:
        a representation of the deferred computation of this call
      • deleteByResourceGroup

        void deleteByResourceGroup​(String resourceGroupName,
                                   String name,
                                   boolean forceDeletion)
        Force delete a resource from Azure, identifying it by its name and its resource group.
        Parameters:
        resourceGroupName - the resource group the resource is part of
        name - the name of the resource
        forceDeletion - force delete without graceful shutdown
      • deleteByResourceGroupAsync

        Mono<Void> deleteByResourceGroupAsync​(String resourceGroupName,
                                              String name,
                                              boolean forceDeletion)
        Asynchronously force delete a resource from Azure, identifying it by its name and its resource group.
        Parameters:
        resourceGroupName - the resource group the resource is part of
        name - the name of the resource
        forceDeletion - force delete without graceful shutdown
        Returns:
        a representation of the deferred computation of this call
      • beginDeleteById

        Accepted<Void> beginDeleteById​(String id,
                                       boolean forceDeletion)
        Begins force deleting a virtual machine from Azure, identifying it by its resource ID.
        Parameters:
        id - the resource ID of the virtual machine to delete
        forceDeletion - force delete without graceful shutdown
        Returns:
        the accepted deleting operation
      • beginDeleteByResourceGroup

        Accepted<Void> beginDeleteByResourceGroup​(String resourceGroupName,
                                                  String name,
                                                  boolean forceDeletion)
        Begins force deleting a virtual machine from Azure, identifying it by its name and its resource group.
        Parameters:
        resourceGroupName - the resource group the resource is part of
        name - the virtual machine name
        forceDeletion - force delete without graceful shutdown
        Returns:
        the accepted deleting operation