Interface VirtualMachineApi
-
@Consumes("application/json") public interface VirtualMachineApi
The Virtual Machine API includes operations for managing the virtual machines in your subscription.- See Also:
- docs
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description URI
capture(String name, String vhdPrefix, String destinationContainerName)
Capture the virtual machine image destinationContainerName: the name of the folder created under the "system" container in the storage account Folder structure: Microsoft.Computer > Images > destinationContainerName Within the folder, there will be 1 page blob for the osDisk vhd and 1 block blob for the vmTemplate json fileVirtualMachine
createOrUpdate(String vmname, String location, VirtualMachineProperties properties, Map<String,String> tags, Plan plan)
void
deallocate(String name)
URI
delete(String name)
void
generalize(String name)
VirtualMachine
get(String name)
VirtualMachineInstance
getInstanceDetails(String name)
Get information about the model view and instance view of a virtual machineList<VirtualMachine>
list()
List<VirtualMachine>
listAll()
List<VMSize>
listAvailableSizes(String name)
List<VirtualMachine>
listByLocation(String location)
void
restart(String name)
void
start(String name)
void
stop(String name)
-
-
-
Method Detail
-
get
@Named("GetVirtualMachine") @GET @Path("/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{name}") VirtualMachine get(@PathParam("name") String name)
-
getInstanceDetails
@Named("GetVirtualMachineInstance") @GET @Path("/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{name}/instanceView") VirtualMachineInstance getInstanceDetails(@PathParam("name") String name)
Get information about the model view and instance view of a virtual machine
-
createOrUpdate
@Named("CreateOrUpdateVirtualMachine") @PUT @Path("/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{vmname}") VirtualMachine createOrUpdate(@PathParam("vmname") String vmname, String location, VirtualMachineProperties properties, Map<String,String> tags, @Nullable Plan plan)
-
list
@Named("ListVirtualMachines") @GET @Path("/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines") List<VirtualMachine> list()
-
listAll
@Named("ListVirtualMachinesAll") @GET @Path("/providers/Microsoft.Compute/virtualMachines") List<VirtualMachine> listAll()
-
listByLocation
@Named("ListVirtualMachinesByLocation") @GET @Path("/providers/Microsoft.Compute/locations/{location}/virtualMachines") List<VirtualMachine> listByLocation(@PathParam("location") String location)
-
listAvailableSizes
@Named("ListAvailableSizes") @GET @Path("/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{name}/vmSizes") List<VMSize> listAvailableSizes(@PathParam("name") String name)
-
delete
@Named("DeleteVirtualMachine") @DELETE @Path("/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{name}") URI delete(@PathParam("name") String name)
-
restart
@Named("RestartVirtualMachine") @POST @Path("/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{name}/restart") void restart(@PathParam("name") String name)
-
start
@Named("StartVirtualMachine") @POST @Path("/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{name}/start") void start(@PathParam("name") String name)
-
stop
@Named("StopVirtualMachine") @POST @Path("/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{name}/powerOff") void stop(@PathParam("name") String name)
-
deallocate
@Named("DeallocateVirtualMachine") @POST @Path("/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{name}/deallocate") void deallocate(@PathParam("name") String name)
-
generalize
@Named("generalize") @POST @Path("/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{name}/generalize") void generalize(@PathParam("name") String name)
-
capture
@Named("capture") @POST @Path("/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{name}/capture") @Produces("application/json") URI capture(@PathParam("name") String name, String vhdPrefix, String destinationContainerName)
Capture the virtual machine image destinationContainerName: the name of the folder created under the "system" container in the storage account Folder structure: Microsoft.Computer > Images > destinationContainerName Within the folder, there will be 1 page blob for the osDisk vhd and 1 block blob for the vmTemplate json file
-
-