Interface VirtualMachines
public interface VirtualMachines
Resource collection API of VirtualMachines.
-
Method Summary
Modifier and TypeMethodDescriptionassessPatches
(String resourceGroupName, String name) The operation to assess patches on a vSphere VMware machine identity in Azure.assessPatches
(String resourceGroupName, String name, com.azure.core.util.Context context) The operation to assess patches on a vSphere VMware machine identity in Azure.Begins definition for a new VirtualMachine resource.void
Deletes an virtual machine.void
Deletes an virtual machine.void
delete
(String resourceGroupName, String virtualMachineName, Boolean force, Boolean retain, com.azure.core.util.Context context) Deletes an virtual machine.void
deleteById
(String id) Deletes an virtual machine.void
deleteByIdWithResponse
(String id, Boolean force, Boolean retain, com.azure.core.util.Context context) Deletes an virtual machine.Gets a virtual machine.com.azure.core.http.rest.Response<VirtualMachine>
getByIdWithResponse
(String id, com.azure.core.util.Context context) Gets a virtual machine.getByResourceGroup
(String resourceGroupName, String virtualMachineName) Gets a virtual machine.com.azure.core.http.rest.Response<VirtualMachine>
getByResourceGroupWithResponse
(String resourceGroupName, String virtualMachineName, com.azure.core.util.Context context) Gets a virtual machine.installPatches
(String resourceGroupName, String name, VirtualMachineInstallPatchesParameters installPatchesInput) The operation to install patches on a vSphere VMware machine identity in Azure.installPatches
(String resourceGroupName, String name, VirtualMachineInstallPatchesParameters installPatchesInput, com.azure.core.util.Context context) The operation to install patches on a vSphere VMware machine identity in Azure.com.azure.core.http.rest.PagedIterable<VirtualMachine>
list()
Implements GET virtualMachines in a subscription.com.azure.core.http.rest.PagedIterable<VirtualMachine>
list
(com.azure.core.util.Context context) Implements GET virtualMachines in a subscription.com.azure.core.http.rest.PagedIterable<VirtualMachine>
listByResourceGroup
(String resourceGroupName) Implements GET virtualMachines in a resource group.com.azure.core.http.rest.PagedIterable<VirtualMachine>
listByResourceGroup
(String resourceGroupName, com.azure.core.util.Context context) Implements GET virtualMachines in a resource group.void
Implements the operation to restart a virtual machine.void
Implements the operation to restart a virtual machine.void
Implements the operation to start a virtual machine.void
Implements the operation to start a virtual machine.void
Implements the operation to stop a virtual machine.void
stop
(String resourceGroupName, String virtualMachineName, StopVirtualMachineOptions body) Implements the operation to stop a virtual machine.void
stop
(String resourceGroupName, String virtualMachineName, StopVirtualMachineOptions body, com.azure.core.util.Context context) Implements the operation to stop a virtual machine.
-
Method Details
-
assessPatches
The operation to assess patches on a vSphere VMware machine identity in Azure.- Parameters:
resourceGroupName
- The name of the resource group.name
- The name of the vSphere VMware machine.- Returns:
- describes the properties of an AssessPatches result.
- 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.
-
assessPatches
VirtualMachineAssessPatchesResult assessPatches(String resourceGroupName, String name, com.azure.core.util.Context context) The operation to assess patches on a vSphere VMware machine identity in Azure.- Parameters:
resourceGroupName
- The name of the resource group.name
- The name of the vSphere VMware machine.context
- The context to associate with this operation.- Returns:
- describes the properties of an AssessPatches result.
- 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.
-
installPatches
VirtualMachineInstallPatchesResult installPatches(String resourceGroupName, String name, VirtualMachineInstallPatchesParameters installPatchesInput) The operation to install patches on a vSphere VMware machine identity in Azure.- Parameters:
resourceGroupName
- The name of the resource group.name
- The name of the vSphere VMware machine.installPatchesInput
- Input for InstallPatches as directly received by the API.- Returns:
- the result summary of an installation 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.
-
installPatches
VirtualMachineInstallPatchesResult installPatches(String resourceGroupName, String name, VirtualMachineInstallPatchesParameters installPatchesInput, com.azure.core.util.Context context) The operation to install patches on a vSphere VMware machine identity in Azure.- Parameters:
resourceGroupName
- The name of the resource group.name
- The name of the vSphere VMware machine.installPatchesInput
- Input for InstallPatches as directly received by the API.context
- The context to associate with this operation.- Returns:
- the result summary of an installation 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.
-
getByResourceGroup
Gets a virtual machine.Implements virtual machine GET method.
- Parameters:
resourceGroupName
- The Resource Group Name.virtualMachineName
- Name of the virtual machine resource.- Returns:
- define 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.
-
getByResourceGroupWithResponse
com.azure.core.http.rest.Response<VirtualMachine> getByResourceGroupWithResponse(String resourceGroupName, String virtualMachineName, com.azure.core.util.Context context) Gets a virtual machine.Implements virtual machine GET method.
- Parameters:
resourceGroupName
- The Resource Group Name.virtualMachineName
- Name of the virtual machine resource.context
- The context to associate with this operation.- Returns:
- define the virtualMachine 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
Deletes an virtual machine.Implements virtual machine DELETE method.
- Parameters:
resourceGroupName
- The Resource Group Name.virtualMachineName
- Name of the virtual machine resource.force
- Whether force delete was specified.retain
- Whether to just disable the VM from azure and retain the VM in the VMM.- 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
Deletes an virtual machine.Implements virtual machine DELETE method.
- Parameters:
resourceGroupName
- The Resource Group Name.virtualMachineName
- Name of the virtual machine resource.- 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 force, Boolean retain, com.azure.core.util.Context context) Deletes an virtual machine.Implements virtual machine DELETE method.
- Parameters:
resourceGroupName
- The Resource Group Name.virtualMachineName
- Name of the virtual machine resource.force
- Whether force delete was specified.retain
- Whether to just disable the VM from azure and retain the VM in the VMM.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
Implements the operation to stop a virtual machine.Stop virtual machine.
- Parameters:
resourceGroupName
- The Resource Group Name.virtualMachineName
- Name of the virtual machine resource.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
Implements the operation to stop a virtual machine.Stop virtual machine.
- Parameters:
resourceGroupName
- The Resource Group Name.virtualMachineName
- Name of the virtual machine resource.- 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) Implements the operation to stop a virtual machine.Stop virtual machine.
- Parameters:
resourceGroupName
- The Resource Group Name.virtualMachineName
- Name of the virtual machine resource.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
Implements the operation to start a virtual machine.Start virtual machine.
- Parameters:
resourceGroupName
- The Resource Group Name.virtualMachineName
- Name of the virtual machine resource.- 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) Implements the operation to start a virtual machine.Start virtual machine.
- Parameters:
resourceGroupName
- The Resource Group Name.virtualMachineName
- Name of the virtual machine resource.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
Implements the operation to restart a virtual machine.Restart virtual machine.
- Parameters:
resourceGroupName
- The Resource Group Name.virtualMachineName
- Name of the virtual machine resource.- 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) Implements the operation to restart a virtual machine.Restart virtual machine.
- Parameters:
resourceGroupName
- The Resource Group Name.virtualMachineName
- Name of the virtual machine resource.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.
-
list
com.azure.core.http.rest.PagedIterable<VirtualMachine> list()Implements GET virtualMachines in a subscription.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
Implements GET virtualMachines in a subscription.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.
-
listByResourceGroup
com.azure.core.http.rest.PagedIterable<VirtualMachine> listByResourceGroup(String resourceGroupName) Implements GET virtualMachines in a resource group.List of virtualMachines in a resource group.
- Parameters:
resourceGroupName
- The Resource Group Name.- 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) Implements GET virtualMachines in a resource group.List of virtualMachines in a resource group.
- Parameters:
resourceGroupName
- The Resource Group Name.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
Gets a virtual machine.Implements virtual machine GET method.
- Parameters:
id
- the resource ID.- Returns:
- define the virtualMachine 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) Gets a virtual machine.Implements virtual machine GET method.
- Parameters:
id
- the resource ID.context
- The context to associate with this operation.- Returns:
- define the virtualMachine 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
Deletes an virtual machine.Implements virtual machine DELETE method.
- 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 force, Boolean retain, com.azure.core.util.Context context) Deletes an virtual machine.Implements virtual machine DELETE method.
- Parameters:
id
- the resource ID.force
- Whether force delete was specified.retain
- Whether to just disable the VM from azure and retain the VM in the VMM.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
Begins definition for a new VirtualMachine resource.- Parameters:
name
- resource name.- Returns:
- the first stage of the new VirtualMachine definition.
-