Interface VolumeApi


@Consumes("application/json") @Path("/volumes") public interface VolumeApi
Provides access to the Volume API. This API strictly handles creating and managing Volumes. To attach a Volume to a Server you need to use the
See Also:
  • invalid reference
    VolumeAttachmentApi
  • Method Summary

    Modifier and Type
    Method
    Description
    create(int sizeGB, CreateVolumeOptions... options)
    Creates a new Volume
    boolean
    delete(String volumeId)
    Delete a Volume.
    get(String volumeId)
    Return data about the given Volume.
    com.google.common.collect.FluentIterable<? extends Volume>
    Returns a summary list of Volumes.
    com.google.common.collect.FluentIterable<? extends Volume>
    Returns a detailed list of Volumes.
  • Method Details

    • list

      @Named("volume:list") @GET com.google.common.collect.FluentIterable<? extends Volume> list()
      Returns a summary list of Volumes.
      Returns:
      The list of Volumes
    • listInDetail

      @Named("volume:list") @GET @Path("/detail") com.google.common.collect.FluentIterable<? extends Volume> listInDetail()
      Returns a detailed list of Volumes.
      Returns:
      The list of Volumes
    • get

      @Named("volume:get") @GET @Path("/{id}") @Nullable Volume get(@PathParam("id") String volumeId)
      Return data about the given Volume.
      Parameters:
      volumeId - Id of the Volume
      Returns:
      Details of a specific Volume
    • create

      @Named("volume:create") @POST @Produces("application/json") Volume create(int sizeGB, CreateVolumeOptions... options)
      Creates a new Volume
      Parameters:
      options - See CreateVolumeOptions
      volumeId - Id of the Volume
      Returns:
      The new Volume
    • delete

      @Named("volume:delete") @DELETE @Path("/{id}") boolean delete(@PathParam("id") String volumeId)
      Delete a Volume. The Volume status must be Available or Error.
      Parameters:
      volumeId - Id of the Volume
      Returns:
      true if successful, false otherwise