@Consumes(value="application/json")
public interface VirtualMachineApi
Modifier and Type | Method and 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 file
|
VirtualMachine |
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 machine
|
List<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) |
@Named(value="GetVirtualMachine") @GET @Path(value="/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{name}") VirtualMachine get(@PathParam(value="name") String name)
@Named(value="GetVirtualMachineInstance") @GET @Path(value="/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{name}/instanceView") VirtualMachineInstance getInstanceDetails(@PathParam(value="name") String name)
@Named(value="CreateOrUpdateVirtualMachine") @PUT @Path(value="/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{vmname}") VirtualMachine createOrUpdate(@PathParam(value="vmname") String vmname, String location, VirtualMachineProperties properties, Map<String,String> tags, @Nullable Plan plan)
@Named(value="ListVirtualMachines") @GET @Path(value="/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines") List<VirtualMachine> list()
@Named(value="ListVirtualMachinesAll") @GET @Path(value="/providers/Microsoft.Compute/virtualMachines") List<VirtualMachine> listAll()
@Named(value="ListVirtualMachinesByLocation") @GET @Path(value="/providers/Microsoft.Compute/locations/{location}/virtualMachines") List<VirtualMachine> listByLocation(@PathParam(value="location") String location)
@Named(value="ListAvailableSizes") @GET @Path(value="/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{name}/vmSizes") List<VMSize> listAvailableSizes(@PathParam(value="name") String name)
@Named(value="DeleteVirtualMachine") @DELETE @Path(value="/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{name}") URI delete(@PathParam(value="name") String name)
@Named(value="RestartVirtualMachine") @POST @Path(value="/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{name}/restart") void restart(@PathParam(value="name") String name)
@Named(value="StartVirtualMachine") @POST @Path(value="/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{name}/start") void start(@PathParam(value="name") String name)
@Named(value="StopVirtualMachine") @POST @Path(value="/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{name}/powerOff") void stop(@PathParam(value="name") String name)
@Named(value="DeallocateVirtualMachine") @POST @Path(value="/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{name}/deallocate") void deallocate(@PathParam(value="name") String name)
@Named(value="generalize") @POST @Path(value="/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{name}/generalize") void generalize(@PathParam(value="name") String name)
@Named(value="capture") @POST @Path(value="/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{name}/capture") @Produces(value="application/json") URI capture(@PathParam(value="name") String name, String vhdPrefix, String destinationContainerName)
Copyright © 2009–2021 The Apache Software Foundation. All rights reserved.