Interface VirtualMachines
-
public interface VirtualMachines
Resource collection API of VirtualMachines.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
createCheckpoint(String resourceGroupName, String virtualMachineName)
Creates a checkpoint in virtual machine.void
createCheckpoint(String resourceGroupName, String virtualMachineName, VirtualMachineCreateCheckpoint body)
Creates a checkpoint in virtual machine.void
createCheckpoint(String resourceGroupName, String virtualMachineName, VirtualMachineCreateCheckpoint body, com.azure.core.util.Context context)
Creates a checkpoint in virtual machine.VirtualMachine.DefinitionStages.Blank
define(String name)
Begins definition for a new VirtualMachine resource.void
delete(String resourceGroupName, String virtualMachineName)
Deletes a VirtualMachine deployed on ScVmm fabric.void
delete(String resourceGroupName, String virtualMachineName, Boolean retain, Boolean force)
Deletes a VirtualMachine deployed on ScVmm fabric.void
delete(String resourceGroupName, String virtualMachineName, Boolean retain, Boolean force, com.azure.core.util.Context context)
Deletes a VirtualMachine deployed on ScVmm fabric.void
deleteById(String id)
Deletes a VirtualMachine deployed on ScVmm fabric.void
deleteByIdWithResponse(String id, Boolean retain, Boolean force, com.azure.core.util.Context context)
Deletes a VirtualMachine deployed on ScVmm fabric.void
deleteCheckpoint(String resourceGroupName, String virtualMachineName)
Deletes a checkpoint in virtual machine.void
deleteCheckpoint(String resourceGroupName, String virtualMachineName, VirtualMachineDeleteCheckpoint body)
Deletes a checkpoint in virtual machine.void
deleteCheckpoint(String resourceGroupName, String virtualMachineName, VirtualMachineDeleteCheckpoint body, com.azure.core.util.Context context)
Deletes a checkpoint in virtual machine.VirtualMachine
getById(String id)
Implements VirtualMachine GET method.com.azure.core.http.rest.Response<VirtualMachine>
getByIdWithResponse(String id, com.azure.core.util.Context context)
Implements VirtualMachine GET method.VirtualMachine
getByResourceGroup(String resourceGroupName, String virtualMachineName)
Implements VirtualMachine GET method.com.azure.core.http.rest.Response<VirtualMachine>
getByResourceGroupWithResponse(String resourceGroupName, String virtualMachineName, com.azure.core.util.Context context)
Implements VirtualMachine GET method.com.azure.core.http.rest.PagedIterable<VirtualMachine>
list()
List of VirtualMachines in a subscription.com.azure.core.http.rest.PagedIterable<VirtualMachine>
list(com.azure.core.util.Context context)
List of VirtualMachines in a subscription.com.azure.core.http.rest.PagedIterable<VirtualMachine>
listByResourceGroup(String resourceGroupName)
List of VirtualMachines in a resource group.com.azure.core.http.rest.PagedIterable<VirtualMachine>
listByResourceGroup(String resourceGroupName, com.azure.core.util.Context context)
List of VirtualMachines in a resource group.void
restart(String resourceGroupName, String virtualMachineName)
Restart virtual machine.void
restart(String resourceGroupName, String virtualMachineName, com.azure.core.util.Context context)
Restart virtual machine.void
restoreCheckpoint(String resourceGroupName, String virtualMachineName)
Restores to a checkpoint in virtual machine.void
restoreCheckpoint(String resourceGroupName, String virtualMachineName, VirtualMachineRestoreCheckpoint body)
Restores to a checkpoint in virtual machine.void
restoreCheckpoint(String resourceGroupName, String virtualMachineName, VirtualMachineRestoreCheckpoint body, com.azure.core.util.Context context)
Restores to a checkpoint in virtual machine.void
start(String resourceGroupName, String virtualMachineName)
Start virtual machine.void
start(String resourceGroupName, String virtualMachineName, com.azure.core.util.Context context)
Start virtual machine.void
stop(String resourceGroupName, String virtualMachineName)
Stop virtual machine.void
stop(String resourceGroupName, String virtualMachineName, StopVirtualMachineOptions body)
Stop virtual machine.void
stop(String resourceGroupName, String virtualMachineName, StopVirtualMachineOptions body, com.azure.core.util.Context context)
Stop virtual machine.
-
-
-
Method Detail
-
getByResourceGroup
VirtualMachine getByResourceGroup(String resourceGroupName, String virtualMachineName)
Implements VirtualMachine GET method.- Parameters:
resourceGroupName
- The name of the resource group.virtualMachineName
- Name of the VirtualMachine.- Returns:
- the VirtualMachines resource definition.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
getByResourceGroupWithResponse
com.azure.core.http.rest.Response<VirtualMachine> getByResourceGroupWithResponse(String resourceGroupName, String virtualMachineName, com.azure.core.util.Context context)
Implements VirtualMachine GET method.- Parameters:
resourceGroupName
- The name of the resource group.virtualMachineName
- Name of the VirtualMachine.context
- The context to associate with this operation.- Returns:
- the VirtualMachines resource definition along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
delete
void delete(String resourceGroupName, String virtualMachineName, Boolean retain, Boolean force)
Deletes a VirtualMachine deployed on ScVmm fabric.- Parameters:
resourceGroupName
- The name of the resource group.virtualMachineName
- Name of the VirtualMachine.retain
- Whether to just disable the VM from azure and retain the VM in the VMM.force
- Forces the resource to be deleted from azure. The corresponding CR would be attempted to be deleted too.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
delete
void delete(String resourceGroupName, String virtualMachineName)
Deletes a VirtualMachine deployed on ScVmm fabric.- Parameters:
resourceGroupName
- The name of the resource group.virtualMachineName
- Name of the VirtualMachine.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
delete
void delete(String resourceGroupName, String virtualMachineName, Boolean retain, Boolean force, com.azure.core.util.Context context)
Deletes a VirtualMachine deployed on ScVmm fabric.- Parameters:
resourceGroupName
- The name of the resource group.virtualMachineName
- Name of the VirtualMachine.retain
- Whether to just disable the VM from azure and retain the VM in the VMM.force
- Forces the resource to be deleted from azure. The corresponding CR would be attempted to be deleted too.context
- The context to associate with this operation.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
stop
void stop(String resourceGroupName, String virtualMachineName, StopVirtualMachineOptions body)
Stop virtual machine.- Parameters:
resourceGroupName
- The name of the resource group.virtualMachineName
- Name of the VirtualMachine.body
- Virtualmachine stop action payload.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
stop
void stop(String resourceGroupName, String virtualMachineName)
Stop virtual machine.- Parameters:
resourceGroupName
- The name of the resource group.virtualMachineName
- Name of the VirtualMachine.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
stop
void stop(String resourceGroupName, String virtualMachineName, StopVirtualMachineOptions body, com.azure.core.util.Context context)
Stop virtual machine.- Parameters:
resourceGroupName
- The name of the resource group.virtualMachineName
- Name of the VirtualMachine.body
- Virtualmachine stop action payload.context
- The context to associate with this operation.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
start
void start(String resourceGroupName, String virtualMachineName)
Start virtual machine.- Parameters:
resourceGroupName
- The name of the resource group.virtualMachineName
- Name of the VirtualMachine.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
start
void start(String resourceGroupName, String virtualMachineName, com.azure.core.util.Context context)
Start virtual machine.- Parameters:
resourceGroupName
- The name of the resource group.virtualMachineName
- Name of the VirtualMachine.context
- The context to associate with this operation.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
restart
void restart(String resourceGroupName, String virtualMachineName)
Restart virtual machine.- Parameters:
resourceGroupName
- The name of the resource group.virtualMachineName
- Name of the VirtualMachine.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
restart
void restart(String resourceGroupName, String virtualMachineName, com.azure.core.util.Context context)
Restart virtual machine.- Parameters:
resourceGroupName
- The name of the resource group.virtualMachineName
- Name of the VirtualMachine.context
- The context to associate with this operation.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
createCheckpoint
void createCheckpoint(String resourceGroupName, String virtualMachineName, VirtualMachineCreateCheckpoint body)
Creates a checkpoint in virtual machine.- Parameters:
resourceGroupName
- The name of the resource group.virtualMachineName
- Name of the VirtualMachine.body
- Virtualmachine create checkpoint action payload.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
createCheckpoint
void createCheckpoint(String resourceGroupName, String virtualMachineName)
Creates a checkpoint in virtual machine.- Parameters:
resourceGroupName
- The name of the resource group.virtualMachineName
- Name of the VirtualMachine.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
createCheckpoint
void createCheckpoint(String resourceGroupName, String virtualMachineName, VirtualMachineCreateCheckpoint body, com.azure.core.util.Context context)
Creates a checkpoint in virtual machine.- Parameters:
resourceGroupName
- The name of the resource group.virtualMachineName
- Name of the VirtualMachine.body
- Virtualmachine create checkpoint action payload.context
- The context to associate with this operation.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
deleteCheckpoint
void deleteCheckpoint(String resourceGroupName, String virtualMachineName, VirtualMachineDeleteCheckpoint body)
Deletes a checkpoint in virtual machine.- Parameters:
resourceGroupName
- The name of the resource group.virtualMachineName
- Name of the VirtualMachine.body
- Virtualmachine delete checkpoint action payload.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
deleteCheckpoint
void deleteCheckpoint(String resourceGroupName, String virtualMachineName)
Deletes a checkpoint in virtual machine.- Parameters:
resourceGroupName
- The name of the resource group.virtualMachineName
- Name of the VirtualMachine.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
deleteCheckpoint
void deleteCheckpoint(String resourceGroupName, String virtualMachineName, VirtualMachineDeleteCheckpoint body, com.azure.core.util.Context context)
Deletes a checkpoint in virtual machine.- Parameters:
resourceGroupName
- The name of the resource group.virtualMachineName
- Name of the VirtualMachine.body
- Virtualmachine delete checkpoint action payload.context
- The context to associate with this operation.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
restoreCheckpoint
void restoreCheckpoint(String resourceGroupName, String virtualMachineName, VirtualMachineRestoreCheckpoint body)
Restores to a checkpoint in virtual machine.- Parameters:
resourceGroupName
- The name of the resource group.virtualMachineName
- Name of the VirtualMachine.body
- Virtualmachine restore checkpoint action payload.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
restoreCheckpoint
void restoreCheckpoint(String resourceGroupName, String virtualMachineName)
Restores to a checkpoint in virtual machine.- Parameters:
resourceGroupName
- The name of the resource group.virtualMachineName
- Name of the VirtualMachine.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
restoreCheckpoint
void restoreCheckpoint(String resourceGroupName, String virtualMachineName, VirtualMachineRestoreCheckpoint body, com.azure.core.util.Context context)
Restores to a checkpoint in virtual machine.- Parameters:
resourceGroupName
- The name of the resource group.virtualMachineName
- Name of the VirtualMachine.body
- Virtualmachine restore checkpoint action payload.context
- The context to associate with this operation.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
listByResourceGroup
com.azure.core.http.rest.PagedIterable<VirtualMachine> listByResourceGroup(String resourceGroupName)
List of VirtualMachines in a resource group.- Parameters:
resourceGroupName
- The name of the resource group.- Returns:
- list of VirtualMachines as paginated response with
PagedIterable
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
listByResourceGroup
com.azure.core.http.rest.PagedIterable<VirtualMachine> listByResourceGroup(String resourceGroupName, com.azure.core.util.Context context)
List of VirtualMachines in a resource group.- Parameters:
resourceGroupName
- The name of the resource group.context
- The context to associate with this operation.- Returns:
- list of VirtualMachines as paginated response with
PagedIterable
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
list
com.azure.core.http.rest.PagedIterable<VirtualMachine> list()
List of VirtualMachines in a subscription.- Returns:
- list of VirtualMachines as paginated response with
PagedIterable
. - Throws:
com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
list
com.azure.core.http.rest.PagedIterable<VirtualMachine> list(com.azure.core.util.Context context)
List of VirtualMachines in a subscription.- Parameters:
context
- The context to associate with this operation.- Returns:
- list of VirtualMachines as paginated response with
PagedIterable
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
getById
VirtualMachine getById(String id)
Implements VirtualMachine GET method.- Parameters:
id
- the resource ID.- Returns:
- the VirtualMachines resource definition along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
getByIdWithResponse
com.azure.core.http.rest.Response<VirtualMachine> getByIdWithResponse(String id, com.azure.core.util.Context context)
Implements VirtualMachine GET method.- Parameters:
id
- the resource ID.context
- The context to associate with this operation.- Returns:
- the VirtualMachines resource definition along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
deleteById
void deleteById(String id)
Deletes a VirtualMachine deployed on ScVmm fabric.- Parameters:
id
- the resource ID.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
deleteByIdWithResponse
void deleteByIdWithResponse(String id, Boolean retain, Boolean force, com.azure.core.util.Context context)
Deletes a VirtualMachine deployed on ScVmm fabric.- Parameters:
id
- the resource ID.retain
- Whether to just disable the VM from azure and retain the VM in the VMM.force
- Forces the resource to be deleted from azure. The corresponding CR would be attempted to be deleted too.context
- The context to associate with this operation.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
define
VirtualMachine.DefinitionStages.Blank define(String name)
Begins definition for a new VirtualMachine resource.- Parameters:
name
- resource name.- Returns:
- the first stage of the new VirtualMachine definition.
-
-