Package org.jclouds.cloudstack.features
Interface VolumeApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AsyncCreateResponseattachVolume(String volumeId, String virtualMachineId)Attaches a disk volume to a virtual machine.AsyncCreateResponsecreateVolumeFromCustomDiskOfferingInZone(String name, String diskOfferingId, String zoneId, int size)Create a volume with given name, size and diskOfferingIdAsyncCreateResponsecreateVolumeFromDiskOfferingInZone(String name, String diskOfferingId, String zoneId)Create a volume with given name and diskOfferingIdAsyncCreateResponsecreateVolumeFromSnapshotInZone(String name, String snapshotId, String zoneId)Create a volume with given name and snapshotIdvoiddeleteVolume(String id)Deletes a detached disk volumeAsyncCreateResponsedetachVolume(String volumeId)Detaches a disk volume from a virtual machine.VolumegetVolume(String id)Get volume by idSet<Volume>listVolumes(ListVolumesOptions... options)List volumes
-
-
-
Method Detail
-
listVolumes
@Named("listVolumes") @GET @Consumes("application/json") Set<Volume> listVolumes(ListVolumesOptions... options)List volumes- Returns:
- volume list, empty if not found
-
getVolume
@Named("listVolumes") @GET @Consumes("application/json") Volume getVolume(@QueryParam("id") String id)Get volume by id- Parameters:
id- the volume id to retrieve- Returns:
- volume or null if not found
-
createVolumeFromDiskOfferingInZone
@Named("createVolume") @GET @Consumes("application/json") AsyncCreateResponse createVolumeFromDiskOfferingInZone(@QueryParam("name") String name, @QueryParam("diskofferingid") String diskOfferingId, @QueryParam("zoneid") String zoneId)Create a volume with given name and diskOfferingId- Parameters:
name- name of the volumediskOfferingId- the ID of the disk offering.zoneId- the ID of the availability zone- Returns:
- AsyncCreateResponse job response used to track creation
-
createVolumeFromCustomDiskOfferingInZone
@GET @Consumes("application/json") AsyncCreateResponse createVolumeFromCustomDiskOfferingInZone(@QueryParam("name") String name, @QueryParam("diskofferingid") String diskOfferingId, @QueryParam("zoneid") String zoneId, @QueryParam("size") int size)Create a volume with given name, size and diskOfferingId- Parameters:
name- name of the volumediskOfferingId- the ID of the disk offering (the offering should have the custom disk size flag set)zoneId- the ID of the availability zonesize- the size of volume required (in GB)- Returns:
- AsyncCreateResponse job response used to track creation
-
createVolumeFromSnapshotInZone
@Named("createVolume") @GET @Consumes("application/json") AsyncCreateResponse createVolumeFromSnapshotInZone(@QueryParam("name") String name, @QueryParam("snapshotid") String snapshotId, @QueryParam("zoneid") String zoneId)Create a volume with given name and snapshotId- Parameters:
name- name of the volumesnapshotId- Snapshot id to be used while creating the volumezoneId- the ID of the availability zone- Returns:
- AsyncCreateResponse job response used to track creation
-
attachVolume
@Named("attachVolume") @GET @Consumes("application/json") AsyncCreateResponse attachVolume(@QueryParam("id") String volumeId, @QueryParam("virtualmachineid") String virtualMachineId)Attaches a disk volume to a virtual machine.- Parameters:
volumeId- the ID of the disk volumevirtualMachineId- the ID of the virtual machine- Returns:
- AsyncCreateResponse job response used to track creation
-
detachVolume
@Named("detachVolume") @GET @Consumes("application/json") AsyncCreateResponse detachVolume(@QueryParam("id") String volumeId)Detaches a disk volume from a virtual machine.- Parameters:
volumeId- the ID of the disk volume- Returns:
- AsyncCreateResponse job response used to track creation
-
deleteVolume
@Named("deleteVolume") @GET void deleteVolume(@QueryParam("id") String id)Deletes a detached disk volume- Parameters:
id- id of the volume
-
-